Issue with Maven Build command with openjdk#8 - maven

I am following along a course and have hit a roadblock and requesting some assistance. The original POM file given by the tutor is as follows:-
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.visualpathit</groupId>
<artifactId>vprofile</artifactId>
<packaging>war</packaging>
<version>v2</version>
<name>Visualpathit VProfile Webapp</name>
<url>http://maven.apache.org</url>
<properties>
<spring.version>4.2.0.RELEASE</spring.version>
<spring-security.version>4.0.2.RELEASE</spring-security.version>
<spring-data-jpa.version>1.8.2.RELEASE</spring-data-jpa.version>
<hibernate.version>4.3.11.Final</hibernate.version>
<hibernate-validator.version>5.2.1.Final</hibernate-validator.version>
<mysql-connector.version>5.1.36</mysql-connector.version>
<commons-dbcp.version>1.4</commons-dbcp.version>
<jstl.version>1.2</jstl.version>
<junit.version>4.10</junit.version>
<logback.version>1.1.3</logback.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${spring-security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${spring-security.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate-validator.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>${spring-data-jpa.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql-connector.version}</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>${commons-dbcp.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>${jstl.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>3.2.3.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.1</version>
</dependency>
<!-- Memcached Dependency -->
<dependency>
<groupId>net.spy</groupId>
<artifactId>spymemcached</artifactId>
<version>2.12.3</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<!-- RabbitMQ Dependency -->
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit</artifactId>
<version>1.7.1.RELEASE</version>
</dependency>
<dependency>
<groupId>com.rabbitmq</groupId>
<artifactId>amqp-client</artifactId>
<version>4.0.2</version>
</dependency>
<!-- Elasticsearch Dependency-->
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>5.6.4</version>
</dependency>
<!-- Transport Client-->
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>transport</artifactId>
<version>5.6.4</version>
</dependency>
<!--gson -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.2.11.v20150529</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<webApp>
<contextPath>/</contextPath>
</webApp>
</configuration>
</plugin>
<!-- CODE COVERAGE -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.2.201409121644</version>
<executions>
<execution>
<id>jacoco-initialize</id>
<phase>process-resources</phase>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>jacoco-site</id>
<phase>post-integration-test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
on running maven install on this command I keep getting this error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project vprofile: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?
On troubleshooting and through various sources I saw that maybe I need to add the plugin into the pom file, so from the maven-surefire-plugin page, I added this code into the pom file
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M6</version>
</plugin>
I added this just before the line that says Code Coverage
Now on running mvn install , I am getting the following error:-
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M6:test (default-test) on project vprofile:
[ERROR]
[ERROR] Please refer to /Users/sandeepnair/vprofile-project/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd '/Users/sandeepnair/vprofile-project' && '/usr/local/Cellar/openjdk/18.0.1/libexec/openjdk.jdk/Contents/Home/bin/java' '-javaagent:/Users/sandeepnair/.m2/repository/org/jacoco/org.jacoco.agent/0.7.2.201409121644/org.jacoco.agent-0.7.2.201409121644-runtime.jar=destfile=/Users/sandeepnair/vprofile-project/target/jacoco.exec' '-jar' '/Users/sandeepnair/vprofile-project/target/surefire/surefirebooter11362621506741202368.jar' '/Users/sandeepnair/vprofile-project/target/surefire' '2022-05-11T13-02-37_317-jvmRun1' 'surefire10287701281083249864tmp' 'surefire_0620492931166679465tmp'
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 134
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd '/Users/sandeepnair/vprofile-project' && '/usr/local/Cellar/openjdk/18.0.1/libexec/openjdk.jdk/Contents/Home/bin/java' '-javaagent:/Users/sandeepnair/.m2/repository/org/jacoco/org.jacoco.agent/0.7.2.201409121644/org.jacoco.agent-0.7.2.201409121644-runtime.jar=destfile=/Users/sandeepnair/vprofile-project/target/jacoco.exec' '-jar' '/Users/sandeepnair/vprofile-project/target/surefire/surefirebooter11362621506741202368.jar' '/Users/sandeepnair/vprofile-project/target/surefire' '2022-05-11T13-02-37_317-jvmRun1' 'surefire10287701281083249864tmp' 'surefire_0620492931166679465tmp'
[ERROR] Error occurred in starting fork, check output in log
I navigated into the report into the surefire-reports folder and on doing cat I am seeing the following message:-
Corrupted channel by directly writing to native stream in forked JVM 1. Stream 'FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed'.
Can someone please help?

Related

How to fix system.getenv error while running through maven command?

I am running a project on eclipse through maven and I have set an environment variable on my system for my project to work.
Here is a sample code:
public class StepDefFile {
WebDriver driver = CaptureScreenshot.driver;
public static String configFilePath =System.getenv("configFilePath");
#Given(Login to application")
public void Login_to_application() throws Throwable {
driver = Helper.initializeDriver();
}
}
But when i run mvn test I am getting java nullPointerException as it is unable to find the config.properties file while running the test.
Please check below image for maven error log
I have already tried solutions from below links but it did not work for me:
pass a java parameter from maven
Environment Variable with Maven
My pom.xml file is as follows:
<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>group</groupId>
<artifactId>artifact</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>name</name>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<executable>${env.JAVA_HOME}/bin/javac.exe</executable>
</configuration>
</plugin>
In continuation to above pom
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M3</version>
<executions>
<execution>
<goals>
<goal>verify</goal>
</goals>
<configuration>
<systemPropertyVariables>
<configFilePath>${env.configFilePath}</configFilePath>
</systemPropertyVariables>
<includes>
<include>RunnerTest.java</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
In continuation to above pom
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.8</version>
<scope>system</scope>
<systemPath>${env.JAVA_HOME}/lib/tools.jar</systemPath>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-cli/commons-cli -->
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.7</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.maven/maven-plugin-api -->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.5.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/xpp3/xpp3 -->
<dependency>
<groupId>xpp3</groupId>
<artifactId>xpp3</artifactId>
<version>1.1.4c</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-io -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.11.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm</artifactId>
<version>1.2.5</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.cobertura</groupId>
<artifactId>cobertura</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>3.15.0</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>2.0.2-beta</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.vimalselvam</groupId>
<artifactId>cucumber-extentsreport</artifactId>
<version>3.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>3.1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>com.relevantcodes</groupId>
<artifactId>extentreports</artifactId>
<version>2.41.2</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-firefox-driver -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-firefox-driver</artifactId>
<version>3.141.59</version>
</dependency>
</dependencies>
I want to run the above code through maven by passing my configuration file as an environment variable.
Always makes sure to restart the machine when you add system environment variable, which you are planning to access in your script.
Here is the detailed reason:
This behavior occurs because services that run under the Local System account inherit their environment from the Services.exe process. The Services.exe process receives the environment settings for the Local System account when Windows starts. Because the Services.exe process does not use Windows Messaging, when it receives messages that indicate that a value has changed after Windows starts, the Services.exe process does not update its environment settings. You cannot force a service that is running to acknowledge a dynamic change to the environment of the Local System account.(source Microsoft support website)

Unable to open nested jar file (spring-boot-starter-web) when running from jar

I have a Spring boot application that runs fine via IntelliJ's Spring Boot run configuration as well as with mvn spring-boot:run, however, when I attempt to package via mvn package I get the following error when running from java -jar application.jar
java.io.IOException: Unable to open nested jar file
'lib/spring-boot-starter-web-1.3.3.RELEASE.jar'
at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:349)
at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchive(JarFileArchive.java:112)
at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchives(JarFileArchive.java:96)
at org.springframework.boot.loader.ExecutableArchiveLauncher.getClassPathArchives(ExecutableArchiveLauncher.java:75)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:60)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52)
Caused by: java.io.IOException: Unable to find ZIP central directory
records after reading 2227 bytes
at org.springframework.boot.loader.jar.CentralDirectoryEndRecord.(CentralDirectoryEndRecord.java:64)
at org.springframework.boot.loader.jar.JarFile.(JarFile.java:118)
at org.springframework.boot.loader.jar.JarFile.createJarFileFromFileEntry(JarFile.java:387)
at org.springframework.boot.loader.jar.JarFile.createJarFileFromEntry(JarFile.java:357)
at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:343)
... 5 more
This seems similar to java.io.IOException when running Spring Boot jar on Centos 6.4 / Open JDK 1.7.0 but the solution was to remove a corrupt jar file related to TLD libraries and that question doesn't reference which nested jar couldn't be loaded (so I'm unsure if it's exactly the same issue). I have tried deleting and recreating the ~/.m2/repository directory to no avail. I've also tried different versions of Spring Boot (as I've never run across this issue before) with no luck.
My pom file is below.
<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>com.oranization</groupId>
<artifactId>application</artifactId>
<version>1.0-SNAPSHOT</version>
<!--Spring-->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.3.RELEASE</version>
</parent>
<properties>
<slf4j.version>1.7.12</slf4j.version>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth2</artifactId>
<version>2.0.8.RELEASE</version>
</dependency>
<!--Spring-->
<!--Logging-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!--Logging-->
<!--Database-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.35</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time-hibernate</artifactId>
<version>1.4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.jadira.usertype</groupId>
<artifactId>usertype.core</artifactId>
<version>3.2.0.GA</version>
</dependency>
<dependency>
<groupId>com.jolbox</groupId>
<artifactId>bonecp-spring</artifactId>
<version>0.8.0.RELEASE</version>
</dependency>
<!--Database-->
<!--Joda Time-->
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.8.1</version>
</dependency>
<!--Joda Time-->
<!--Test-->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.0.14-beta</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.3.2</version>
<scope>test</scope>
</dependency>
<!--Test-->
<!--Web Support-->
<dependency>
<groupId>org.tuckey</groupId>
<artifactId>urlrewritefilter</artifactId>
<version>4.0.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>2.4.6</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.6.0</version>
</dependency>
<!--Web Support-->
<!--Utils-->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.2</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>com.google.maps</groupId>
<artifactId>google-maps-services</artifactId>
<version>0.1.7</version>
</dependency>
<dependency>
<groupId>de.danielbechler</groupId>
<artifactId>java-object-diff</artifactId>
<version>0.93.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.2</version>
</dependency>
<!--Utils-->
<!--Reactor-->
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-bus</artifactId>
<version>2.0.7.RELEASE</version>
</dependency>
<!--Reactor-->
<!--Swagger-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.3.0</version>
</dependency>
<!--Swagger-->
<!--Elasticsearch-->
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>2.1.1</version>
</dependency>
<!-- AWS -->
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>1.9.33</version>
</dependency>
<!--PDF processing-->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>1.8.11</version>
</dependency>
<!--PDF processing-->
<!--Doc/Docx file processing-->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.13</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.13</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-scratchpad</artifactId>
<version>3.13</version>
</dependency>
<!--Doc/Docx file processing-->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.7</version>
</dependency>
</dependencies>
<build>
<finalName>application</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<!-- Copy Dockerfile -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/
</outputDirectory>
<resources>
<resource>
<directory>src/main/docker</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>zip-files</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<zip destfile="${basedir}/target/app.zip"
basedir="${basedir}/target"
includes="Dockerfile, Dockerrun.aws.json, application.jar"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Edit
After deleting the ~/m2/repository directory in Finder and emptying the Trash, I did a Reimport from Intellij and then a package from the Maven Projects menu. When trying to run the final product with java -jar target/application.jar I get a new error:
Exception in thread "main" java.lang.IllegalStateException:
java.io.IOException: Unable to read bytes
at org.springframework.boot.loader.ExecutableArchiveLauncher.(ExecutableArchiveLauncher.java:53)
at org.springframework.boot.loader.ExecutableArchiveLauncher.(ExecutableArchiveLauncher.java:45)
at org.springframework.boot.loader.JarLauncher.(JarLauncher.java:34)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52)
Caused by: java.io.IOException: Unable to read bytes
at org.springframework.boot.loader.jar.Bytes.get(Bytes.java:53)
at org.springframework.boot.loader.jar.JarEntryData.(JarEntryData.java:70)
at org.springframework.boot.loader.jar.JarEntryData.fromInputStream(JarEntryData.java:212)
at org.springframework.boot.loader.jar.JarFile.loadJarEntries(JarFile.java:155)
at org.springframework.boot.loader.jar.JarFile.(JarFile.java:122)
at org.springframework.boot.loader.jar.JarFile.(JarFile.java:104)
at org.springframework.boot.loader.jar.JarFile.(JarFile.java:95)
at org.springframework.boot.loader.archive.JarFileArchive.(JarFileArchive.java:65)
at org.springframework.boot.loader.archive.JarFileArchive.(JarFileArchive.java:61)
at org.springframework.boot.loader.Launcher.createArchive(Launcher.java:152)
at org.springframework.boot.loader.ExecutableArchiveLauncher.(ExecutableArchiveLauncher.java:50)
... 3 more
Turns out this is related to this question. Despite Java 8 supposedly supporting a huge number of files, I had about 77k in my jar file (due to the inclusion of the node_modules directory from my React frontend) and when I configured the exclude filters properly, it worked like a charm.
Moral of the story, hitting that maximum file limit will cause weird things to happen.

Updated Maven Failed, How to fix it?

I have added some dependencies in file pom.xml
com.fasterxml.jackson.core
jackson-core 2.7.3
com.fasterxml.jackson.core
jackson-databind 2.7.3
com.fasterxml.jackson.core
jackson-annotations
2.7.3
But When I execute a command mvn eclipse:eclipse to update maven dependencies, it shows a warning message:
Downloading:
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jac
kson-core/2.7.3/jackson-core-2.7.3.pom [WARNING] Failed to create
parent directories for tracking file C:\Program Files
(x86)\apache-maven-3.3.9\REPO\com\fasterxml\jackson\core\jackson-core\2.7.3\jac
kson-core-2.7.3.pom.lastUpdated Downloading:
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jac
kson-databind/2.7.3/jackson-databind-2.7.3.pom [WARNING] Failed to
create parent directories for tracking file C:\Program Files
(x86)\apache-maven-3.3.9\REPO\com\fasterxml\jackson\core\jackson-databind\2.7.3
\jackson-databind-2.7.3.pom.lastUpdated Downloading:
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jac
kson-annotations/2.7.3/jackson-annotations-2.7.3.pom [WARNING] Failed
to create parent directories for tracking file C:\Program Files
(x86)\apache-maven-3.3.9\REPO\com\fasterxml\jackson\core\jackson-annotations\2.
7.3\jackson-annotations-2.7.3.pom.lastUpdated [INFO] File D:\PROJECTSPRING\springMOTHER-service.project already exists.
Additional settings will be preserved, run mvn eclipse:clean if you want old settings to be removed.
This doesn't updated the dependencies mentioned in my POM.xml, please let me know ?
Here file pom.xml
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>edu.java.spring.service</groupId>
<artifactId>springDAT-service</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>springDAT-service Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>4.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>4.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.1.0.Final</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.12.1.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.13</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.13</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.7.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.7.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.7.3</version>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
<build>
<finalName>springMOTHER-service</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<skipTests>true</skipTests>
<argLine>-Xmx2524m</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
<fork>true</fork>
<compilerArgs>
<arg>-XDignore.symbol.file</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.3.0.M1</version>
<configuration>
<jvmArgs>-Xmx1048m -Xms536m
-XX:PermSize=128m -XX:MaxPermSize=512m</jvmArgs>
<reload>manual</reload>
<systemProperties>
<systemProperty>
<name>lib</name>
<value>${basedir}/target/spring-mvc/WEB-INF/lib</value>
</systemProperty>
</systemProperties>
<scanIntervalSeconds>3</scanIntervalSeconds>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>8080</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
<contextPath>/</contextPath>
<webAppSourceDirectory>${basedir}/src/main/webapp</webAppSourceDirectory>
<webXml>${basedir}/src/main/webapp/WEB-INF/web.xml</webXml>
<classesDirectory>${basedir}/target/classes</classesDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
You should never put your local repository into C:\Program Files (x86)\apache-maven-3.3.9\REPO\...
First don't put it into C:\Programm Files... cause this is usually forbidden by Windows...
Furthermore don't put a repository under the Maven installation. This should be kept into C:/Users/username/.m2/repository as the default or if you change this by changing the settings.xml put it somewhere like C:\mvn-repo...
Apart from that above you shouldn't use mvn eclipse:eclipse anymore better use the M2E Support in Eclipse and import the appropriate project into Eclipse...

Running org.mule.MuleServer in Maven causing a SecurityException

I have the following maven build profile:
<profile>
<id>runMule</id>
<activation>
<property>
<name>runMule</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>org.mule.MuleServer</argument>
<argument>-config</argument>
<argument>mule-config.xml</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
If I execute:
mvn exec:exec -DrunMule
I end with the following error:
[INFO] --- exec-maven-plugin:1.2.1:exec (default-cli) # acceptance-tests ---
INFO 2012-02-16 17:01:48,170 [main] org.mule.MuleServer: Mule Server starting...
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.mule.MuleServer.shutdown(MuleServer.java:307)
at org.mule.MuleServer.run(MuleServer.java:211)
at org.mule.MuleServer.start(MuleServer.java:195)
at org.mule.MuleServer.main(MuleServer.java:166)
Caused by: java.lang.SecurityException: class "org.apache.commons.collections.ArrayStack"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:806)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:487)
My dependency list is:
<dependencies>
<dependency>
<groupId>org.mule</groupId>
<artifactId>mule-core</artifactId>
<version>1.4.2</version>
</dependency>
<dependency>
<groupId>org.jbehave</groupId>
<artifactId>jbehave-spring</artifactId>
</dependency>
<dependency>
<groupId>org.jbehave</groupId>
<artifactId>jbehave-core</artifactId>
<classifier>resources</classifier>
<type>zip</type>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.xbean</groupId>
<artifactId>xbean-spring</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.5.6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.6</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<type>jar</type>
<classifier>jdk15</classifier>
</dependency>
<dependency>
<groupId>xom</groupId>
<artifactId>xom</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.3</version>
</dependency>
</dependencies>
I think it is a maven dependency conflict, but I'm not sure.
Any idea what is causing the error?
I agree, this looks like a dependency conflict. Do you have eclipse? If you do you can see the conflicts in the "Dependency hierarchy" tab of your pom. Here is a screenshot of my dependency hierarchy.
Please be mindful of others :) You're already using maven, run 'mvn dependency:tree' and 'mvn dependency:list' to troubleshoot dependency issues, this way you can also post results here.

GWT, Maven, Spring - Getting com.thoughtworks.qdox.parser.ParseException: syntax error on Maven Build

I am trying to integrate the code from this demo: http://code.google.com/p/gwt-spring-starter-app/ into my main Spring application. I am able to run the gwt-spring-start-app as itself but when I integrate it into an existing Spring app that has a lot of non-GWT classes I am getting the error (on maven build): com.thoughtworks.qdox.parser.ParseException: syntax error
I've spent a while searching on this and seems others have the same problem but I just can't comprehend what they say to do to fix it.. I believe its an issue with the pom and some sort of dependency declaration that shouldn't be there or something but can't figure out what.. I would greatly appreciate if anyone can take a look at the pom below and let me know if you know what could be causing this. Thanks
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.krams.tutorial</groupId>
<artifactId>spring-hibernate-mysql</artifactId>
<packaging>war</packaging>
<version>1.0.0-SNAPSHOT</version>
<name>spring-hibernate-mysql Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
<!-- convenience to define GWT version in one place -->
<gwt.version>2.0.4</gwt.version>
<spring.version>3.0.4.RELEASE</spring.version>
<!-- tell the compiler we can use 1.5 -->
<maven.compiler.source>1.5</maven.compiler.source>
<maven.compiler.target>1.5</maven.compiler.target>
</properties>
<dependencies>
<!-- GWT dependencies (from central repo) -->
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwt.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>3.0.5.RELEASE</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.0.5.RELEASE</version>
<type>jar</type>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.sf.flexjson</groupId>
<artifactId>flexjson</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>3.0.5.RELEASE</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>3.0.5.RELEASE</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>3.0.5.RELEASE</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>2.1</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.3.2.GA</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1.2</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>3.0.5.RELEASE</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.1</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.1</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>2.2</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.4.0.GA</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>jboss</groupId>
<artifactId>javassist</artifactId>
<version>3.7.ga</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.14</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
</dependencies>
<build>
<finalName>spring-hibernate-mysql</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>generateAsync</goal>
<!-- This will include "gwt:test" during "integration-test" -->
<goal>test</goal>
</goals>
</execution>
<execution>
<id>gwt-clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
<configuration>
<servicePattern>**/I*Service.java</servicePattern>
<module>${gwt.module}</module>
</configuration>
</plugin>
<!-- If you want to use the target/web.xml file mergewebxml produces,
tell the war plugin to use it. Also, exclude what you want from the final
artifact here. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId>
<configuration> <webXml>target/web.xml</webXml> <warSourceExcludes>.gwt-tmp/**</warSourceExcludes>
</configuration> </plugin> -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1-beta-1</version>
<configuration>
<warSourceDirectory>war</warSourceDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
Stack Trace:
[INFO] [gwt:generateAsync {execution: default}]
[INFO] using GWT jars from project dependencies : 2.0.4
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] syntax error #[163,64] in file:/home/user/Desktop/JFDemoGWTFork/src/main/java/org/apache/lucene/queryParser/QueryParser.java
[INFO] ------------------------------------------------------------------------
[INFO] Trace
com.thoughtworks.qdox.parser.ParseException: syntax error #[163,64] in file:/home/user/Desktop/JFDemoGWTFork/src/main/java/org/apache/lucene/queryParser/QueryParser.java
at com.thoughtworks.qdox.parser.impl.Parser.yyerror(Parser.java:987)
at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:1293)
at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:968)
at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:317)
at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:349)
at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:345)
at com.thoughtworks.qdox.JavaDocBuilder$2.visitFile(JavaDocBuilder.java:435)
at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:43)
at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
at com.thoughtworks.qdox.directorywalker.DirectoryScanner.scan(DirectoryScanner.java:52)
at com.thoughtworks.qdox.JavaDocBuilder.addSourceTree(JavaDocBuilder.java:432)
at com.thoughtworks.qdox.JavaDocBuilder.addSourceTree(JavaDocBuilder.java:421)
at org.codehaus.mojo.gwt.GenerateAsyncMojo.createJavaDocBuilder(GenerateAsyncMojo.java:340)
at org.codehaus.mojo.gwt.GenerateAsyncMojo.execute(GenerateAsyncMojo.java:111)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:1205)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:1038)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:643)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Mon Feb 14 13:35:08 MST 2011
[INFO] Final Memory: 28M/596M
[INFO] ------------------------------------------------------------------------
The /home/user/Desktop/JFDemoGWTFork/src/main/java/org/apache/lucene/queryParser/QueryParser.java is just some apache lib file that I included as source.. from the other posts I found that were sort of for the same issue it seems it will do this for many / all (?) classes that aren't the specific GWT RPC related classes
Change the gwt-maven-plugin version to 2.1.0-1.

Resources