andretadeu commented on a change in pull request #2: [MJMOD-8]
NullPointerException on create
URL: https://github.com/apache/maven-jmod-plugin/pull/2#discussion_r248850809
##########
File path: src/main/java/org/apache/maven/plugins/jmod/JModCreateMojo.java
##########
@@ -559,7 +577,12 @@ private Commandline createJModCreateCommandLine( File
resultingJModFile )
argsFile.println( moduleVersion );
}
- if ( !pathElements.isEmpty() )
+ if ( classPath != null && !classPath.trim().isEmpty() )
Review comment:
Just one observation here: jmod create can receive both --module-path and
--class-path. ~~In this case, I think it is a better solution is to segregate
JMOD artifacts and modular JARs from non-modular JARs.~~ Fixing the previous
explanation: --class-path must contain the artifact(s) or the folder(s) that
should be inside JMOD file, i.e., you would expect that one modular JAR or
target/classes folder would be enough. --module-path are the folders or files
containing Java modules neede to compile. It's not clear how it should be used
with **jmod**. In all examples I have, it is not used.
I am using *Java 9 Modularity* book and the official Oracle documentation
for references.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services