[ 
https://issues.apache.org/jira/browse/MCOMPILER-355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16563276#comment-16563276
 ] 

Karl Heinz Marbaise edited comment on MCOMPILER-355 at 7/31/18 8:15 AM:
------------------------------------------------------------------------

I see that the output of {{mvn -version}} does not show the information about 
the commit which it has been created off which should look like this:
{noformat}
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 
2017-10-18T09:58:13+02:00)
Maven home: /usr/local/maven
Java version: 10.0.1, vendor: Oracle Corporation
Java home: /home/khm/tools/jdk-10.0.1
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-862.6.3.el7.x86_64", arch: "amd64", family: 
"unix"
{noformat}

Furthermore to fix an issue the first step is to reproduce it which is used as 
a foundation for an integration test which currently does not work cause if I 
use your examples:
{noformat}
[khm@oc4030881648 test]$ mvn -V clean
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 
2017-10-18T09:58:13+02:00)
Maven home: /usr/local/maven
Java version: 10.0.1, vendor: Oracle Corporation
Java home: /home/khm/tools/jdk-10.0.1
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-862.6.3.el7.x86_64", arch: "amd64", family: 
"unix"
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building noojeebilling.api 1.4-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ noojeebilling.api ---
[INFO] Deleting /home/khm/ws-git/test/target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.459 s
[INFO] Finished at: 2018-07-31T09:59:59+02:00
[INFO] Final Memory: 7M/30M
[INFO] ------------------------------------------------------------------------
{noformat}
Furthermore doing the following:
{noformat}
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 
2017-10-18T09:58:13+02:00)
Maven home: /usr/local/maven
Java version: 10.0.1, vendor: Oracle Corporation
Java home: /home/khm/tools/jdk-10.0.1
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-862.6.3.el7.x86_64", arch: "amd64", family: 
"unix"
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building noojeebilling.api 1.4-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ 
noojeebilling.api ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, 
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory 
/home/khm/ws-git/test/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ 
noojeebilling.api ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ 
noojeebilling.api ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, 
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory 
/home/khm/ws-git/test/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ 
noojeebilling.api ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ noojeebilling.api 
---
[INFO] No tests to run.
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ noojeebilling.api ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: 
/home/khm/ws-git/test/target/noojeebilling.api-1.4-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.435 s
[INFO] Finished at: 2018-07-31T10:01:19+02:00
[INFO] Final Memory: 12M/47M
[INFO] ------------------------------------------------------------------------
{noformat}
Apart from that what looks strange to me is the output at the beginning:
{noformat}
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by 
com.google.inject.internal.cglib.core.$ReflectUtils$1 
(file:/usr/share/maven/lib/guice.jar) to method 
java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of 
com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal 
reflective access operations
WARNING: All illegal access operations will be denied in a future release
{noformat}

Furthermore can you please run your build with {{mvn -X deploy}} and send me 
the log output (If you like in private mail instead of attaching it here):

One more detail. The output shows an entry 
{{file:/usr/share/maven/lib/guice.jar}} which is not of an original Apache 
Maven download cause in Apache maven this looks like this:

{{/usr/local/maven/lib/guice-4.0-no_aop.jar}} which gives me the impression 
that you are not using an original Apache Maven installation..
Can you please make a {{ls -al /usr/shared/maven/lib}} directory and attach the 
output here?

Apart from that I would suggest to download Apache Maven from here: 
https://maven.apache.org/download.cgi and retest with the original 
installation...



was (Author: khmarbaise):
I see that the output of {{mvn -version}} does not show the information about 
the commit which it has been created off which should look like this:
{noformat}
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 
2017-10-18T09:58:13+02:00)
Maven home: /usr/local/maven
Java version: 10.0.1, vendor: Oracle Corporation
Java home: /home/khm/tools/jdk-10.0.1
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-862.6.3.el7.x86_64", arch: "amd64", family: 
"unix"
{noformat}

Furthermore to fix an issue the first step is to reproduce it which is used as 
a foundation for an integration test which currently does not work cause if I 
use your examples:
{noformat}
[khm@oc4030881648 test]$ mvn -V clean
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 
2017-10-18T09:58:13+02:00)
Maven home: /usr/local/maven
Java version: 10.0.1, vendor: Oracle Corporation
Java home: /home/khm/tools/jdk-10.0.1
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-862.6.3.el7.x86_64", arch: "amd64", family: 
"unix"
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building noojeebilling.api 1.4-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ noojeebilling.api ---
[INFO] Deleting /home/khm/ws-git/test/target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.459 s
[INFO] Finished at: 2018-07-31T09:59:59+02:00
[INFO] Final Memory: 7M/30M
[INFO] ------------------------------------------------------------------------
{noformat}
Furthermore doing the following:
{noformat}
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 
2017-10-18T09:58:13+02:00)
Maven home: /usr/local/maven
Java version: 10.0.1, vendor: Oracle Corporation
Java home: /home/khm/tools/jdk-10.0.1
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-862.6.3.el7.x86_64", arch: "amd64", family: 
"unix"
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building noojeebilling.api 1.4-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ 
noojeebilling.api ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, 
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory 
/home/khm/ws-git/test/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ 
noojeebilling.api ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ 
noojeebilling.api ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, 
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory 
/home/khm/ws-git/test/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ 
noojeebilling.api ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ noojeebilling.api 
---
[INFO] No tests to run.
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ noojeebilling.api ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: 
/home/khm/ws-git/test/target/noojeebilling.api-1.4-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.435 s
[INFO] Finished at: 2018-07-31T10:01:19+02:00
[INFO] Final Memory: 12M/47M
[INFO] ------------------------------------------------------------------------
{noformat}
Apart from that what looks strange to me is the output at the beginning:
{noformat}
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by 
com.google.inject.internal.cglib.core.$ReflectUtils$1 
(file:/usr/share/maven/lib/guice.jar) to method 
java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of 
com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal 
reflective access operations
WARNING: All illegal access operations will be denied in a future release
{noformat}

Furthermore can you please run your build with {{mvn -X deploy}} and send me 
the log output (If you like in private mail instead of attaching it here):

One more detail. The output shows an entry 
{{file:/usr/share/maven/lib/guice.jar}} which is not of an original Apache 
Maven download cause in Apache maven this looks like this:

{{/usr/local/maven/lib/guice-4.0-no_aop.jar}} which gives me the impression 
that you are not using an original Apache Maven installation..
Can you please make a {{ls -al}} of {{ls -al /usr/shared/maven/lib}} directory ?

Apart from that I would suggest to download Apache Maven from here: 
https://maven.apache.org/download.cgi and retest with the original 
installation...


> NPE in CompilerMojo.preparePaths on exception
> ---------------------------------------------
>
>                 Key: MCOMPILER-355
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-355
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>         Environment: ubunutu 18.04.
>            Reporter: Brett Sutton
>            Priority: Major
>
> I'm getting:
>  
> {code:java}
>  
> Caused by: java.lang.NullPointerException
>  at org.apache.maven.plugin.compiler.CompilerMojo.preparePaths 
> (CompilerMojo.java:244)
>  at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute 
> (AbstractCompilerMojo.java:787)
>  at org.apache.maven.plugin.compiler.CompilerMojo.execute 
> (CompilerMojo.java:188)
>  at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
> (DefaultBuildPluginManager.java:134)
>  at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:208)
>  at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:154)
> {code}
>  
> Appears to be caused by the exception handling assuming the 'cause' will be 
> non-null:
>     line 244 is:   
> {code:java}
>  243 Throwable cause = pathException.getValue().getCause();
>  244 while ( cause.getCause() != null )
>  245 { 
>  246     cause = cause.getCause(); 
>  247 }{code}
>  
> Clearly in some cases pathException.getValue().getCause() is returning null.
>  This occurs when I try to build a java 10 project using:
> {code:java}
> mvn deploy{code}
>  
> I've narrowed the problem down to this dependancy:
> {code:java}
> <!-- https://mvnrepository.com/artifact/org.javamoney/moneta --> <dependency>
>  <groupId>org.javamoney</groupId>
>  <artifactId>moneta</artifactId>
>  <version>1.3</version>
>  <type>pom</type>
>  </dependency>{code}
>  If you remove the above dependency then the problem goes away.
> So there is likely to be two problems here. The initial NPE which should be 
> easy to fix and then possibly the root cause of the exception.
> Full pom is:
> {code:java}
> <project xmlns="http://maven.apache.org/POM/4.0.0";
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/xsd/maven-4.0.0.xsd";>
>  <modelVersion>4.0.0</modelVersion>
>  <groupId>au.com.noojee</groupId>
>  <artifactId>noojeebilling.api</artifactId>
>  <version>1.4-SNAPSHOT</version>
>  <properties>
>  </properties>
>  <build>
>  <sourceDirectory>src/main/java</sourceDirectory>
>  <plugins>
>  <plugin>
>  <artifactId>maven-compiler-plugin</artifactId>
>  <version>3.8.0</version>
>  <configuration>
>  <release>10</release>
>  </configuration>
>  </plugin>
>  </plugins>
> <extensions>
>  <extension>
>  <groupId>io.packagecloud.maven.wagon</groupId>
>  <artifactId>maven-packagecloud-wagon</artifactId>
>  <version>0.0.6</version>
>  </extension>
>  </extensions>
>  </build>
> <distributionManagement>
>  <repository>
>  <id>noojee-internal</id>
>  <url>packagecloud+https://packagecloud.io/noojee/internal</url>
>  </repository>
>  <snapshotRepository>
>  <id>noojee-internal</id>
>  <url>packagecloud+https://packagecloud.io/noojee/internal</url>
>  </snapshotRepository>
>  </distributionManagement>
>  
> <dependencies>
>  <!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
>  <dependency>
>  <groupId>com.google.code.gson</groupId>
>  <artifactId>gson</artifactId>
>  <version>2.8.5</version>
>  </dependency>
> <!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core 
> -->
>  <dependency>
>  <groupId>org.apache.logging.log4j</groupId>
>  <artifactId>log4j-core</artifactId>
>  <version>2.9.1</version>
>  </dependency>
> <!-- https://mvnrepository.com/artifact/org.javamoney/moneta -->
>  <dependency>
>  <groupId>org.javamoney</groupId>
>  <artifactId>moneta</artifactId>
>  <version>1.3</version>
>  <type>pom</type>
>  </dependency>
>  <!-- https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk15on -->
>  <dependency>
>  <groupId>org.bouncycastle</groupId>
>  <artifactId>bcprov-jdk15on</artifactId>
>  <version>1.59</version>
>  </dependency>
> <dependency>
>  <groupId>junit</groupId>
>  <artifactId>junit</artifactId>
>  <version>4.11</version>
>  <scope>test</scope>
>  </dependency>
>  
> </dependencies>
> </project>
> {code}
>  
>  
>  
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to