Apache Storm - Error when "mvn clean install" - maven

Im configured Apache Storm 0.9.2. I ran nimbus, supervisor and UI, i all ok.
Im configured Maven, Java.
I want to run the example "storm-starter" from:
https://github.com/apache/storm/tree/master/examples/storm-starter
I have this error when i ran: "mvn clean install -DskipTests=true"
Storm .............................................. SUCCESS [ 3.983 s]
[INFO] maven-shade-clojure-transformer .................... SUCCESS [ 4.242 s]
[INFO] storm-maven-plugins ................................ SUCCESS [ 5.402 s]
[INFO] Storm Core ......................................... SUCCESS [01:10 min]
[INFO] storm-starter ...................................... SUCCESS [ 11.801 s]
[INFO] storm-kafka ........................................ FAILURE [ 1.247 s]
[INFO] storm-hdfs ......................................... SKIPPED
[INFO] storm-hbase ........................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:37 min
[INFO] Finished at: 2015-02-16T08:57:15-08:00
[INFO] Final Memory: 44M/128M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project storm-kafka: Compilation failure
[ERROR] /home/emiliano/Documents/AmbienteStorm/ejemplos/storm/external/storm-kafka/src/jvm/storm/kafka/ExponentialBackoffMsgRetryManager.java:[159,24] cannot find symbol
This is the POM.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<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>
<parent>
<artifactId>storm</artifactId>
<groupId>org.apache.storm</groupId>
<version>0.10.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>org.apache.storm</groupId>
<artifactId>storm-starter</artifactId>
<packaging>jar</packaging>
<name>storm-starter</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert-core</artifactId>
<version>2.0M8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jmock</groupId>
<artifactId>jmock</artifactId>
<version>2.6.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.twitter4j</groupId>
<artifactId>twitter4j-stream</artifactId>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>org.apache.storm</groupId>
<artifactId>storm-core</artifactId>
<version>${project.version}</version>
<!-- keep storm out of the jar-with-dependencies -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/jvm</sourceDirectory>
<testSourceDirectory>test/jvm</testSourceDirectory>
<resources>
<resource>
<directory>${basedir}/multilang</directory>
</resource>
</resources>
<plugins>
<!--
Bind the maven-assembly-plugin to the package phase
this will create a jar file without the storm dependencies
suitable for deployment to a cluster.
-->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass />
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.theoryinpractise</groupId>
<artifactId>clojure-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<sourceDirectories>
<sourceDirectory>src/clj</sourceDirectory>
</sourceDirectories>
</configuration>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>java</executable>
<includeProjectDependencies>true</includeProjectDependencies>
<includePluginDependencies>false</includePluginDependencies>
<classpathScope>compile</classpathScope>
<mainClass>${storm.topology}</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>

https://github.com/apache/storm/commit/fd066985a74c3140f61a465cfc49c83a6ddfa713
You are enforced to use JDK 1.7 as the minimum requirement for storm-kafka.

Related

How to solve a Camel3 fat-jar creation exception?

I use Apache Camel 3.18.2 witch camel-main. To create a fat-jar I configured the following two plugins within my pom.xml:
<plugin>
<groupId>org.apache.camel</groupId>
<artifactId>camel-maven-plugin</artifactId>
<version>3.18.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>prepare-fatjar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>de.powerstat.camel.homeautomation.MainApp</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
As dependecies I have:
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-main</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-netty</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-stream</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-paho</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-quartz</artifactId>
</dependency>
<dependency>
<groupId>de.powerstat.camel.component</groupId>
<artifactId>camel-fbaha</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>de.powerstat.camel.component</groupId>
<artifactId>camel-fbtr64</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.openmuc</groupId>
<artifactId>jsml</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.18.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.18.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.18.0</version>
<scope>runtime</scope>
</dependency>
</dependencies>
But durin running mvn clean install I got:
[INFO] --- camel-maven-plugin:3.18.2:prepare-fatjar (default) # myhome ---
[INFO] Found 5 Camel type converter loaders from project classpath
[INFO]
[INFO] --- maven-assembly-plugin:2.2-beta-5:single (make-assembly) # myhome ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:single (make-assembly) on project myhome: Error reading assemblies: No assembly descriptors found. -> [Help 1]
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Exception in thread "ivy-httpclient-shutdown-handler" java.lang.NoClassDefFoundError:
org/apache/http/impl/conn/PoolingHttpClientConnectionManager$2
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.shutdown(PoolingHttpClientConnectionManager.java:413)
at org.apache.http.impl.client.HttpClientBuilder$2.close(HttpClientBuilder.java:1244)
at org.apache.http.impl.client.InternalHttpClient.close(InternalHttpClient.java:201)
at org.apache.ivy.util.url.HttpClientHandler.close(HttpClientHandler.java:357)
at org.apache.ivy.util.url.HttpClientHandler$1.run(HttpClientHandler.java:84)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.ClassNotFoundException: org.apache.http.impl.conn.PoolingHttpClientConnectionManager$2
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
... 6 more
That looks to me like this is an implicit dependency that have not been added by the camel-maven-plugin.
So my question is how to solve this problem?
I also tried to use the maven-shade-plugin instead of maven-assembly-plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>true</createDependencyReducedPom>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
Which then results in a fat-jar with the following exception during executing it:
[ERROR] 2022-09-30T22:04:48,426 15612/22 org.apache.camel.processor.errorhandler.DefaultErrorHandler Failed delivery for (MessageId:
08B251E5AD78E72-0000000000000000 on ExchangeId:
08B251E5AD78E72-0000000000000000). Exhausted after
delivery attempt: 1 caught:
org.apache.camel.InvalidPayloadException: No body available of type: java.lang.Integer but has type:
java.lang.String on: Message. Caused by: No type converter available to convert from type: java.lang.String to the required type: java.lang.Integer. Exchange[]. Caused by:
[org.apache.camel.NoTypeConversionAvailableException - No type converter available to convert from type:
java.lang.String to the required type: java.lang.Integer]
So it looks the shade-plugin creates a fat-jar but missed something of camels dependencies.
Maybe this could be solved in one or the other way?
Last but not least the main question is how to create a Camel3 fat jar that is complete and works correctly?
Based on the error message
Error reading assemblies: No assembly descriptors found.
It looks like you are missing your assembly descriptor. You'll need to define a descriptor or descriptorRef
descriptor example:
<project>
[...]
<build>
[...]
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.4.2</version>
<configuration>
<descriptors>
<descriptor>src/assembly/src.xml</descriptor>
</descriptors>
</configuration>
[...]
</project>
descriptorRef example:
<project>
[...]
<build>
[...]
<plugins>
<plugin>
<!-- NOTE: We don't need a groupId specification because the group is
org.apache.maven.plugins ...which is assumed by default.
-->
<artifactId>maven-assembly-plugin</artifactId>
<version>3.4.2</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
[...]
</project>
If defining a descriptor, see the this about the descriptor format.

maven dependency error when i start verify

I am new to Maven and am trying to create my first bdd test with jbehave, maven and thucydides on IntelliJ IDEA. When I try to click on Verify on Maven panel I receive an error.
How can I fix this? Thanks in advance!
Apache Maven 3.3.9
Error message
C:\Program Files\Java\jdk1.8.0_101\bin\java""-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition2016.2.4\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2016.2.4\plugins\maven\lib\maven3\bin\m2.conf" -Didea.launcher.port=7537 " - Didea.launcher.bin.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2016.2.4\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2016.2.4\plugins\maven\lib\maven3\boot\plexus-classworlds-2.4.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2016.2.4\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=2016.2.4 verify
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------------------------------------------------------
[INFO] Building Sample Thucydides project 1.0-SNAPSHOT
[INFO] ---------------------------------------------------------------------
[INFO] ---------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ---------------------------------------------------------------------
[INFO] Total time: 1.600s
[INFO] Finished at: Fri Sep 23 10:36:29 AST 2016
[INFO] Final Memory: 6M/16M
[INFO] ---------------------------------------------------------------------
[ERROR] Failed to execute goal on project bddtest: Could not resolve dependencies for project com.rostislavberezhnoy.bddtest:bddtest:jar:1.0- SNAPSHOT: Could not find artifact com.rostislavberezhnoy.bddtest:bddtest:jar:1.0-SNAPSHOT -> [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/DependencyResolutionException
Process finished with exit code 1
My pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<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.rostislavberezhnoy.bddtest</groupId>
<artifactId>bddtest</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Sample Thucydides project</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<thucydides.version>0.9.268</thucydides.version>
<thucydides.jbehave.version>0.9.268</thucydides.jbehave.version>
<webdriver.driver>firefox</webdriver.driver>
</properties>
<dependencies>
<dependency>
<groupId>net.thucydides</groupId>
<artifactId>thucydides-core</artifactId>
<version>${thucydides.version}</version>
</dependency>
<dependency>
<groupId>net.thucydides</groupId>
<artifactId>thucydides-junit</artifactId>
<version>${thucydides.version}</version>
</dependency>
<dependency>
<groupId>net.thucydides</groupId>
<artifactId>thucydides-jbehave-plugin</artifactId>
<version>${thucydides.jbehave.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.googlecode.lambdaj</groupId>
<artifactId>lambdaj</artifactId>
<version>2.3.3</version>
</dependency>
<dependency>
<groupId>com.rostislavberezhnoy.bddtest</groupId>
<artifactId>bddtest</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.11</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.11</version>
<configuration>
<includes>
<include>**/*Test.java</include>
<include>**/Test*.java</include>
<include>**/When*.java</include>
<include>**/*TestSuite.java</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
</plugin>
<plugin>
<groupId>net.thucydides.maven.plugins</groupId>
<artifactId>maven-thucydides-plugin</artifactId>
<version>${thucydides.version}</version>
<executions>
<execution>
<id>thucydides-reports</id>
<phase>post-integration-test</phase>
<goals>
<goal>aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>maven2</id>
<activation>
<file>
<missing>${basedir}</missing>
</file>
</activation>
<reporting>
<plugins>
<plugin>
<groupId>net.thucydides.maven.plugins</groupId>
<artifactId>maven-thucydides-plugin</artifactId>
<version>${thucydides.version}</version>
</plugin>
</plugins>
</reporting>
</profile>
<profile>
<id>maven3</id>
<activation>
<file>
<exists>${basedir}</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.2</version>
<configuration>
<reportPlugins>
<plugin>
<groupId>net.thucydides.maven.plugins</groupId>
<artifactId>maven-thucydides-plugin</artifactId>
<version>${thucydides.version}</version>
</plugin>
</reportPlugins>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
Your problem is that you are refering to
<dependency>
<groupId>com.rostislavberezhnoy.bddtest</groupId>
<artifactId>bddtest</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
which isn't found.
It seems to be the same name as the artifact your Maven build is about to create.
That is, you are refering to yourself from your pom. I would consider reming that dependency and run again. It is most likely a mistake that someone introduced that dependency.
Could not find artifact com.rostislavberezhnoy.bddtest:bddtest:jar:1.0-SNAPSHOT -> [Help 1]
You need to install it in your local or deploy it to your maven repo first if you using private mvn repo.
You can refer to this to install the jar file.

Tomcat VirtualWebappLoader stopped working for Java classes

It has been working lovely for me until yesterday. I'm using it with SpringLoaded in my Hippo CMS project.
Symptoms:
- Works for changes to .ftl files
- Does not work for changes to java classes e.g. MyContactFormComponent
Some findings:
The latest change is reflected in the class file under
/site/target/classes/ and /site/target/site/WEB-INF/classes
The latest change is NOT reflected in the class file under
/target/tomcat7x/webapps/site.war (I extracted it)
==> Cargo and Tomcat are using /target/tomcat7x/webapps/site.war instead of /site/target/classes/. This contradicts the intended SpringLoaded setup!
The question is why it happened all out of a sudden?
Note that there is no exception or error whatsoever!
One of the thing I did yesterday was to increase memory for JVM under Cargo settings:
<cargo.jvmargs>-Xmx1920m</cargo.jvmargs>
This is because my repository is huge and I wouldn't be able to run the site without giving Java more memory. Could this be the culprit?
Maven log (mvn verify inside /site/ directory):
➜ site git:(master) ✗ mvn verify
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building SCC Site 2.01.34-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- buildnumber-maven-plugin:1.2:create (default) # scc-site ---
[INFO] Checking for local modifications: skipped.
[INFO] Updating project files from SCM: skipped.
[INFO] Executing: /bin/sh -c cd /Users/eric/hippo/scc2/site && svn --non-interactive info
[INFO] Working directory: /Users/eric/hippo/scc2/site
[INFO] Storing buildNumber: -1 at timestamp: 1429636391442
[INFO] Executing: /bin/sh -c cd /Users/eric/hippo/scc2/site && svn --non-interactive info
[INFO] Working directory: /Users/eric/hippo/scc2/site
[INFO] Storing buildScmBranch: UNKNOWN_BRANCH
[INFO]
[INFO] --- maven-filesync-plugin:1.0.0:generate (default) # scc-site ---
[INFO] No Eclipse .project file found. First import the maven project in Eclipse.
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process (default) # scc-site ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # scc-site ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] Copying 7 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # scc-site ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 48 source files to /Users/eric/hippo/scc2/site/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # scc-site ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # scc-site ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.16:test (default-test) # scc-site ---
[INFO]
[INFO] --- maven-war-plugin:2.4:war (default-war) # scc-site ---
[INFO] Packaging webapp
[INFO] Assembling webapp [scc-site] in [/Users/eric/hippo/scc2/site/target/site]
[INFO] Processing war project
[INFO] Copying webapp resources [/Users/eric/hippo/scc2/site/src/main/webapp]
[INFO] Webapp assembled in [3505 msecs]
[INFO] Building war: /Users/eric/hippo/scc2/site/target/site.war
[INFO]
[INFO] --- maven-source-plugin:2.2.1:jar-no-fork (attach-sources) # scc-site ---
[INFO] Building jar: /Users/eric/hippo/scc2/site/target/site-sources.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.229 s
[INFO] Finished at: 2015-04-22T01:13:28+08:00
[INFO] Final Memory: 20M/215M
[INFO] ------------------------------------------------------------------------
My main pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<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>
<parent>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-cms7-release</artifactId>
<version>7.9.6</version>
</parent>
<name>SCC</name>
<description>SCC</description>
<groupId>com.abc</groupId>
<artifactId>scc</artifactId>
<version>2.01.34-SNAPSHOT</version>
<packaging>pom</packaging>
<!--
The below project elements are emptied/overridden as otherwise their metadata would be
inherited or merged from the parent hippo-cms7-release pom (or its hippo-cms7-project pom).
DO NOT remove these tags but instead fill them in appropriately as needed,
UNLESS the inherited values are valid for your project.
-->
<url/>
<inceptionYear/>
<organization/>
<licenses>
<license/>
</licenses>
<mailingLists>
<mailingList/>
</mailingLists>
<developers>
<developer/>
</developers>
<contributors>
<contributor/>
</contributors>
<issueManagement/>
<!--
<scm>
<connection/>
<developerConnection/>
<url/>
</scm>
-->
<ciManagement/>
<!-- End of emptied/overridden metadata from parent hippo-cms7-release pom. -->
<properties>
<!--***START temporary override of versions*** -->
<hippo.cms.version>2.26.13</hippo.cms.version>
<!-- ***END temporary override of versions*** -->
<hippo.hst.version>2.28.09</hippo.hst.version>
<essentials.version>1.02.06</essentials.version>
<jsp-api.version>2.1</jsp-api.version>
<jstl.version>1.1.2</jstl.version>
<taglibs.version>1.1.2</taglibs.version>
<commons.lang.version>2.6</commons.lang.version>
<junit.version>4.10</junit.version>
<easymock.version>3.1</easymock.version>
<filesync.override>false</filesync.override>
<maven.plugins.filesync.version>1.0.0</maven.plugins.filesync.version>
<repo.bootstrap>true</repo.bootstrap>
</properties>
<repositories>
<repository>
<id>hippo</id>
<name>Hippo maven 2 repository.</name>
<url>https://maven.onehippo.com/maven2/</url>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.onehippo.cms7.essentials.sdk</groupId>
<artifactId>api</artifactId>
<version>${essentials.version}</version>
</dependency>
<dependency>
<groupId>org.onehippo.cms7.essentials.components</groupId>
<artifactId>cms</artifactId>
<version>${essentials.version}</version>
</dependency>
<dependency>
<groupId>org.onehippo.cms7.essentials.components</groupId>
<artifactId>hst</artifactId>
<version>${essentials.version}</version>
</dependency>
<!-- other predefined runtime scope versioned dependencies -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>${jstl.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>${taglibs.version}</version>
<scope>runtime</scope>
</dependency>
<!-- other predefined compile scope versioned dependencies -->
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>${commons.lang.version}</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>${freemarker.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>${easymock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymockclassextension</artifactId>
<version>2.5.2</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.onehippo.cms7.hst</groupId>
<artifactId>hst-mock</artifactId>
<version>${hippo.hst.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!--<dependency>-->
<!--<groupId>mysql</groupId>-->
<!--<artifactId>mysql-connector-java</artifactId>-->
<!--<version>5.1.30</version>-->
<!--<scope>provided</scope>-->
<!--</dependency>-->
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>twbs</exclude>
</excludes>
</resource>
</resources>
<defaultGoal>package</defaultGoal>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.googlecode.mavenfilesync</groupId>
<artifactId>maven-filesync-plugin</artifactId>
<version>${maven.plugins.filesync.version}</version>
<configuration>
<override>${filesync.override}</override>
</configuration>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>${maven.plugin.buildnumber.version}</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
<revisionOnScmFailure>-1</revisionOnScmFailure>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven.plugin.jar.version}</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<Implementation-Build>${buildNumber}</Implementation-Build>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
<extensions>
<!-- Enabling the use of SSH -->
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh-external</artifactId>
<version>1.0-beta-6</version>
</extension>
</extensions>
</build>
<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>jrebel</name>
</property>
</activation>
<modules>
<module>bootstrap</module>
<module>cms</module>
<module>site</module>
<module>essentials</module>
</modules>
</profile>
<profile>
<id>cargo.run</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-tomcat-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/contexts</outputDirectory>
<resources>
<resource>
<directory>conf</directory>
<includes>
<include>*-context.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<configuration>
<properties>
<catalina.servlet.uriencoding>UTF-8</catalina.servlet.uriencoding>
<cargo.jvmargs>-Xmx1920m</cargo.jvmargs>
</properties>
<configfiles>
<!--<configfile>-->
<!--<file>${project.basedir}/conf/context.xml</file>-->
<!--<todir>conf/</todir>-->
<!--<tofile>context.xml</tofile>-->
<!--</configfile>-->
<configfile>
<file>${project.build.directory}/contexts/site-context.xml</file>
<todir>conf/Catalina/localhost/</todir>
<tofile>site.xml</tofile>
</configfile>
</configfiles>
</configuration>
<deployables>
<deployable>
<type>war</type>
<properties>
<context>/cms</context>
</properties>
<location>${project.basedir}/cms/target/cms.war</location>
</deployable>
<deployable>
<location>${project.basedir}/site/target/site.war</location>
<type>war</type>
<properties>
<context>/site</context>
</properties>
</deployable>
<deployable>
<location>${project.basedir}/essentials/target/essentials.war</location>
<type>war</type>
<properties>
<context>/essentials</context>
</properties>
</deployable>
</deployables>
<container>
<systemProperties>
<derby.stream.error.file>${project.basedir}/target/derby.log
</derby.stream.error.file>
<log4j.configuration>file:${project.basedir}/conf/log4j-dev.xml
</log4j.configuration>
<rebel.log4j-plugin>true</rebel.log4j-plugin>
<!-- enables auto export: -->
<project.basedir>${project.basedir}</project.basedir>
<!--<repo.config>file:${project.basedir}/conf/repository.xml</repo.config>-->
</systemProperties>
<!--<dependencies>-->
<!--<dependency>-->
<!--<groupId>mysql</groupId>-->
<!--<artifactId>mysql-connector-java</artifactId>-->
<!--<classpath>extra</classpath>-->
<!--</dependency>-->
<!--</dependencies>-->
</container>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>dist</id>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>validate</defaultGoal>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>distro-assembly</id>
<phase>validate</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${project.basedir}/src/main/assembly/distribution.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>springloaded</id>
<activation>
<property>
<name>springloaded</name>
</property>
</activation>
<properties>
<javaagent>-javaagent:/Users/eric/libs/springloaded.jar</javaagent>
</properties>
</profile>
</profiles>
</project>
Turned out the cargo.jvmargs broke it. It seems the javaagent SpringLoaded is disregarded this way.
So I made the following changes to ${project.basedir}/pom.xml and SpringLoaded works again:
<properties>
<javaagent>-javaagent:/Users/eric/libs/springloaded.jar</javaagent>
</properties>
...
<profiles>
<profile>
<id>cargo.run</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<configuration>
<properties>
<cargo.jvmargs>-Xmx1920m -Xdebug -Xrunjdwp:transport=dt_socket,address=${cargo.debug.address},server=y,suspend=${cargo.debug.suspend} -noverify ${javaagent} ${cargo.jvm.args}</cargo.jvmargs>
Without the complete jvmargs, Debug stops working as well.
The above is mentioned in Hippo CMS documentation too. I just had to dig it up.

Unable to execute wsdl2java with maven

I want to execute wsdl2java with maven but I have the following build failure :
[INFO] --- maven-dependency-plugin:2.1:copy (default) # mogopay ---
[INFO] Configured Artifact: javax.xml.bind:jaxb-api:2.2:jar
[INFO] Configured Artifact: javax.xml.ws:jaxws-api:2.2:jar
[INFO] Copying jaxb-api-2.2.jar to c:\Users\EBIZNEXT\git\mogopay-core\mogopay\target\endorsed\jaxb-api-2.2.jar
[INFO] Copying jaxws-api-2.2.jar to c:\Users\EBIZNEXT\git\mogopay-core\mogopay\target\endorsed\jaxws-api-2.2.jar
[INFO]
[INFO] --- maven-antrun-plugin:1.3:run (copy-tomcat-resources) # mogopay ---
[INFO] Executing tasks
[INFO] Executed tasks
[INFO]
[INFO] --- cxf-codegen-plugin:2.4.2:wsdl2java (CXF Payline) # mogopay ---
[INFO] Running wsdl2java in fork mode...
[INFO] Building jar: C:\Users\EBIZNEXT\AppData\Local\Temp\cxf-tmp-679212\cxf-codegen5225275003143491559.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:30.351s
[INFO] Finished at: Tue Jan 22 18:28:57 CET 2013
[INFO] Final Memory: 14M/178M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.cxf:cxf-codegen-plugin:2.4.2:wsdl2java (CXF Payline) on project mogopay:
[ERROR] Exit code: 1 - Exception in thread "main" org.apache.cxf.tools.common.ToolException: java.lang.reflect.UndeclaredThrowableException
[ERROR] at
...
[ERROR] Caused by: java.lang.NoSuchMethodException: javax.xml.bind.annotation.XmlElementRef.required()
[ERROR] at java.lang.Class.getDeclaredMethod(Class.java:1954)
[ERROR] at com.sun.codemodel.TypedAnnotationWriter.invoke(TypedAnnotationWriter.java:107)
[ERROR] ... 27 more
[ERROR]
[ERROR] Command line was: "c:\Program Files\Java\jdk1.7.0\jre\bin\java.exe" -Djava.endorsed.dirs=c:\Users\EBIZNEXT\git\mogopay-core\mogopay\target/endorsed -jar
C:\Users\EBIZNEXT\AppData\Local\Temp\cxf-tmp-679212\cxf-codegen5225275003143491559.jar C:\Users\EBIZNEXT\AppData\Local\Temp\cxf-tmp-679212\cxf-w2j3628405823287
641812args
This project is built in grails 2.0.3. It seems that the problem comes from Jaxb because the current version in grails uses jaxb-api-2.1 while the project needs jaxb 2.2. I have updated my pom as it has been suggested from this answer : Set Java Compliance Level in CXF wsdl2java and also here : Example 7 - Using JAXB/JAX-WS 2.2 with Java 6. But when I execute maven command : mvn clean install, I get the error above.
Here is my pom (I removed the unimportant parts):
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArguments>
<endorseddirs>${project.build.directory}/endorsed</endorseddirs>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>once</forkMode>
<argLine>-Djava.endorsed.dirs=${project.build.directory}/endorsed</argLine>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2</version>
</artifactItem>
<artifactItem>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>2.2</version>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/endorsed</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
...
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>2.4.2</version>
<configuration>
<fork>once</fork>
<additionalJvmArgs>-Djava.endorsed.dirs=${project.build.directory}/endorsed</additionalJvmArgs>
</configuration>
<dependencies>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.8.1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId>
<version>2.2</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>CXF Payline</id>
<phase>process-resources</phase>
<configuration>
<sourceRoot>${basedir}/src/java</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/java/wsdl/Payline_DirectPaymentAPI.wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
Any suggestion would be appreciated
Java 7 already includes jaxb 2.2 (actualy 2.2.4-1 as you can see here), so you don't need to add any dependency to that artifact. If this artifact conflicts with grails 2.0.3 dependencies, try excluding jaxb from grails dependency, maybe grails is happy with jaxb 2.2.
This should be a comment, but I'm begind a proxy that filters javascript and I cannot use comments feature. Sorry for my English to!

How to load data into data base using dbunit in Maven

Below is my pom.xml file:
<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.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>my-app</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>dbunit-maven-plugin</artifactId>
<version>1.0-beta-3</version>
<configuration>
<driver>com.mysql.jdbc.Driver</driver>
<url>jdbc:mysql://localhost:3306/test</url>
<username>usernamet</username>
<password>password</password>
<dataTypeFactoryName>org.dbunit.ext.mysql.MySqlDataTypeFactory</dataTypeFactoryName>
<metadataHandlerName>org.dbunit.ext.mysql.MySqlMetadataHandler</metadataHandlerName>
<encoding>utf-8</encoding>
<src>target/dbunit/export.xml</src><!--compare 和 operation 要用到它 -->
<type>CLEAN_INSERT</type><!--operation 要用到它-->
</configuration>
<executions>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>operation</goal>
</goals>
</execution>
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>operation</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.13</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
I run mvn dbunit:operation on command line.
Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building my-app
[INFO] task-segment: [dbunit:operation]
[INFO] ------------------------------------------------------------------------
[INFO] [dbunit:operation {execution: default-cli}]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Thu Feb 10 23:02:41 PST 2011
[INFO] Final Memory: 6M/81M
It says build successful. But there is no data in the database.
Found the answer here
If your data file is in flat format (FlatXmlDataSet), adding flat will perform the update.
For example:
This doesn't work:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>dbunit-maven-plugin</artifactId>
...
<executions>
<execution>
<phase>test-compile</phase>
<goals>
<goal>operation</goal>
</goals>
<configuration>
<type>CLEAN_INSERT</type>
<src>src/main/resources/opc1.xml</src>
</configuration>
</execution>
</executions>
</plugin>
But this works (at least it did for me):
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>dbunit-maven-plugin</artifactId>
<version>1.0-beta-3</version>
<dependencies>
<dependency>
<groupId>com.sybase</groupId>
<artifactId>jConnect</artifactId>
...
<executions>
<execution>
<phase>test-compile</phase>
<goals>
<goal>operation</goal>
</goals>
<configuration>
<format>flat</format>
<type>CLEAN_INSERT</type>
<src>src/main/resources/opc1.xml</src>
</configuration>
</execution>
</executions>
</plugin>
Create the database(schema) in respective user.
You should have the proper perperties files in XML form in the project.
Go to the project for and type the command e.g.
c:>project_name>mvn dbunit:operation. This will add all the properties

Resources