-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cherry picked the fix for the bad packaging back to the main branch #602
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,7 +89,7 @@ | |
<module>andhow-testing/andhow-annotation-processor-test-harness</module> | ||
<module>andhow-shared-test-utils</module> | ||
<module>andhow-junit5-extensions</module> | ||
<module>andhow-test-stubs</module> | ||
<module>andhow-test-stubs</module> | ||
</modules> | ||
|
||
<repositories> | ||
|
@@ -351,6 +351,7 @@ | |
<configuration> | ||
<serverId>ossrh</serverId> | ||
<nexusUrl>https://oss.sonatype.org/</nexusUrl> | ||
<skipLocalStaging>true</skipLocalStaging> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was a new issue - It turns out that if the last module is skipped for nexus deploy and nexus is in 'defer' mode (it waits to see if the entire build was successful before uploading artifacts), nexus forgets to go back and do the rest of the uploads. Its a bug, but apparently they don't plan to fix it: |
||
<autoReleaseAfterClose>false</autoReleaseAfterClose> | ||
</configuration> | ||
</plugin> | ||
|
@@ -425,54 +426,5 @@ | |
</plugins> | ||
</build> | ||
</profile> | ||
<profile> | ||
<id>SomeJDK8s</id> | ||
<activation> | ||
<activeByDefault>false</activeByDefault> | ||
<file> | ||
<exists>${java.home}/../lib/tools.jar</exists> | ||
</file> | ||
</activation> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.sun</groupId> | ||
<artifactId>tools</artifactId> | ||
<version>1.8</version> | ||
<scope>system</scope> | ||
<systemPath>${java.home}/../lib/tools.jar</systemPath> | ||
</dependency> | ||
</dependencies> | ||
</profile> | ||
<profile> | ||
<id>java9AndBeyond</id> | ||
<!-- | ||
Its not possible to build a JRE 1.8 compatable jar file using JDK9 | ||
because of the need to use the '-add-modules' feature of JDK9. | ||
Currently the use of jdk9 is blocked by the enforcer plugin, above. | ||
For the 0.5.0 release, the JRE8 will be left behind and only this | ||
profile will be active. | ||
--> | ||
<activation> | ||
<jdk>[1.9,)</jdk> | ||
</activation> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<compilerArgs> | ||
<arg>--add-modules=jdk.compiler</arg> | ||
</compilerArgs> | ||
<!-- without forking compilation happens in the | ||
same process, so no arguments are applied --> | ||
<fork>true</fork> | ||
<source>1.9</source> | ||
<target>1.9</target> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
</project> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I basically moved this profile section from the parent pom, where it applied to all modules, to just this pom. The annotation processor has special requirements for compilation:
tools.jar
(JDK8) or--add-modules=jdk.compiler
(JDK9+) to compile.proc:none
compile flag, so that the compiler doesn't attempt to have the annotation processor its compiling process the annotations in the code its compiling.The tools.jar dependency of JDK8 caused issues b/c w/ the prior setup (declared in the parent pom), the
andhow
module inherited the dependency. Thus, it ended up as a dependency in the main distributed artifact's pom file, forcing projects using andhow to provide it. Tools.jar is not available via Maven repos, so this caused other projects to fail unless they were on linux w/ JDK 8.