Skip to content

Commit c9cf4ef

Browse files
author
Sebastian Bär
authored
Merge pull request #205 from itsallcode/develop
2.2.0
2 parents 13fa681 + 4c4c916 commit c9cf4ef

30 files changed

Lines changed: 1019 additions & 196 deletions

README.md

Lines changed: 31 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22

33
## What is OpenFastTrace?
44

5-
OpenFastTrace is a requirement tracing suite. Requirement tracing helps you keeping track of whether you actually implemented everything you planned to in your specifications. It also identifies obsolete parts of your product and helps you getting rid of them.
5+
OpenFastTrace (short OFT) is a requirement tracing suite. Requirement tracing helps you keeping track of whether you actually implemented everything you planned to in your specifications. It also identifies obsolete parts of your product and helps you getting rid of them.
66

77
You can learn more about requirement tracing and how to use OpenFastTrace in the [user guide](doc/user_guide.md).
88

9+
Below you see a screenshot of of a HTML tracing report where OFT traces itself. You see a summary followed by a detail view of the traced requirements.
10+
11+
<img src="doc/images/oft_screenshot_tracing_report.png" style="box-shadow: 5px 10px 18px #888888;" alt="OFT HTML tracing report">
12+
913
## Project Information
1014

1115
[![Build Status](https://travis-ci.org/itsallcode/openfasttrace.svg)](https://travis-ci.org/itsallcode/openfasttrace)
@@ -29,157 +33,65 @@ Sonarcloud status:
2933
[![Technical Dept](https://sonarcloud.io/api/project_badges/measure?project=org.itsallcode%3Aopenfasttrace&metric=sqale_index)](https://sonarcloud.io/dashboard?id=org.itsallcode%3Aopenfasttrace)
3034
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=org.itsallcode%3Aopenfasttrace&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=org.itsallcode%3Aopenfasttrace)
3135

36+
**Quick Links**
37+
3238
* [Blog](https://blog.itsallcode.org/)
33-
* [Contributing guide](CONTRIBUTING.md)
34-
* [OpenFastTrace stories](https://github.com/itsallcode/openfasttrace/wiki/OFT-Stories)
3539
* [User Guide](doc/user_guide.md)
40+
* [OpenFastTrace stories](https://github.com/itsallcode/openfasttrace/wiki/OFT-Stories)
41+
* [Developer Guide](doc/developer_guide.md)
42+
* [Contributing guide](CONTRIBUTING.md)
3643
* [Command Line Usage](doc/usage.txt)
3744
* [Design](doc/design.md)
3845
* [System Requirements](doc/system_requirements.md)
3946

40-
## Download
41-
42-
Download the executable jar at [jcenter](https://jcenter.bintray.com/org/itsallcode/openfasttrace/):
43-
44-
* [openfasttrace-2.1.0.jar](https://jcenter.bintray.com/org/itsallcode/openfasttrace/2.1.0/openfasttrace-2.1.0.jar)
45-
46-
### Maven
47+
## Using OpenFastTrace
4748

48-
To use OpenFastTrace as a dependency in your maven project add this to your `pom.xml`:
49+
If you want to use OFT, you have the choice between using it as part of your build process &mdash; typically with Maven or Gradle. Or you can run OFT from the command line.
4950

50-
```xml
51-
<dependencies>
52-
<dependency>
53-
<groupId>org.itsallcode</groupId>
54-
<artifactId>openfasttrace</artifactId>
55-
<version>2.1.0</version>
56-
<scope>compile</scope>
57-
</dependency>
58-
</dependencies>
59-
```
51+
Check the [user guide](doc/user_guide.md) for detailed information on how to use OpenFastTrack.
6052

61-
### Gradle
53+
## Getting OpenFastTrace
6254

63-
To use OpenFastTrace as a dependency in your gradle project:
55+
OpenFastTrace at it's core is a Java Archive (short "[JAR]"(https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html#JAR%20Manifest)). This file contains the OpenFastTrace Library and an entry point for [running OFT from the command line](#running-openfasttrace).
6456

65-
```groovy
66-
repositories {
67-
jcenter()
68-
}
69-
dependencies {
70-
compile "org.itsallcode:openfasttrace:2.1.0"
71-
}
72-
```
57+
### Getting Pre-Built Packages
7358

74-
## Using OpenFastTrace
59+
Pre-Built JAR files (called `openfasttrace-2.2.0.jar`) are available from the following places:
7560

76-
Check the [user guide](doc/user_guide.md) for information on how to use OpenFastTrack.
61+
* [Maven Central](https://repo1.maven.org/maven2/org/itsallcode/openfasttrace/2.2.0/openfasttrace-2.2.0.jar)
62+
* [JCenter](https://jcenter.bintray.com/org/itsallcode/openfasttrace/2.2.0/openfasttrace-2.2.0.jar)
63+
* [GitHub](https://github.com/itsallcode/openfasttrace/releases/download/2.2.0/openfasttrace-2.2.0.jar)
64+
65+
Check our [developer guide](doc/developer_guide.md#getting-the-openfasttrace-library] to learn how to use the OFT JAR as dependency in your own code with popular build tools.
7766

7867
## Installation
7968

8069
### Runtime Dependencies
8170

8271
OpenFastTrace only needs a Java 8 (or later) runtime environment to run.
8372

84-
#### Installation of runtime dependencies on Linux
73+
#### Installation of Runtime Dependencies on Linux
8574

8675
##### Ubuntu or Debian
8776

8877
If you just want to run OFT:
8978

9079
apt-get install openjdk-8-jre
9180

92-
If you want to build OFT:
93-
94-
apt-get install openjdk-8-jdk maven
95-
96-
## Development
97-
98-
### Build Time Dependencies
99-
100-
The list below show all build time dependencies in alphabetical order. Note that except the Maven build tool all required modules are downloaded automatically by Maven.
81+
## Running OpenFastTrace
10182

102-
| Dependency | Purpose | License |
103-
-------------------------------------------------------------------------------|--------------------------------------------------------|--------------------------------
104-
| [Apache Maven](https://maven.apache.org/) | Build tool | Apache License 2.0 |
105-
| [Equals Verifier](https://github.com/jqno/equalsverifier) | Automatic contract checker for `equals()` and `hash()` | Apache License 2.0 |
106-
| [Hamcrest Auto Matcher](https://github.com/itsallcode/hamcrest-auto-matcher) | Speed-up for building Hamcrest matchers | GNU General Public License V3 |
107-
| [JUnit](https://junit.org/junit5) | Unit testing framework | Eclipse Public License 1.0 |
108-
| [Mockito](http://site.mockito.org/) | Mocking framework | MIT License |
109-
| [JUnit5 System Extensions](https://github.com/itsallcode/junit5-system-extensions) | JUnit extension for testing `System.x` calls | Eclipse Public License 2.0 |
110-
| [Pitest](http://pitest.org/) | Mutation testing | Apache License 2.0 |
111-
112-
### Essential Build Steps
113-
114-
* `git clone https://github.com/itsallcode/openfasttrace.git`
115-
* Run `mvn test` to run unit tests.
116-
* Run `mvn exec:java@trace` to run requirements tracing.
117-
118-
### Using Eclipse
119-
120-
Import as a Maven project using *"File" &rarr; "Import..." &rarr; "Maven" &rarr; "Existing Maven Projects"*
121-
122-
### Configure Logging
123-
124-
We use [`java.util.logging`](https://docs.oracle.com/javase/8/docs/technotes/guides/logging/overview.html) for logging. To configure log level and formatting, add the following system property:
125-
126-
```bash
127-
-Djava.util.logging.config.file=src/test/resources/logging.properties
128-
```
129-
130-
### License File Header
131-
132-
* We use [license-maven-plugin](http://www.mojohaus.org/license-maven-plugin) to check in `verify` phase that all files have the correct license header. The build will fail if there are any files with missing/outdated headers.
133-
* To update files with correct license headers and generate file `LICENSE.txt`, run command
83+
The most basic variant to run OpenFastTrace is directly from the JAR file via the command line:
13484

13585
```bash
136-
mvn license:update-project-license license:update-file-header
86+
java -jar openfasttrace-2.2.0.jar trace /path/to/directory/being/traced
13787
```
13888

139-
### Run local sonar analysis
140-
141-
```bash
142-
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar \
143-
-Dsonar.host.url=https://sonarcloud.io \
144-
-Dsonar.organization=itsallcode \
145-
-Dsonar.login=[token]
146-
```
89+
If you want to run OFT automatically as part of a continuous build, we recommend using our [Gradle Plugin](https://github.com/itsallcode/openfasttrace-gradle).
14790

148-
See analysis results at https://sonarcloud.io/dashboard?id=org.itsallcode%3Aopenfasttrace
91+
For more details about how to run OFT please consult the [user guide](doc/user_guide.md).
14992

150-
### Run [mutation testing](http://pitest.org)
151-
152-
```bash
153-
mvn org.pitest:pitest-maven:mutationCoverage
154-
# speed up repeated analysis with history
155-
mvn -DwithHistory org.pitest:pitest-maven:mutationCoverage
156-
```
93+
## Development
15794

158-
### Publishing to JCenter
159-
160-
1. Add the following to your `~/.m2/settings.xml`:
161-
162-
```xml
163-
<servers>
164-
<server>
165-
<id>itsallcode-maven-repo</id>
166-
<username>[bintray-username]</username>
167-
<password>[bintray-api-key]</password>
168-
</server>
169-
</servers>
170-
```
171-
172-
1. Checkout the `develop` branch.
173-
1. Update version in `pom.xml` and `README.md`, commit and push.
174-
1. Run command
175-
176-
```bash
177-
mvn deploy
178-
```
179-
1. Merge to `master` branch
180-
1. Create a [release](https://github.com/itsallcode/openfasttrace/releases) of the `master` branch on GitHub.
181-
1. Sign in at [bintray.com](https://bintray.com)
182-
1. Go to the [Bintray project page](https://bintray.com/itsallcode/itsallcode/openfasttrace)
183-
1. There should be a notice saying "You have 6 unpublished item(s) for this package". Click the "Publish" link. Binaries will be available for download at [JCenter](https://jcenter.bintray.com/org/itsallcode/openfasttrace/)
184-
1. Publish to Maven Central by clicking the "Sync" button at https://bintray.com/itsallcode/itsallcode/openfasttrace#central. After some time the new version will appear at https://repo1.maven.org/maven2/org/itsallcode/openfasttrace/.
95+
If you want to learn how to build OpenFastTrace, please check our [Developer Guide](doc/developer_guide.md).
18596

97+
You would like to contribute to OFT? Please check out our [Contributor Guide](CONTRIBUTION.md) to get started.

doc/developer_guide.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# OpenFastTrace Developer Guide
2+
3+
This document contains technical information for developers contributing to OpenFastTrace (short OFT).
4+
5+
If you want to know more about how to contribute to OFT, please check out our [Contributor Guide](../CONTRIBUTION.md).
6+
7+
## Getting the OpenFastTrace Library
8+
9+
#### Getting OFT via Maven
10+
11+
To use OpenFastTrace as a dependency in your [Maven](https://maven.apache.org) project add this to your `pom.xml`:
12+
13+
```xml
14+
<dependencies>
15+
<dependency>
16+
<groupId>org.itsallcode</groupId>
17+
<artifactId>openfasttrace</artifactId>
18+
<version>2.2.0</version>
19+
<scope>compile</scope>
20+
</dependency>
21+
</dependencies>
22+
```
23+
24+
### Getting OFT via Gradle
25+
26+
To use OpenFastTrace as a dependency in your [Gradle](https://gradle.org/) project:
27+
28+
```groovy
29+
dependencies {
30+
compile "org.itsallcode:openfasttrace:2.2.0"
31+
}
32+
```
33+
34+
## Build Time Dependencies
35+
36+
The list below shows all build time dependencies in alphabetical order. Note that except the Maven build tool all required modules are downloaded automatically by Maven.
37+
38+
| Dependency | Purpose | License |
39+
-------------------------------------------------------------------------------|--------------------------------------------------------|--------------------------------
40+
| [Apache Maven](https://maven.apache.org/) | Build tool | Apache License 2.0 |
41+
| [Equals Verifier](https://github.com/jqno/equalsverifier) | Automatic contract checker for `equals()` and `hash()` | Apache License 2.0 |
42+
| [Hamcrest Auto Matcher](https://github.com/itsallcode/hamcrest-auto-matcher) | Speed-up for building Hamcrest matchers | GNU General Public License V3 |
43+
| [JUnit](https://junit.org/junit5) | Unit testing framework | Eclipse Public License 1.0 |
44+
| [Mockito](http://site.mockito.org/) | Mocking framework | MIT License |
45+
| [JUnit5 System Extensions](https://github.com/itsallcode/junit5-system-extensions) | JUnit extension for testing `System.x` calls | Eclipse Public License 2.0 |
46+
| [Pitest](http://pitest.org/) | Mutation testing | Apache License 2.0 |
47+
48+
## Preparations
49+
50+
OpenFastTrace uses [Apache Maven](https://maven.apache.org) as technical project management tool that resolves and downloads the build-dependencies before building the packages.
51+
52+
### Installation of Initial Build Dependencies on Linux
53+
54+
#### Ubuntu or Debian
55+
56+
If you want to build OFT:
57+
58+
apt-get install openjdk-8-jdk maven
59+
60+
## Essential Build Steps
61+
62+
* `git clone https://github.com/itsallcode/openfasttrace.git`
63+
* Run `mvn test` to run unit tests.
64+
* Run `mvn exec:java@trace` to run requirements tracing.
65+
66+
## Using Eclipse
67+
68+
Import as a Maven project using *"File" &rarr; "Import..." &rarr; "Maven" &rarr; "Existing Maven Projects"*
69+
70+
## Configure Logging
71+
72+
We use [`java.util.logging`](https://docs.oracle.com/javase/8/docs/technotes/guides/logging/overview.html) for logging. To configure log level and formatting, add the following system property:
73+
74+
```bash
75+
-Djava.util.logging.config.file=src/test/resources/logging.properties
76+
77+
## License File Header
78+
79+
* We use [license-maven-plugin](http://www.mojohaus.org/license-maven-plugin) to check in `verify` phase that all files have the correct license header. The build will fail if there are any files with missing/outdated headers.
80+
* To update files with correct license headers and generate file `LICENSE.txt`, run command
81+
82+
```bash
83+
mvn license:update-project-license license:update-file-header
84+
```
85+
86+
## Run local sonar analysis
87+
88+
```bash
89+
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar \
90+
-Dsonar.host.url=https://sonarcloud.io \
91+
-Dsonar.organization=itsallcode \
92+
-Dsonar.login=[token]
93+
```
94+
95+
See analysis results at https://sonarcloud.io/dashboard?id=org.itsallcode%3Aopenfasttrace
96+
97+
## Run [mutation testing](http://pitest.org)
98+
99+
```bash
100+
mvn org.pitest:pitest-maven:mutationCoverage
101+
# speed up repeated analysis with history
102+
mvn -DwithHistory org.pitest:pitest-maven:mutationCoverage
103+
```
104+
105+
## Publishing to JCenter
106+
107+
1. Add the following to your `~/.m2/settings.xml`:
108+
109+
```xml
110+
<servers>
111+
<server>
112+
<id>itsallcode-maven-repo</id>
113+
<username>[bintray-username]</username>
114+
<password>[bintray-api-key]</password>
115+
</server>
116+
</servers>
117+
```
118+
119+
1. Checkout the `develop` branch.
120+
1. Update version in `pom.xml` and `README.md`, commit and push.
121+
1. Run command
122+
123+
```bash
124+
mvn deploy
125+
```
126+
1. Merge to `master` branch
127+
1. Create a [release](https://github.com/itsallcode/openfasttrace/releases) of the `master` branch on GitHub.
128+
1. Sign in at [bintray.com](https://bintray.com)
129+
1. Go to the [Bintray project page](https://bintray.com/itsallcode/itsallcode/openfasttrace)
130+
1. There should be a notice saying "You have 6 unpublished item(s) for this package". Click the "Publish" link. Binaries will be available for download at [JCenter](https://jcenter.bintray.com/org/itsallcode/openfasttrace/)
131+
1. Publish to Maven Central by clicking the "Sync" button at https://bintray.com/itsallcode/itsallcode/openfasttrace#central. After some time the new version will appear at https://repo1.maven.org/maven2/org/itsallcode/openfasttrace/.
43 KB
Loading

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>org.itsallcode</groupId>
55
<artifactId>openfasttrace</artifactId>
6-
<version>2.1.0</version><!-- PRODUCT VERSION: do not remove this comment! -->
6+
<version>2.2.0</version><!-- PRODUCT VERSION: do not remove this comment! -->
77
<name>OpenFastTrace</name>
88
<description>Free requirement tracking suite</description>
99
<url>https://github.com/itsallcode/openfasttrace</url>

src/main/java/org/itsallcode/openfasttrace/core/Trace.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
* #L%
2323
*/
2424

25-
2625
import java.util.List;
2726
import java.util.stream.Collectors;
2827

@@ -70,11 +69,25 @@ public int count()
7069
return this.items.size();
7170
}
7271

72+
/**
73+
* Create a new instance of a {@link Builder}
74+
*
75+
* @return builder
76+
*/
77+
public static Builder builder()
78+
{
79+
return new Builder();
80+
}
81+
7382
public static class Builder
7483
{
7584
private List<LinkedSpecificationItem> items;
7685
private List<LinkedSpecificationItem> defectItems;
7786

87+
private Builder()
88+
{
89+
}
90+
7891
public Builder items(final List<LinkedSpecificationItem> items)
7992
{
8093
this.items = items;
@@ -92,4 +105,4 @@ public Trace build()
92105
return new Trace(this.items, this.defectItems);
93106
}
94107
}
95-
}
108+
}

src/main/java/org/itsallcode/openfasttrace/core/Tracer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class Tracer
2929
{
3030
public Trace trace(final List<LinkedSpecificationItem> items)
3131
{
32-
final Trace.Builder builder = new Trace.Builder();
32+
final Trace.Builder builder = Trace.builder();
3333
builder.items(items);
3434
builder.defectItems(items.stream() //
3535
.filter(LinkedSpecificationItem::isDefect) //

0 commit comments

Comments
 (0)