This POM.XML produces the following error on line 55:
Plugin execution not covered by lifecycle configuration: com.peterlavalle:sablecc-maven-plugin:3.7:generate (execution: default, phase: generate-sources)
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.conserveestate</groupId>
<artifactId>EstateAccountingInExLoader</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>EstateAccountingInExLoader</name>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>com.peterlavalle</groupId>
<artifactId>sablecc-maven-plugin</artifactId>
<version>3.7</version>
<configuration>
<sourceDirectory>${basedir}/src/main/resources</sourceDirectory>
<outputDirectory>${basedir}/src/main/gen-java</outputDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>com.peterlavalle</groupId>
<artifactId>sablecc-maven-plugin</artifactId>
<version>3.7</version>
<configuration>
<sourceDirectory>${basedir}/src/main/resources</sourceDirectory>
<outputDirectory>${basedir}/src/main/gen-java</outputDirectory>
</configuration>
<executions>
<execution> <!-- Line 55: Error - Plugin execution not covered by lifecycle configuration -->
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
The error seems to indicate that the plug in is expecting a generate-sources goal instead of generate. If I change the goal to generate-sources, Eclipse removes the red X in the XML file and no errors are displayed, but... When I build the project, I get this error:
Could not find goal 'generate-sources' in plugin com.peterlavalle:sablecc-maven-plugin:3.7 among available goals generate
So this looks like a contradiction to me. I specify a goal of generate I get a message saying the plugin expects generate-sources but if I change the goal to generate-sources then I get a message which seems to indicate the plugin is expecting a goal of generate.
The plugin invokes SableCC (a compiler compiler) which reads a grammar file and generates Java source code that gets compiled along with my code that invokes the generated parser.
What am I doing wrong?
UPDATE
As per khmarbaise's suggestion, I tried this from the command line. Here are those results with a goal of generate-sources:
C:\Users\mbmas_000\workspace\EstateAccountingInExLoader>mvn clean install
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.conserveestate:EstateAccountingInExLoader:jar:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. # line 38, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] -----------< com.conserveestate:EstateAccountingInExLoader >------------
[INFO] Building EstateAccountingInExLoader 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.364 s
[INFO] Finished at: 2020-06-03T09:33:28-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal 'generate-sources' in plugin com.peterlavalle:sablecc-maven-plugin:3.7 among available goals generate -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoNotFoundException
C:\Users\mbmas_000\workspace\EstateAccountingInExLoader>
And again with a goal of generate. This time it works.
C:\Users\mbmas_000\workspace\EstateAccountingInExLoader>mvn clean install
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.conserveestate:EstateAccountingInExLoader:jar:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. # line 38, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] -----------< com.conserveestate:EstateAccountingInExLoader >------------
[INFO] Building EstateAccountingInExLoader 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # EstateAccountingInExLoader ---
[INFO] Deleting C:\Users\mbmas_000\workspace\EstateAccountingInExLoader\target
[INFO]
[INFO] --- sablecc-maven-plugin:3.7:generate (default) # EstateAccountingInExLoader ---
-- Generating parser for Scraper.grammar in C:\Users\mbmas_000\workspace\EstateAccountingInExLoader\src\main\gen-java
Adding productions and alternative of section AST.
Verifying identifiers.
Verifying ast identifiers.
Adding empty productions and empty alternative transformation if necessary.
Adding productions and alternative transformation if necessary.
computing alternative symbol table identifiers.
Verifying production transform identifiers.
Verifying ast alternatives transform identifiers.
Generating token classes.
Generating production classes.
Generating alternative classes.
Generating analysis classes.
Generating utility classes.
Generating the lexer.
State: INITIAL
- Constructing NFA.
.............................................................................................................................................................................................................................................................................................................................................
- Constructing DFA.
.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
................................................................................................................................................................................
- resolving ACCEPT states.
Generating the parser.
.......................................................................................
.......................................................................................
.......................................................................................
..
.......................................................................................
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # EstateAccountingInExLoader ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # EstateAccountingInExLoader ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 65 source files to C:\Users\mbmas_000\workspace\EstateAccountingInExLoader\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # EstateAccountingInExLoader ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # EstateAccountingInExLoader ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # EstateAccountingInExLoader ---
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # EstateAccountingInExLoader ---
[INFO] Building jar: C:\Users\mbmas_000\workspace\EstateAccountingInExLoader\target\EstateAccountingInExLoader-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) # EstateAccountingInExLoader ---
[INFO] Installing C:\Users\mbmas_000\workspace\EstateAccountingInExLoader\target\EstateAccountingInExLoader-0.0.1-SNAPSHOT.jar to C:\Users\mbmas_000\.m2\repository\com\conserveestate\EstateAccountingInExLoader\0.0.1-SNAPSHOT\EstateAccountingInExLoader-0.0.1-SNAPSHOT.jar
[INFO] Installing C:\Users\mbmas_000\workspace\EstateAccountingInExLoader\pom.xml to C:\Users\mbmas_000\.m2\repository\com\conserveestate\EstateAccountingInExLoader\0.0.1-SNAPSHOT\EstateAccountingInExLoader-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.091 s
[INFO] Finished at: 2020-06-03T09:30:32-07:00
[INFO] ------------------------------------------------------------------------
C:\Users\mbmas_000\workspace\EstateAccountingInExLoader>
Related
I am trying to build maven project and it is not creating class file,but it is generating a jar file.
I have done clean then install and then package.
Below is my 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>user.data.store</groupId>
<artifactId>UserProcess</artifactId>
<version>0.0.1-SNAPSHOT</version>
<repositories>
<repository>
<id>cloudera</id>
<url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.11.7</version>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
<version>1.2.0-cdh5.15.1</version>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-common</artifactId>
<version>1.2.0-cdh5.15.1</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/scala</sourceDirectory>
<testSourceDirectory>src/test/scala</testSourceDirectory>
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.1.3</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<configuration>
<args>
<arg>-dependencyfile</arg>
<arg>${project.build.directory}/.scala_dependencies</arg>
</args>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.13</version>
<configuration>
<useFile>false</useFile>
<disableXmlReport>true</disableXmlReport>
<includes>
<include>**/*Test.*</include>
<include>**/*Suite.*</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</project>
Note - I dont have the test folder, and still my build is successfull but getting below in maven console:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for user.data.store:UserProcess:jar:0.0.1-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.apache.hbase:hbase-common:jar -> duplicate declaration of version 1.2.0-cdh5.15.1 # line 172, column 17
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building UserProcess 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: https://repository.cloudera.com/artifactory/cloudera-repos/org/apache/spark/spark-core_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded: https://repository.cloudera.com/artifactory/cloudera-repos/org/apache/spark/spark-core_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml (2 KB at 0.8 KB/sec)
[INFO] Downloading: https://repository.cloudera.com/artifactory/cloudera-repos/org/apache/spark/spark-parent_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded: https://repository.cloudera.com/artifactory/cloudera-repos/org/apache/spark/spark-parent_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml (827 B at 1.3 KB/sec)
[INFO] Downloading: https://repository.cloudera.com/artifactory/cloudera-repos/com/cloudera/cdh/spark2-root/2.0.0.cloudera1-SNAPSHOT/maven-metadata.xml
[INFO] Downloading: https://repository.cloudera.com/artifactory/libs-snapshot-local/com/cloudera/cdh/spark2-root/2.0.0.cloudera1-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded: https://repository.cloudera.com/artifactory/cloudera-repos/com/cloudera/cdh/spark2-root/2.0.0.cloudera1-SNAPSHOT/maven-metadata.xml (607 B at 0.9 KB/sec)
[INFO] Downloaded: https://repository.cloudera.com/artifactory/libs-snapshot-local/com/cloudera/cdh/spark2-root/2.0.0.cloudera1-SNAPSHOT/maven-metadata.xml (607 B at 0.4 KB/sec)
[INFO] Downloading: https://repository.cloudera.com/artifactory/libs-snapshot-local/org/apache/spark/spark-launcher_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml
[INFO] Downloading: https://repository.cloudera.com/artifactory/cloudera-repos/org/apache/spark/spark-launcher_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded: https://repository.cloudera.com/artifactory/libs-snapshot-local/org/apache/spark/spark-launcher_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml (2 KB at 2.1 KB/sec)
[INFO] Downloaded: https://repository.cloudera.com/artifactory/cloudera-repos/org/apache/spark/spark-launcher_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml (2 KB at 2.1 KB/sec)
[INFO] Downloading: https://repository.cloudera.com/artifactory/cloudera-repos/org/apache/spark/spark-network-common_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml
[INFO] Downloading: https://repository.cloudera.com/artifactory/libs-snapshot-local/org/apache/spark/spark-network-common_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded: https://repository.cloudera.com/artifactory/cloudera-repos/org/apache/spark/spark-network-common_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml (2 KB at 2.1 KB/sec)
[INFO] Downloaded: https://repository.cloudera.com/artifactory/libs-snapshot-local/org/apache/spark/spark-network-common_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml (2 KB at 2.1 KB/sec)
[INFO] Downloading: https://repository.cloudera.com/artifactory/cloudera-repos/org/apache/spark/spark-network-shuffle_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml
[INFO] Downloading: https://repository.cloudera.com/artifactory/libs-snapshot-local/org/apache/spark/spark-network-shuffle_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded: https://repository.cloudera.com/artifactory/cloudera-repos/org/apache/spark/spark-network-shuffle_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml (2 KB at 2.1 KB/sec)
[INFO] Downloaded: https://repository.cloudera.com/artifactory/libs-snapshot-local/org/apache/spark/spark-network-shuffle_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml (2 KB at 2.1 KB/sec)
[INFO] Downloading: https://repository.cloudera.com/artifactory/libs-snapshot-local/org/apache/spark/spark-unsafe_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml
[INFO] Downloading: https://repository.cloudera.com/artifactory/cloudera-repos/org/apache/spark/spark-unsafe_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded: https://repository.cloudera.com/artifactory/libs-snapshot-local/org/apache/spark/spark-unsafe_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml (2 KB at 1.7 KB/sec)
[INFO] Downloaded: https://repository.cloudera.com/artifactory/cloudera-repos/org/apache/spark/spark-unsafe_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml (2 KB at 1.7 KB/sec)
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # UserProcess ---
[INFO] Deleting E:\workspace\UserProcess\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # UserProcess ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory E:\workspace\UserProcess\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # UserProcess ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- scala-maven-plugin:3.1.3:compile (default) # UserProcess ---
[INFO] Downloading: https://repository.cloudera.com/artifactory/libs-snapshot-local/org/apache/spark/spark-parent_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded: https://repository.cloudera.com/artifactory/libs-snapshot-local/org/apache/spark/spark-parent_2.10/2.0.0-cloudera1-SNAPSHOT/maven-metadata.xml (827 B at 1.1 KB/sec)
[WARNING] Expected all dependencies to require Scala version: 2.11.7
[WARNING] user.data.store:UserProcess:0.0.1-SNAPSHOT requires scala version: 2.11.7
[WARNING] org.scala-lang:scala-reflect:2.10.6 requires scala version: 2.10.6
[WARNING] Multiple versions of scala libraries detected!
[INFO] E:\workspace\UserProcess\src\main\scala:-1: info: compiling
[INFO] Compiling 3 source files to E:\workspace\UserProcess\target\classes at 1543295814300
[WARNING] warning: there were 5 deprecation warnings; re-run with -deprecation for details
[WARNING] one warning found
[INFO] prepare-compile in 0 s
[INFO] compile in 7 s
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # UserProcess ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory E:\workspace\UserProcess\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # UserProcess ---
[INFO] No sources to compile
[INFO]
[INFO] --- scala-maven-plugin:3.1.3:testCompile (default) # UserProcess ---
[WARNING] Expected all dependencies to require Scala version: 2.11.7
[WARNING] user.data.store:UserProcess:0.0.1-SNAPSHOT requires scala version: 2.11.7
[WARNING] org.scala-lang:scala-reflect:2.10.6 requires scala version: 2.10.6
[WARNING] Multiple versions of scala libraries detected!
[WARNING] No source files found.
[INFO]
[INFO] --- maven-surefire-plugin:2.13:test (default-test) # UserProcess ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # UserProcess ---
[INFO] Building jar: E:\workspace\UserProcess\target\UserProcess-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) # UserProcess ---
[INFO] Installing E:\workspace\UserProcess\target\UserProcess-0.0.1-SNAPSHOT.jar to C:\Users\kumar.harsh\.m2\repository\user\data\store\UserProcess\0.0.1-SNAPSHOT\UserProcess-0.0.1-SNAPSHOT.jar
[INFO] Installing E:\workspace\UserProcess\pom.xml to C:\Users\kumar.harsh\.m2\repository\user\data\store\UserProcess\0.0.1-SNAPSHOT\UserProcess-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 36.405 s
[INFO] Finished at: 2018-11-27T10:47:03+05:30
[INFO] Final Memory: 59M/738M
[INFO] ------------------------------------------------------------------------
I tried deleting target folder manually and then build again, but getting same scenario again.
I can see the class file in target/class folder
Getting below on console while running scala code:
Error: Could not find or load main class user.UserData
I think you are mixing things up. As David Bernard mentioned there should be a target/classes folder with the compiles classes from src/main/scala/
Now to:
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # UserProcess ---
[INFO] No sources to compile
Thats just how maven works. In the different lifecycle phases there are default plugins bound to specific phases. So now when you enter the test-compile phase, the maven-compiler-plugin will get executed with goal testCompile.
I am new to Scala and Spark. I made the simple code and it successfully ran on my local machine. So, I made the .jar files using maven and copied them into my clusters machine to test it on the distributed system. However, I started my command, the console throws the error as below.
*******CLASSPATH = ********
java.lang.ClassNotFoundException: App
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
at org.apache.spark.util.Utils$.classForName(Utils.scala:225)
at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:693)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:185)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:210)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:124)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
I already googled it and found that the class name should be package name + class name. But it didn't worked for my case. And I found another cause that I might be using multiple scala versions. So I checked my pom.xml to ensure my scala and spark versions. I changed the version name according to the versions cluster use, but also the result was same.
Below is my 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>com.sclee.scala0</groupId>
<artifactId>scala_tutorial</artifactId>
<version>1.0-SNAPSHOT</version>
<name>${project.artifactId}</name>
<description>My wonderfull scala app</description>
<inceptionYear>2015</inceptionYear>
<licenses>
<license>
<name>My License</name>
<url>http://....</url>
<distribution>repo</distribution>
</license>
</licenses>
<properties>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<encoding>UTF-8</encoding>
<scala.version>2.10.4</scala.version>
<scala.compat.version>2.10</scala.compat.version>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.apache.spark/spark-mllib_2.10 -->
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-mllib_2.10</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_2.10</artifactId>
<version>2.0.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.scala-lang/scala-library -->
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.10.4</version>
</dependency>
</dependencies>
<pluginRepositories>
<pluginRepository>
<id>scala-tools.org</id>
<name>Scala-tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<executions>
<execution>
<id>compile</id>
<goals>
<goal>compile</goal>
</goals>
<phase>compile</phase>
</execution>
<execution>
<id>test-compile</id>
<goals>
<goal>testCompile</goal>
</goals>
<phase>test-compile</phase>
</execution>
<execution>
<phase>process-resources</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
And when I tried to clean, compile and package using maven package, there are some warnings found. (I am not sure that this warnings might be relevant to my result.But to resolve this issue, I attached the log message as below).
/usr/local/java/jdk1.7.0_80/bin/java -Dmaven.home=/usr/local/maven/apache-maven-3.1.1 -Dclassworlds.conf=/usr/local/maven/apache-maven-3.1.1/bin/m2.conf -Didea.launcher.port=7536 -Didea.launcher.bin.path=/usr/local/intellij/idea-IC-163.10154.41/bin -Dfile.encoding=UTF-8 -classpath /usr/local/maven/apache-maven-3.1.1/boot/plexus-classworlds-2.5.1.jar:/usr/local/intellij/idea-IC-163.10154.41/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=2016.3.2 clean compile package
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.sclee.scala0:scala_tutorial:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. # line 92, column 15
[WARNING] 'build.plugins.plugin.version' for org.scala-tools:maven-scala-plugin is missing. # line 65, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building scala_tutorial 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://scala-tools.org/repo-releases/org/scala-tools/maven-scala-plugin/maven-metadata.xml
[WARNING] Could not transfer metadata org.scala-tools:maven-scala-plugin/maven-metadata.xml from/to scala-tools.org (http://scala-tools.org/repo-releases): peer not authenticated
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # scala_tutorial ---
[INFO] Deleting /home/dst/Documents/01_Intellij_workspace/scala_tutorial/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # scala_tutorial ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/dst/Documents/01_Intellij_workspace/scala_tutorial/src/main/resources
[INFO]
[INFO] --- maven-scala-plugin:2.15.2:compile (default) # scala_tutorial ---
[INFO] Checking for multiple versions of scala
[WARNING] Expected all dependencies to require Scala version: 2.10.4
[WARNING] com.twitter:chill_2.10:0.8.0 requires scala version: 2.10.5
[WARNING] Multiple versions of scala libraries detected!
[INFO] includes = [**/*.scala,**/*.java,]
[INFO] excludes = []
[INFO] /home/dst/Documents/01_Intellij_workspace/scala_tutorial/src/main/scala:-1: info: compiling
[INFO] Compiling 1 source files to /home/dst/Documents/01_Intellij_workspace/scala_tutorial/target/classes at 1486089232696
[WARNING] warning: there were 2 deprecation warning(s); re-run with -deprecation for details
[WARNING] one warning found
[INFO] prepare-compile in 0 s
[INFO] compile in 6 s
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # scala_tutorial ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-scala-plugin:2.15.2:compile (compile) # scala_tutorial ---
[INFO] Checking for multiple versions of scala
[WARNING] Expected all dependencies to require Scala version: 2.10.4
[WARNING] com.twitter:chill_2.10:0.8.0 requires scala version: 2.10.5
[WARNING] Multiple versions of scala libraries detected!
[INFO] includes = [**/*.scala,**/*.java,]
[INFO] excludes = []
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # scala_tutorial ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/dst/Documents/01_Intellij_workspace/scala_tutorial/src/main/resources
[INFO]
[INFO] --- maven-scala-plugin:2.15.2:compile (default) # scala_tutorial ---
[INFO] Checking for multiple versions of scala
[WARNING] Expected all dependencies to require Scala version: 2.10.4
[WARNING] com.twitter:chill_2.10:0.8.0 requires scala version: 2.10.5
[WARNING] Multiple versions of scala libraries detected!
[INFO] includes = [**/*.scala,**/*.java,]
[INFO] excludes = []
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # scala_tutorial ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-scala-plugin:2.15.2:compile (compile) # scala_tutorial ---
[INFO] Checking for multiple versions of scala
[WARNING] Expected all dependencies to require Scala version: 2.10.4
[WARNING] com.twitter:chill_2.10:0.8.0 requires scala version: 2.10.5
[WARNING] Multiple versions of scala libraries detected!
[INFO] includes = [**/*.scala,**/*.java,]
[INFO] excludes = []
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # scala_tutorial ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/dst/Documents/01_Intellij_workspace/scala_tutorial/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # scala_tutorial ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-scala-plugin:2.15.2:testCompile (test-compile) # scala_tutorial ---
[INFO] Checking for multiple versions of scala
[WARNING] Expected all dependencies to require Scala version: 2.10.4
[WARNING] com.twitter:chill_2.10:0.8.0 requires scala version: 2.10.5
[WARNING] Multiple versions of scala libraries detected!
[INFO] includes = [**/*.scala,**/*.java,]
[INFO] excludes = []
[WARNING] No source files found.
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # scala_tutorial ---
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # scala_tutorial ---
[INFO] Building jar: /home/dst/Documents/01_Intellij_workspace/scala_tutorial/target/scala_tutorial-1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.990s
[INFO] Finished at: Thu Feb 02 21:34:00 EST 2017
[INFO] Final Memory: 27M/291M
[INFO] ------------------------------------------------------------------------
Process finished with exit code 0
The Scala version cluster uses is 2.10.4. So I tried to change all the versions in the pom.xml. And the my scala code is as below. It is simple tasks to transform my data using DataFrame.
What I want to use my jar files written by scala and test it on the cluster mode. And my questions is there are any wrong process (version issue or anything) that you looked strange? Any help will be appreciated.
package com.sclee.scala0
import org.apache.spark._
import org.apache.spark.sql.SQLContext
object App {
def main(args: Array[String]): Unit = {
val conf = new SparkConf().setAppName("wordCount").setMaster("local[*]")
// Create a Scala Spark Context.
val sc = new SparkContext(conf)
val sqlContext= new org.apache.spark.sql.SQLContext(sc)
import sqlContext.implicits._
val df = sc.textFile(args(0)).map(_.split('\t')).map(x => (x(0),x(1),x(2),x(3),x(4),x(5),x(6))).toDF("c1","c2","c3","c4","c5","c6","c7")
val res = df.explode("c7","c8")((x:String) => x.split('|')).drop("c7")
res.write.format("com.databricks.spark.csv").option("delimiter","\t").save(args(1))
}
}
And finally, this is my command to run scala jar.
spark-submit \
--class App \
--master spark://spark.dso.xxxx \
--executor-memory 10G \
/home/jumbo/user/sclee/dt/jars/scala_tutorial-1.0-SNAPSHOT.jar \
/user/sclee/data_big/ /user/sclee/output_scala_csv
Scala object name should be associated with package name while submitting the scala-spark job, and therefore your --class configuration will be:
--class com.sclee.scala0.App
Use above configuration while submitting the application and it will eliminate your error.
Update your maven pom.xml dependency section with following:
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-mllib_2.10</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_2.10</artifactId>
<version>${scala.version}</version>
</dependency>
It will allow your pom.xml to download your Scala version compatible jars from remote repository.
I hope it will help.
I am generating webservice artifacts with cxf-xjc and attempting to add them to source with the build-helper plugin. This was working properly when it was used in a single Maven project, but now that I've moved into a multi-module project, the generated classes are not being included as source.
The classes are generated properly and the build-helper plugin is executing after the classes are generated. The output for build-helper shows the correct source directory path where the classes are located and shows 'added'.
pom.xml
<!-- CXF -->
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-xjc-plugin</artifactId>
<version>2.3.0</version>
<executions>
<execution>
<id>generate-xsd-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>xsdtojava</goal>
</goals>
<configuration>
<sourceRoot>${basedir}/target/generated-sources/java</sourceRoot>
<xsdOptions>
<xsdOption>
<!-- <bindingFile>src/main/resources/request.xjb</bindingFile> -->
<xsd>src/main/resources/request.xsd</xsd>
<packagename>${services.package}.package.request</packagename>
</xsdOption>
<xsdOption>
<!-- <bindingFile>src/main/resources/response.xjb</bindingFile> -->
<xsd>src/main/resources/response.xsd</xsd>
<packagename>${services.package}.package.response</packagename>
</xsdOption>
</xsdOptions>
</configuration>
</execution>
</executions>
</plugin>
<!-- Move generated to source -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
Console snip
[INFO] --- **cxf-xjc-plugin:2.3.0:xsdtojava (generate-xsd-sources) # aggregation-jaxrs-api** ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # aggregation-jaxrs-api ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) # aggregation-jaxrs-api ---
[INFO] Compiling 55 source files to C:\workspace\aggregation-parent\aggregation-jaxrs-api\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # aggregation-jaxrs-api ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) # aggregation-jaxrs-api ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # aggregation-jaxrs-api ---
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # aggregation-jaxrs-api ---
[INFO] Building jar: C:\workspace\aggregation-parent\aggregation-jaxrs-api\target\aggregation-jaxrs-api-1.0-SNAPSHOT.jar
[INFO]
**[INFO] --- build-helper-maven-plugin:1.12:add-source (add-source) # aggregation-jaxrs-api ---
[INFO] Source directory: C:\workspace\aggregation-parent\aggregation-jaxrs-api\target\generated-sources\java added.**
This configuration worked fine prior to me moving it to a module. I've changed to build-helper phase between generate-sources and process-sources phase with no luck. I am using Spring Tool Suite 3.8 which is based on Eclipse Neon 4.6.1.
Thanks
I solved the issue by moving the project folders into my Eclipse workspace. They were situated outside the workspace and for some reason moving the project into the workspace and reimporting it has fixed things.
I am struggling to get my app to compile using GWT 2.8.0-SNAPSHOT and Mojo's gwt-maven-plugin 2.8.0-SNAPSHOT
I receive the same compiler errors each time:
[INFO] --- gwt-maven-plugin:2.8.0-SNAPSHOT:compile (default) # UsavAppV7 ---
[ERROR] Jul 20, 2016 9:34:23 AM java.util.prefs.WindowsPreferences <init>
[ERROR] WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
[INFO] Compiling module com.utilitiessavings.usavappv7.Project
[INFO] [ERROR] An internal compiler exception occurred
[INFO] com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
[INFO] at com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:111)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:276)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
[INFO] at com.google.gwt.dev.jjs.ast.JDeclarationStatement.traverse(JDeclarationStatement.java:49)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:88)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove(JModVisitor.java:331)
[INFO] at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:92)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:139)
[INFO] at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:135)
[INFO] at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:83)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:785)
[INFO] at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:777)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:1379)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:875)
[INFO] at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.unifyJavaAst(JavaToJavaScriptCompiler.java:1410)
[INFO] at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.constructJavaAst(JavaToJavaScriptCompiler.java:1222)
[INFO] at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:1140)
[INFO] at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:255)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:255)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:202)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:143)
[INFO] at com.google.gwt.dev.Compiler.compile(Compiler.java:204)
[INFO] at com.google.gwt.dev.Compiler.compile(Compiler.java:155)
[INFO] at com.google.gwt.dev.Compiler.compile(Compiler.java:144)
[INFO] at com.google.gwt.dev.Compiler$1.run(Compiler.java:118)
[INFO] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
[INFO] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
[INFO] at com.google.gwt.dev.Compiler.main(Compiler.java:125)
[INFO] Caused by: java.lang.AbstractMethodError: org.apache.xerces.dom.ElementNSImpl.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;
[INFO] at com.google.gwt.uibinder.rebind.W3cDocumentBuilder.startElement(W3cDocumentBuilder.java:127)
[INFO] at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
[INFO] at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
[INFO] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
[INFO] at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
[INFO] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
[INFO] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
[INFO] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
[INFO] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
[INFO] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[INFO] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
[INFO] at javax.xml.parsers.SAXParser.parse(SAXParser.java:392)
[INFO] at com.google.gwt.uibinder.rebind.W3cDomHelper.documentFor(W3cDomHelper.java:74)
[INFO] at com.google.gwt.uibinder.rebind.UiBinderGenerator.getW3cDoc(UiBinderGenerator.java:208)
[INFO] at com.google.gwt.uibinder.rebind.UiBinderGenerator.generateOnce(UiBinderGenerator.java:183)
[INFO] at com.google.gwt.uibinder.rebind.UiBinderGenerator.generate(UiBinderGenerator.java:128)
[INFO] at com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
[INFO] at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:745)
[INFO] at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:103)
[INFO] at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:78)
[INFO] at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:262)
[INFO] at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:251)
[INFO] at com.google.gwt.dev.PrecompilationContextCreator$1.getAllPossibleRebindAnswers(PrecompilationContextCreator.java:86)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createStaticRebindExpression(UnifyAst.java:493)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createRebindExpression(UnifyAst.java:463)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleMagicMethodCall(UnifyAst.java:588)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.endVisit(UnifyAst.java:293)
[INFO] at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:268)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] ... 35 more
[INFO] [ERROR] at com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java(132): GWT.create(ApplicationView$Binder.class)
[INFO] com.google.gwt.dev.jjs.ast.JMethodCall
[INFO] [ERROR] at com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java(132): Object created = GWT.create(ApplicationView$Binder.class)
[INFO] com.google.gwt.dev.jjs.ast.JDeclarationStatement
[INFO] [ERROR] at com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java(131): {
[INFO] Object created = GWT.create(ApplicationView$Binder.class);
[INFO] assert created instanceof ApplicationView$Binder;
[INFO] ApplicationView$Binder result = (ApplicationView$Binder) created;
[INFO] this.memberInject_Key$type$com$utilitiessavings$usavappv7$client$application$ApplicationView$Binder$_annotation$$none$$(result);
[INFO] return result;
[INFO] }
[INFO] com.google.gwt.dev.jjs.ast.JBlock
[INFO] [ERROR] at com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java(131): {
[INFO] Object created = GWT.create(ApplicationView$Binder.class);
[INFO] assert created instanceof ApplicationView$Binder;
[INFO] ApplicationView$Binder result = (ApplicationView$Binder) created;
[INFO] this.memberInject_Key$type$com$utilitiessavings$usavappv7$client$application$ApplicationView$Binder$_annotation$$none$$(result);
[INFO] return result;
[INFO] }
[INFO] com.google.gwt.dev.jjs.ast.JMethodBody
[INFO] [ERROR] at com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.java(131): com.utilitiessavings.usavappv7.client.application.com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment.get_Key$type$com$utilitiessavings$usavappv7$client$application$ApplicationView$Binder$_annotation$$none$$()Lcom/utilitiessavings/usavappv7/client/application/ApplicationView$Binder;
[INFO] com.google.gwt.dev.jjs.ast.JMethod
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:38 min
[INFO] Finished at: 2016-07-20T09:34:52+01:00
[INFO] Final Memory: 65M/534M
I don't know whether this is a problem with Java 8, GWT, or GWTP.
Any advice on how to investigate further or what could be causing it would be appreciated.
Edit:
pom.xml (snippets)
<properties>
<!-- client -->
<gwt.version>2.8.0-SNAPSHOT</gwt.version>
<gwtp.version>1.5.1</gwtp.version>
<gin.version>2.1.2</gin.version>
<gwtbootstrap3.version>0.9.3</gwtbootstrap3.version>
<gwtbootstrap3-extras.version>0.9.2</gwtbootstrap3-extras.version>
<gwt-log.version>3.3.2</gwt-log.version>
<!-- server -->
<gae.version>1.9.38</gae.version>
<guice.version>4.1.0</guice.version>
<objectify.version>5.1.13</objectify.version>
<persistence-api.version>1.0.2</persistence-api.version>
<servlet-api.version>2.5</servlet-api.version>
<javax.validation.version>1.0.0.GA</javax.validation.version>
<hibernate-validator.version>4.1.0.Final</hibernate-validator.version>
<slf4j.version>1.7.9</slf4j.version>
<jackson.version>2.7.0-rc2</jackson.version>
<guava-version>20.0-SNAPSHOT</guava-version>
<!-- testing -->
<junit.version>4.12</junit.version>
<jukito.version>1.4.1</jukito.version>
<cucumber.version>1.2.4</cucumber.version>
<!-- maven -->
<gwt-maven-plugin.version>2.8.0-SNAPSHOT</gwt-maven-plugin.version>
<maven-surefire-plugin.version>2.18.1</maven-surefire-plugin.version>
<maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
<maven-resources-plugin.version>2.5</maven-resources-plugin.version>
<maven-processor-plugin.version>2.0.5</maven-processor-plugin.version>
<maven-build-helper-plugin.version>1.10</maven-build-helper-plugin.version>
<target.jdk>1.8</target.jdk>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<gae.home>${settings.localRepository}/com/google/appengine/appengine-java-sdk/${gae.version}</gae.home>
<mvn.gae.home>
${settings.localRepository}/com/google/appengine/appengine-java-sdk/${gae.version}/appengine-java-sdk/appengine-java-sdk-${gae.version}
</mvn.gae.home>
</properties>
<build>
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/super</directory>
</resource>
<resource>
<directory>${project.build.directory}/generated-sources/apt</directory>
</resource>
<resource>
<directory>${project.build.directory}/generated-sources/gwt</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>display-dependency-updates</goal>
<goal>display-plugin-updates</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${target.jdk}</source>
<target>${target.jdk}</target>
<encoding>${project.build.sourceEncoding}</encoding>
<proc>none</proc>
</configuration>
</plugin>
<!-- GWT -->
<!-- 'mvn gwt:run' - runs development mode -->
<!-- 'mvn gwt:debug' - runs debug mode -->
<!-- 'mvn gwt:compile' - compiles gwt -->
<!-- 'mvn integration-test' - runs the gwt tests (*GwtTest.java) -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt-maven-plugin.version}</version>
<configuration>
<strict>true</strict>
<testTimeOut>180</testTimeOut>
<mode>htmlunit</mode>
<logLevel>INFO</logLevel>
<style>PRETTY</style>
<copyWebapp>true</copyWebapp>
<hostedWebapp>${webappDirectory}</hostedWebapp>
<server>com.google.appengine.tools.development.gwt.AppEngineLauncher</server>
<appEngineVersion>${gae.version}</appEngineVersion>
<extraJvmArgs>-Ddatastore.default_high_rep_job_policy_unapplied_job_pct=20 -Xmx2g -Dappengine.sdk.root=${mvn.gae.home}
</extraJvmArgs>
<port>8888</port>
<incremental>false</incremental>
<bindAddress>0.0.0.0</bindAddress>
<runTarget>Project.html</runTarget>
<modules>
<module>com.utilitiessavings.usavappv7.Project</module>
</modules>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>gcloud-maven-plugin</artifactId>
<configuration>
<verbosity>info</verbosity>
<runtime>java</runtime>
</configuration>
<version>2.0.9.106.v20160420</version>
</plugin>
Libraries
Java 1.8.0_92
Maven 3.3.9
GWT 2.8.0-SNAPSHOT
GWTP 1.5.1
Guava 20.0-SNAPSHOT
Guice 4.1.0
Gin 2.1.2
Upgrading my own comment to an answer.
I discovered the library excel-streaming-reader had a dependency on xercesImpl 2.4.0 (from 2006).
I declared an additional dependency to 2.11.0 to solve the issue:
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
</dependency>
I have notified the owner of the problem. Github issue: https://github.com/monitorjbl/excel-streaming-reader/issues/44
Updated answer. As question author found out based on comments, the problem was with incompatible Xerces library that was pulled by excel-streaming-reader.
To resolve similar issues, passing -X to Maven to examine all libraries used during compilation and turning on logging via logLevel property in maven-compiler-plugin helps to narrow down the problems like this.
In my original answer I also recommended to manually create
HKEY_LOCAL_MACHINE\Software\JavaSoft\Prefs or HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Prefs on 64bit WinPC.
You can find additional details e.g. in this post how to create Prefs root node
GWT tries to access Windows registry to store or retrieve encryption key data via java.util.prefs.WindowsPreferences. This warning is annoying, but mostly harmless, you can skip this part unless you like your logs clean.
When I ran clean test or
clean test -DsuiteFile=src/main/resources/testng/SmokeTestSuite.xml in eclipse
following is the output.No test running but Build is success.
I have been struggling for this for quite a few weeks.Would be great if someone can explain me what was the issue and a proper solution.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building eselenium-ellis-tests 0.0.1
[INFO] ------------------------------------------------------------------------
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Downloading: https://devops-tools.pearson.com/nexus-master/content/repositories/releases/com/pearson/eselenium-pageobjects-ellis/1.0.1-SNAPSHOT/maven-metadata.xml
Downloading: https://devops-tools.pearson.com/nexus-deps/content/groups/all-deps/com/pearson/eselenium-pageobjects-ellis/1.0.1-SNAPSHOT/maven-metadata.xml
Downloaded: https://devops-tools.pearson.com/nexus-deps/content/groups/all-deps/com/pearson/eselenium-pageobjects-ellis/1.0.1-SNAPSHOT/maven-metadata.xml (788 B at 0.2 KB/sec)
Downloading: https://devops-tools.pearson.com/nexus-deps/content/groups/all-deps/com/pearson/eselenium-pageobjects-ellis/1.0.1-SNAPSHOT/maven-metadata.xml
Downloading: https://devops-tools.pearson.com/nexus-master/content/repositories/releases/com/pearson/eselenium-pageobjects-ellis/1.0.1-SNAPSHOT/maven-metadata.xml
Downloaded: https://devops-tools.pearson.com/nexus-deps/content/groups/all-deps/com/pearson/eselenium-pageobjects-ellis/1.0.1-SNAPSHOT/maven-metadata.xml (788 B at 0.2 KB/sec)
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) # eselenium-ellis-tests ---
[INFO] Deleting C:\ATDD\workspace\galaxy-tests\target
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) # eselenium-ellis-tests ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 8 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # eselenium-ellis-tests ---
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 19 source files to C:\ATDD\workspace\galaxy-tests\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) # eselenium-ellis-tests ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) # eselenium-ellis-tests ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # eselenium-ellis-tests ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.003s
[INFO] Finished at: Sun Oct 19 09:48:48 IST 2014
[INFO] Final Memory: 20M/153M
[INFO] ------------------------------------------------------------------------
AND My POM file looks like 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.pearson</groupId>
<artifactId>eselenium-ellis-tests</artifactId>
<version>0.0.1</version>
<properties>
<suiteXmlFile>${suiteFile}</suiteXmlFile>
</properties>
<dependencies>
<dependency>
<groupId>com.pearson</groupId>
<artifactId>eselenium.framework</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>com.pearson</groupId>
<artifactId>eselenium-pageobjects-ellis</artifactId>
<version>1.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.5.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
<suiteXmlFiles>
<suiteXmlFile>${suiteFile}</suiteXmlFile>
<!--<suiteXmlFile>src/main/resources/testng/SmokeTestSuite.xml</suiteXmlFile> -->
</suiteXmlFiles>
<reportsDirectory>test-output</reportsDirectory>
<reportsDirectory>test-output\archive\${timestamp}</reportsDirectory>
<systemProperties>
<property>
<name>browser.NAME</name>
<value>${browser.NAME}</value>
</property>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
Your issue is actually not being able to provide pom.xml value from command prompt. Its a duplicate of
Passing command line arguments from Maven as properties in pom.xml
you will find solution there. You need to double quote your parameter.