I have used Maven with earlier versions of Java but now I am trying to get it to work with Java 10. I built a simple Hello world project, specifically:
package main;
public class Test {
public static void main(String[] args) {
System.out.println("Hello World");
}
} With a module-info class:
module maven.test { exports main; }
The pom associated with this project is:
http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 MavenTest MavenTest 0.0.1-SNAPSHOT MavenTest src maven-compiler-plugin 3.7.0 10
When I build the project, it build successfully. I then added a dependency from the Maven central repository: org.jsoup jsoup 1.7.3
This too builds successfully. I then add a locally installed jar.
<dependency>
<groupId>com.artificialmed</groupId>
<artifactId>DBconnectValueObjects</artifactId>
<version>1.0</version>
</dependency>
When I do this, I get a Build Failure with the following error message:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project MavenTest: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile failed. IllegalArgumentException -> [Help 1] [ERROR]
I've not found anything that would help me resolve this error. When I rebuilt the project using full debugging logging, I saw no useful information. I know the local jar was installed in my repository correctly because when I include that jar in projects compiled in Java 7, the project builds successfully. So, I suspect this is some issue related to Java 10 and locally installed jars.
Does anyone know how to get around this issue?
Elliott