Skip to content

Commit

Permalink
Merge pull request #334 from itsallcode/add-module-info
Browse files Browse the repository at this point in the history
Add module info files
  • Loading branch information
kaklakariada authored Aug 21, 2022
2 parents 0e056a3 + 17a207d commit 063e23b
Show file tree
Hide file tree
Showing 19 changed files with 156 additions and 21 deletions.
17 changes: 17 additions & 0 deletions api/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* The general OpenFastTrace API used by all modules.
*/
module org.itsallcode.openfasttrace.api
{
exports org.itsallcode.openfasttrace.api;
exports org.itsallcode.openfasttrace.api.core;
exports org.itsallcode.openfasttrace.api.core.serviceloader;
exports org.itsallcode.openfasttrace.api.cli;
exports org.itsallcode.openfasttrace.api.importer;
exports org.itsallcode.openfasttrace.api.importer.input;
exports org.itsallcode.openfasttrace.api.importer.tag.config;
exports org.itsallcode.openfasttrace.api.exporter;
exports org.itsallcode.openfasttrace.api.report;

requires java.logging;
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package org.itsallcode.openfasttrace.api;

import java.util.Collections;
import java.util.Set;

import javax.annotation.processing.Generated;

/**
* Settings for import filtering
*/
Expand Down Expand Up @@ -78,7 +77,6 @@ public boolean isAnyCriteriaSet()
return isArtifactTypeCriteriaSet() || isTagCriteriaSet();
}

@Generated("org.eclipse.Eclipse")
@Override
public int hashCode()
{
Expand All @@ -91,7 +89,6 @@ public int hashCode()
return result;
}

@Generated("org.eclipse.Eclipse")
@Override
public boolean equals(final Object obj)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.itsallcode.openfasttrace.api.core;

import javax.annotation.processing.Generated;

/**
* The location of a coverage item.
*/
Expand Down Expand Up @@ -111,7 +109,6 @@ public int getColumn()
return this.column;
}

@Generated(value = "org.eclipse.Eclipse")
@Override
public int hashCode()
{
Expand All @@ -123,7 +120,6 @@ public int hashCode()
return result;
}

@Generated(value = "org.eclipse.Eclipse")
@Override
public boolean equals(final Object obj)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import java.util.List;
import java.util.Objects;

import javax.annotation.processing.Generated;

/**
* A specification item that requires coverage from other items and provides
* coverage for other items.
Expand Down Expand Up @@ -222,7 +220,6 @@ public boolean isForwarding()
return this.forwards;
}

@Generated(value = "org.eclipse.Eclipse")
@Override
public final int hashCode()
{
Expand All @@ -244,7 +241,6 @@ public final int hashCode()
return result;
}

@Generated(value = "org.eclipse.Eclipse")
@Override
public final boolean equals(final Object obj)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package org.itsallcode.openfasttrace.api.core;

import java.util.logging.Logger;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.annotation.processing.Generated;

/**
* Specification item ID
*
Expand Down Expand Up @@ -92,7 +89,6 @@ public String getArtifactType()
}

@Override
@Generated(value = "org.eclipse.Eclipse")
public final int hashCode()
{
final int prime = 31;
Expand All @@ -104,7 +100,6 @@ public final int hashCode()
}

@Override
@Generated(value = "org.eclipse.Eclipse")
public final boolean equals(final Object obj)
{
if (this == obj)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.itsallcode.openfasttrace.api.core;

import javax.annotation.processing.Generated;

/**
* This class represents a link that had its status evaluated during a trace
* run.
Expand Down Expand Up @@ -61,7 +59,6 @@ public boolean isOutgoing()
return this.status.isOutgoing();
}

@Generated(value = "org.eclipse.Eclipse")
@Override
public int hashCode()
{
Expand All @@ -72,7 +69,6 @@ public int hashCode()
return result;
}

@Generated(value = "org.eclipse.Eclipse")
@Override
public boolean equals(final Object obj)
{
Expand Down
24 changes: 24 additions & 0 deletions core/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* The Core OpenFastTrace module.
*
* @uses org.itsallcode.openfasttrace.api.report.ReporterFactory
* @uses org.itsallcode.openfasttrace.api.importer.ImporterFactory
* @uses org.itsallcode.openfasttrace.api.exporter.ExporterFactory
*/
module org.itsallcode.openfasttrace.core
{
exports org.itsallcode.openfasttrace.core;
exports org.itsallcode.openfasttrace.core.cli;
exports org.itsallcode.openfasttrace.core.cli.commands;
exports org.itsallcode.openfasttrace.core.report;
exports org.itsallcode.openfasttrace.core.exporter;
exports org.itsallcode.openfasttrace.core.importer;
exports org.itsallcode.openfasttrace.core.serviceloader;

requires java.logging;
requires transitive org.itsallcode.openfasttrace.api;

uses org.itsallcode.openfasttrace.api.exporter.ExporterFactory;
uses org.itsallcode.openfasttrace.api.importer.ImporterFactory;
uses org.itsallcode.openfasttrace.api.report.ReporterFactory;
}
1 change: 1 addition & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added support for C# files with postfix `.cs` [#326](https://github.com/itsallcode/openfasttrace/issues/326) / [PR #327](https://github.com/itsallcode/openfasttrace/pull/327)
- Added support for Robot Framework with postfix `.robot` [#302](https://github.com/itsallcode/openfasttrace/issues/302) / [PR #332](https://github.com/itsallcode/openfasttrace/pull/332)
- Upload self-tracing report to GitHub Action result [#246](https://github.com/itsallcode/openfasttrace/issues/246) / [PR #333](https://github.com/itsallcode/openfasttrace/pull/333)
- Added `module-info.java` files to support Java modules [#334](https://github.com/itsallcode/openfasttrace/pull/334)

### Refactoring

Expand Down
11 changes: 11 additions & 0 deletions exporter/common/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* Common classes for XML exporters.
*/
module org.itsallcode.openfasttrace.exporter.common
{
exports org.itsallcode.openfasttrace.exporter.common;

requires java.logging;
requires transitive java.xml;
requires org.itsallcode.openfasttrace.api;
}
12 changes: 12 additions & 0 deletions exporter/specobject/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* This provides an exporter for the SpecObject XML format.
*/
module org.itsallcode.openfasttrace.exporter.specobject
{
exports org.itsallcode.openfasttrace.exporter.specobject;

requires java.logging;
requires java.xml;
requires org.itsallcode.openfasttrace.api;
requires org.itsallcode.openfasttrace.exporter.common;
}
10 changes: 10 additions & 0 deletions importer/markdown/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* This provides an importer for the MarkDown format.
*/
module org.itsallcode.openfasttrace.importer.markdown
{
exports org.itsallcode.openfasttrace.importer.markdown;

requires java.logging;
requires transitive org.itsallcode.openfasttrace.api;
}
15 changes: 15 additions & 0 deletions importer/specobject/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* This provides an importer for the SpecObject XML format.
*/
module org.itsallcode.openfasttrace.importer.specobject
{
exports org.itsallcode.openfasttrace.importer.specobject;
exports org.itsallcode.openfasttrace.importer.specobject.handler;
exports org.itsallcode.openfasttrace.importer.specobject.xml;
exports org.itsallcode.openfasttrace.importer.specobject.xml.tree;
exports org.itsallcode.openfasttrace.importer.specobject.xml.event;

requires java.logging;
requires transitive java.xml;
requires transitive org.itsallcode.openfasttrace.api;
}
10 changes: 10 additions & 0 deletions importer/tag/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* This provides an importer for coverage tags.
*/
module org.itsallcode.openfasttrace.importer.tag
{
exports org.itsallcode.openfasttrace.importer.tag;

requires java.logging;
requires transitive org.itsallcode.openfasttrace.api;
}
10 changes: 10 additions & 0 deletions importer/zip/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* This provides an importer for the ZIP files.
*/
module org.itsallcode.openfasttrace.importer.zip
{
exports org.itsallcode.openfasttrace.importer.zip;
exports org.itsallcode.openfasttrace.importer.zip.input;

requires transitive org.itsallcode.openfasttrace.api;
}
9 changes: 9 additions & 0 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,15 @@
<systemPropertyVariables>
<java.util.logging.config.file>${basedir}/src/test/resources/logging.properties</java.util.logging.config.file>
</systemPropertyVariables>
<useModulePath>true</useModulePath>
<argLine>
--illegal-access=deny
<!-- Required to fix failing EqualsVerifier test:
TestTracedLink.testEqualsAndHashContract:22 EqualsVerifier found a problem in class org.itsallcode.openfasttrace.api.core.TracedLink.
-> Unable to make field private final org.itsallcode.openfasttrace.api.core.LinkedSpecificationItem org.itsallcode.openfasttrace.api.core.TracedLink.otherLinkEnd accessible:
module org.itsallcode.openfasttrace.api does not "opens org.itsallcode.openfasttrace.api.core" to unnamed module @48ae9b55 -->
--add-opens org.itsallcode.openfasttrace.api/org.itsallcode.openfasttrace.api.core=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
<plugin>
Expand Down
4 changes: 4 additions & 0 deletions product/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
<groupId>org.itsallcode.openfasttrace</groupId>
<artifactId>openfasttrace-core</artifactId>
</dependency>
<dependency>
<groupId>org.itsallcode.openfasttrace</groupId>
<artifactId>openfasttrace-exporter-common</artifactId>
</dependency>
<dependency>
<groupId>org.itsallcode.openfasttrace</groupId>
<artifactId>openfasttrace-exporter-specobject</artifactId>
Expand Down
12 changes: 12 additions & 0 deletions reporter/aspec/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* This provides an report generator for the Aspec format.
*/
module org.itsallcode.openfasttrace.report.aspec
{
exports org.itsallcode.openfasttrace.report.aspec;

requires java.xml;
requires java.logging;
requires org.itsallcode.openfasttrace.api;
requires org.itsallcode.openfasttrace.exporter.common;
}
11 changes: 11 additions & 0 deletions reporter/html/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* This provides an report generator for the HTML format.
*/
module org.itsallcode.openfasttrace.report.html
{
exports org.itsallcode.openfasttrace.report.html;
exports org.itsallcode.openfasttrace.report.html.view;
exports org.itsallcode.openfasttrace.report.html.view.html;

requires transitive org.itsallcode.openfasttrace.api;
}
9 changes: 9 additions & 0 deletions reporter/plaintext/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* This provides an report generator for the plain text format.
*/
module org.itsallcode.openfasttrace.report.plaintext
{
exports org.itsallcode.openfasttrace.report.plaintext;

requires transitive org.itsallcode.openfasttrace.api;
}

0 comments on commit 063e23b

Please sign in to comment.