My entire pom.xml is below. With this pom I get this error in Eclipse "Plugin execution not covered by lifecycle configuration: org.apache.cxf:cxf-java2ws-plugin:3.1.8:java2ws (execution: process-classes, phase: process-classes)".
Nevertheless, it does work properly. I mean, if I "mvn clean package install" I get the output wsdl file desired.
If I added pluginManagement, the error in Eclipse desapears but I don't get the wsdl file desired neither I get an error in my console. The two closest discussions I found about it was "Publishing wsdl java M2E plugin execution not covered" and "How to solve "Plugin execution not covered by lifecycle configuration" for Spring Data Maven Builds" but I didn't understand them. As far as I can see, the idea is to change to take advantage of
"<lifecycleMappingMetadata>...<action><execute/>".
My straight question is: why does my below pom works when I take away pluginManagement? I guess, not sure, that I am missing a basic knowledgement about the relantionship between pluginManagement and execution. The most relevant part from my question is not what is worng with Eclipse (I found few people saying to ignore it).
I have been using pluginManagement for while but I have never wondering exactly what extra features it adds to my pom. Since now it is failing with java2ws, I am really interested to understand if there is any extra configuration I should add in my pom in order to get it up and running with pluginManagement and goal>java2ws.
<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>grp</groupId>
<artifactId>art</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>art Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
<jdk.version>1.8</jdk.version>
<cxf.version>3.1.8</cxf.version>
<spring.version>4.3.4.RELEASE</spring.version>
<!-- <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> -->
</properties>
<dependencies>
<!-- Spring dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- Apache cxf dependencies -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${cxf.version}</version>
</dependency>
<!-- servlet & jsp -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
</dependency>
</dependencies>
<build>
<finalName>art</finalName>
<!-- <pluginManagement> -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-java2ws-plugin</artifactId>
<version>${cxf.version}</version>
<executions>
<execution>
<id>process-classes</id>
<phase>process-classes</phase>
<configuration>
<className>art.VmxService</className>
<outputFile>${project.basedir}/src/main/resources/VmxService.wsdl</outputFile>
<genWsdl>true</genWsdl>
<verbose>true</verbose>
<address>http://localhost:9080/art/VmxService</address>
</configuration>
<goals>
<goal>java2ws</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<!-- </pluginManagement> -->
</build>
</project>
The pluginManagement section serves a similar purpose like the dependencyManagement section. It defines plugins and their version and configuration defaults, without actually adding them to the maven build lifecycle.
Once the plugin is added in a module it will pick up the configuration from the pluginManagement section.
Also see: Maven: What is pluginManagement?
So if a similar configuration of the same plugin is used in multiple modules you can collect them together in one place. If the plugin is only used in one module I prefer to just put it in there directly in the build. But both ways work.
Remember you also need to add the plugin to the build.plugins - simply having them in pluginManagement does nothing.
The warning in eclipse relates more to the life-cycle of your IDE. It differs a bit from the maven lifecycle and in some cases it cannot detect (or could not?) at what moment a plugin is supposed to run. Some plugins also cannot execute without a maven project. So I'm never sure what that lifecycle-mapping plugin tries to solve :/
Anyways: if you generate the classes using a maven build and this works for you (not having that done when telling eclipse to 'build' the project without maven) you're good.
I thought that information (the lifecycle mapping) is nowadays baked into the plugins directly and read by the m2eclipse plugin. I've seen such xml files in some plugins. So the lifecycle-mapping plugin might not be required anymore at all.
Related
I firstly generated a gwt maven project by executing --
mvn archetype:generate -DarchetypeGroupId=org.codehaus.mojo
-DarchetypeArtifactId=gwt-maven-plugin -DarchetypeVersion=2.7.0
After that, the pom.xml is as follows:
<?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>
<groupId>com.boye.games</groupId>
<artifactId>games-gwt</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>GWT Maven Archetype</name>
<properties>
<!-- Convenience property to set the GWT version -->
<gwtVersion>2.7.0</gwtVersion>
<!-- GWT needs at least java 1.6 -->
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt</artifactId>
<version>${gwtVersion}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<!-- Output classes directly into the webapp, so that IDEs and "mvn process-classes" update them in DevMode -->
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
<plugins>
<!-- GWT Maven Plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.7.0</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test</goal>
<goal>generateAsync</goal>
</goals>
</execution>
</executions>
<!-- Plugin configuration. There are many available options, see
gwt-maven-plugin documentation at codehaus.org -->
<configuration>
<runTarget>LineThree.html</runTarget>
<modules>
<module>com.boye.games.linethree.LineThree</module>
</modules>
</configuration>
</plugin>
</plugins>
</build>
</project>
Then I imported this project into eclipse via built-in eclipse function -- import existing Maven project.
However, the process failed due to several reasons:
GreetingServiceAsync cannot be resolved to a type
Execution default of goal org.codehaus.mojo:gwt-maven-plugin:2.7.0:generateAsync failed:
Plugin org.codehaus.mojo:gwt-maven-plugin:2.7.0 or one of its
dependencies could not be resolved: Failed to collect dependencies for
org.codehaus.mojo:gwt-maven-plugin:jar:2.7.0 ()
(org.codehaus.mojo:gwt-maven-plugin:2.7.0:generateAsync:default:generate-sources)
google plugin can't identify this project as gwt web application automatically.
My environment as follows:
java version 1.7.0_03
eclipse version Kepler Service Release 2
gwt version 2.7.0
Please advice, thanks a lot!
I did another attempt to try in a win32 computer, the problem re-appeared even if I set up the environment as aforementioned working in my win64 computer.
So I really got confused, like Klarki said, I have to do some tweaks to get it work. I generated GreetingServiceAsync via mvn gwt:generateAsync then manually copy GreetingServiceAsync to source folder, then I remove <goal>generateAsync</goal> in pom.xml, then import project via eclipse's existing maven project. It works again!
Sadly see it not working intelligently.
The problem was with generateAsync, which in your case generates GreetingServiceAsync on execution. Eclipse probably wasn't configured to handle it properly and this class was not generated and eclipse reported the missing class warning.
Another thing that could be done to get the project to work was to run mvn package from command line and add the generated dir in target dir as source dir in eclipse (vie right clicking the project and selecting New -> source folder > browsing folder name > target > generated-sources > the right folder)
Also you may run into same issue after you do mvn clean - the generated GreetingServiceAsync will be deleted and the problem may come back.
The problem exists because eclipse isn't tightly integrated with maven and uses its own build system ignoring maven targets that you don't have plugins for. What you could do is to open eclipse preferences > maven > lifecycle mappings and there you can enable generateAsync to execute.
If you copy the generated class manually you have to keep in mind that you need to update it when needed, where as it is intended to generate automatically. So you loose this convenience.
This work for me:
I deleted the local maven gwt repository, in windows 7 it's in C:\Users\.m2\repository\com\google\gwt, and then make a
mvn clean complile
so maven re-import al dependencys.
After I changed my environment as follows:
java version "1.8.0_05"
eclipse Version: Luna Release (4.4.0)
Google plugin for Eclipse 4.4
I works like a charm.
Probably, it's a version incompatibility issue.
I'm trying to get an existing project building using maven and m2eclipse. I've created a new maven project for it and imported my source files and added necessary dependencies, but I'm getting compile errors because it's defaulting to using Java 1.5 settings. I've tried updating the pom.xml file to instruct the system to use Java 1.7, following which I've told eclipse to update the project settings from maven, closed and reopened the project, and restarted eclipse to see if it would flush the information that Java 1.5 should be used, but eclipse is still insisting that the project should be compiled with 1.5. My pom.xml file is pasted 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>uk.org.dsf</groupId>
<artifactId>util-test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>util-test</name>
<description>utility classes for testing purposes</description>
<plugin> <!-- enable java 1.7 -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
<dependency>
<groupId>org.jmock</groupId>
<artifactId>jmock</artifactId>
<version>2.6.0</version>
</dependency>
<dependency>
<groupId>org.jmock</groupId>
<artifactId>jmock-junit4</artifactId>
<version>2.6.0</version>
</dependency>
<dependency>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
<version>3.3.1</version>
</dependency>
</dependencies>
</project>
Any ideas what's going wrong here?
The POM file quoted above is malformed. The <plugin> tag should be nested inside a <build><plugins> block; m2eclipse is therefore unable to find the compiler details from it. The only strange thing here is that this doesn't produce any kind of error or warning message; it should at the least be resulting in a warning that the XML file doesn't conform to its specified schema.
Another related problem I've encountered: if you specify a java version > 1.7 in eclipse Juno, the value is ignored, even if you have a Java 8 JDK configured. It appears 1.8 only works correctly in Luna, and perhaps Kepler with some updates installed (haven't tested that configuration).
I've been running through the hello world example from JIRA(https://developer.atlassian.com/display/DOCS/Getting+Started).
Eclipse (Kepler) gives me a large list of errors in the pom for my project. Specifically on the first plugin tag. All of them are some variation of
Plugin execution not covered by lifecycle configuration: com.atlassian.maven.plugins:maven-jira-
plugin:4.2.10:filter-test-plugin-descriptor (execution: default-filter-test-plugin-descriptor, phase: process-test-
resources)
with descriptions after the second colon. I think these are the goals.
I've come across this but it wasn't much help to someone who was completely new to all this.
Here is the pom that was generated by Atlassian:
<?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>
<groupId>com.atlassian.tutorial</groupId>
<artifactId>helloworld</artifactId>
<version>1.0-SNAPSHOT</version>
<organization>
<name>HelloGoodby Inc.</name>
<url>http://www.helloworldgoodbye.com</url>
</organization>
<name>helloworld</name>
<description>This is the com.atlassian.tutorial:helloworld plugin for Atlassian JIRA.</description>
<packaging>atlassian-plugin</packaging>
<dependencies>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
<!-- Add dependency on jira-core if you want access to JIRA implementation
classes as well as the sanctioned API. -->
<!-- This is not normally recommended, but may be required eg when migrating
a plugin originally developed against JIRA 4.x -->
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-core</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<!-- WIRED TEST RUNNER DEPENDENCIES -->
<dependency>
<groupId>com.atlassian.plugins</groupId>
<artifactId>atlassian-plugins-osgi-testrunner</artifactId>
<version>${plugin.testrunner.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2-atlassian-1</version>
</dependency>
<!-- Uncomment to use TestKit in your project. Details at https://bitbucket.org/atlassian/jira-testkit -->
<!-- You can read more about TestKit at https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Smarter+integration+testing+with+TestKit -->
<!-- <dependency>
<groupId>com.atlassian.jira.tests</groupId>
<artifactId>jira-testkit-client</artifactId>
<version>${testkit.version}</version>
<scope>test</scope>
</dependency> -->
<dependency>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-amps-plugin</artifactId>
<version>4.2.10</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-jira-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${jira.version}</productVersion>
<productDataVersion>${jira.version}</productDataVersion>
<!-- Uncomment to install TestKit backdoor in JIRA. -->
<!-- <pluginArtifacts> <pluginArtifact> <groupId>com.atlassian.jira.tests</groupId>
<artifactId>jira-testkit-plugin</artifactId> <version>${testkit.version}</version>
</pluginArtifact> </pluginArtifacts> -->
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<jira.version>6.1.3</jira.version>
<amps.version>4.2.10</amps.version>
<plugin.testrunner.version>1.1.2</plugin.testrunner.version>
<!-- TestKit version 5.x for JIRA 5.x, 6.x for JIRA 6.x -->
<testkit.version>5.2.26</testkit.version>
</properties>
</project>
And yet, "this" is exactly going to fix your problem for you.
While Maven just bluntly executes whatever plugins are configured, the Maven Integration (m2e) in Eclipse is a bit more reluctant in doing so. Not everything that makes sense for execution on the command-line should also be executed while within Eclipse. Now, some common plugins it will automatically take care of, but when it encounters the Atlassian plugins it seemingly does not know what to do, and wants your help with that.
Depending on the plugin in question, you can either:
Install a m2e connector for that particular plugin (which will know what to do)
Configure what to do within your POM file (pom.xml)
Configure what to do within your local Eclipse
These are given in (my) order of preference. In any case 2. makes a lot of sense, because each developer who imports your POM file will be good to go, think about that. The configuration in the POM file can either tell m2e to ignore or execute the plugin execution, and in the latter case whether to run on incremental builds (runOnIncremental).
"The link" gives examples of this configuration, which is configured as lifecycleMappingMetadata in a plugin configuration under pluginManagement of your POM. The good news is that Eclipse can help you with the three solutions above using a quick fix on the error that you're seeing.
Issue
Working with TestNG on a maven managed project, i can't seem to run tests via the TestNG eclipse plugin. When trying to run tests, the following error message pops up (inside a dialog window):
Couldn't contact the RemoteTestNG client. Make sure you don't have an
older version of testng.jar on your class path.
Reason:
Timeout while trying to contact RemoteTestNG.
How to resolve this?
Things I have tried
(After asking all my peers at the office QA department on this, and looking up information via the common search engines and on TestNG forums)
Making sure I don't have an older version on my class path (naturally).
Eliminating possible collisions between maven imported jars and jars used by the TestNG eclipse plugin (both are of version 6.7, and the project's pom.xml confirmed to use only its own dependent jar).
Performing maven update and build after said changes.
Running on a different JRE (specifically 1.7.0).
Relevant information
Environment:
OS: Win XP pro SP3
JRE: 1.6.0 update 31
TestNG: 6.7
Maven: 3.0.3
IDE: Eclipse Juno Java EE SR1
pom.xml content:
<?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>
<artifactId>SGTest</artifactId>
<name>SGTest</name>
<description>Service Grid Test project for XAP</description>
<parent>
<groupId>com.my_product.quality.sgtest</groupId>
<artifactId>SGTest-parent</artifactId>
<version>3.0.0</version>
<relativePath>http://mvn-srv:8081/artifactory/libs-snapshot-local/com/my_product/quality/sgtest/SGTest-parent/3.0.0/SGTest-parent-3.0.0.pom</relativePath>
</parent>
<properties>
<xap.home>${env.XAP_LATEST}</xap.home>
</properties>
<dependencies>
<dependency>
<groupId>com.my_product</groupId>
<artifactId>my_opensource_product</artifactId>
<version>${gsVersion}</version>
<scope>system</scope>
<systemPath>${xap.home}/lib/required/my_opensource_product.jar</systemPath>
</dependency>
<dependency>
<groupId>com.my_product</groupId>
<artifactId>gs-runtime</artifactId>
<version>${gsVersion}</version>
<scope>system</scope>
<systemPath>${xap.home}/lib/required/gs-runtime.jar</systemPath>
</dependency>
<dependency>
<groupId>com.my_product.quality</groupId>
<artifactId>DashboardReporter</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>apps</artifactId>
<version>${project.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.my_product.quality</groupId>
<artifactId>webuitf</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.my_product.quality</groupId>
<artifactId>wanem</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.my_opensource_product.xenserver</groupId>
<artifactId>xenserver-machine-provisioning</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.swift.common</groupId>
<artifactId>confluence-soap</artifactId>
<version>0.5</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.7</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-jsch</artifactId>
<version>1.8.3</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.2</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.5</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>1.8.6</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-vfs2</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.hyperic</groupId>
<artifactId>sigar</artifactId>
<version>1.6.5</version>
<scope>system</scope>
<systemPath>${xap.home}/lib/platform/sigar/sigar.jar</systemPath>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
<version>3.1.1.RELEASE</version>
</dependency>
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.10</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
</dependency>
</dependencies>
<build>
<testSourceDirectory>src/main/java</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<classpathDependencyExcludes>
<classpathDependencyExcludes>com.my_product.quality.sgtest.apps.security:processor</classpathDependencyExcludes>
<classpathDependencyExcludes>com.my_product.quality.sgtest.apps.archives:customSecurityProcessor</classpathDependencyExcludes>
<classpathDependencyScopeExclude>runtime</classpathDependencyScopeExclude>
</classpathDependencyExcludes>
<argLine>-Xmx2048m -XX:MaxPermSize=512m</argLine>
<includes>
<include>${includes}</include>
</includes>
<excludes>
<exclude>${excludes}</exclude>
</excludes>
<disableXmlReport>true</disableXmlReport>
<reportsDirectory>${sgtest.summary.dir}</reportsDirectory>
<reportFormat>xml</reportFormat>
<properties>
<property>
<name>configfailurepolicy</name>
<value>continue</value>
</property>
<property>
<name>suitename</name>
<value>${sgtest.suiteName}${sgtest.suiteId}</value>
</property>
<property>
<name>testname</name>
<value>${sgtest.suiteName}${sgtest.suiteId}</value>
</property>
<property>
<name>outputDir</name>
<value>${sgtest.summary.dir}</value>
</property>
<property>
<name>listener</name>
<value>framework.testng.SGTestNGListener,framework.testng.SGTestNgSuiteSplitter,framework.testng.report.TestNgReporterImpl</value>
</property>
</properties>
<systemProperties>
<sgtest.suiteId>${sgtest.suiteId}</sgtest.suiteId>
<sgtest.numOfSuites>${sgtest.numOfSuites}</sgtest.numOfSuites>
<selenium.browser>${selenium.browser}</selenium.browser>
<org.apache.commons.logging.Log>org.apache.commons.logging.impl.Jdk14Logger</org.apache.commons.logging.Log>
<com.gs.logging.level.config>true</com.gs.logging.level.config>
<java.util.logging.config.file>${basedir}/logging/sgtest_logging.properties</java.util.logging.config.file>
<sgtest.buildFolder>${sgtest.buildFolder}</sgtest.buildFolder>
<sgtest.url>http://192.168.9.121:8087/sgtest3.0-xap/</sgtest.url>
<sgtest.disconnect.machines>${sgtest.disconnect.machines}</sgtest.disconnect.machines>
<com.gs.work>${com.gs.work}</com.gs.work>
<com.gs.deploy>${com.gs.deploy}"</com.gs.deploy>
<cppOS>${cppOS}</cppOS>
</systemProperties>
<testFailureIgnore>true</testFailureIgnore>
<detail>true</detail>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
I was able to make the exact problem occur by configuring my TestNG launch configuration (within eclipse) incorrectly.
Specifically I specified for it to pass the following as a JVM argument:
-runTestAsTool=true
instead of
-DrunTestAsTool=true
Adding the missing D fixed it for me.
So maybe double-check how your launch configuration is configured.
This issue originates from a problem which occurs when running long Java classpaths on Windows (these exceed the process creation command limit). It had been reported on the Eclipse bug tracking system, and was also discussed here on Stackoverflow.
To work around this on Eclipse Juno releases, we can either bypass the command limit (using the solutions suggested in the above linked post), or apply the patch from the reported bug.
Ivan Sim posted the patching instructions on his coderwall, but I'll include an excerpt for the sake of completeness:
Download bug3271933.4.2hack.zip from the above link
Back up existing eclipse/plugins/org.eclipse.jdt.launching_3.4.*.jar
Copy and paste classes in the patch to org/eclipse/jdt/internal/launching in your org.eclipse.jdt.launching
JAR (replace existing files)
Edit the META-INF /MANIFEST.MF file in your org.eclipse.jdt.launching JAR file by removing everything starting
from the first "NAME:" entry. Make sure you leave two (2) line break
characters at the end of the file.
Re-start eclipse
Please make sure the Sock5 proxy on your Mac OS or Windows is turned off.
It seems TestNG tries to connect to JVM instance via creating socket to 'localhost' and in my /etc/hosts (I use linux) file I renamed localhost to something else so it bombed.
Changed back to localhost and all is good.
When I try to create Maven project with this parameters:
Archetype Group Id - org.codehaus.mojo;
Archetype Artifact Id - gwt-maven-plugin;
Archetype Version - 2.3.0-1.
I get some strange errors:
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:gwt-maven-plugin:2.3.0-1:generateAsync (execution: default, phase: generate-sources)
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:gwt-maven-plugin:2.3.0-1:i18n (execution: default, phase: generate-sources)
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-war-plugin:2.1.1:exploded (execution: default, phase: compile)
And some warnings as:
Implementation of project facet jst.web could not be found. Functionality will be limited.
Implementation of project facet wst.jsdt.web could not be found. Functionality will be limited.
This is 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/maven-v4_0_0.xsd">
<!-- POM file generated with GWT webAppCreator -->
<modelVersion>4.0.0</modelVersion>
<groupId>net.test1</groupId>
<artifactId>TestWebApp</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>GWT Maven Archetype</name>
<properties>
<!-- Convenience property to set the GWT version -->
<gwtVersion>2.3.0</gwtVersion>
<!-- GWT needs at least java 1.5 -->
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwtVersion}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<classifier>sources</classifier>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<!-- Generate compiled stuff in the folder used for developing mode -->
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
<plugins>
<!-- GWT Maven Plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.3.0-1</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test</goal>
<goal>i18n</goal>
<goal>generateAsync</goal>
</goals>
</execution>
</executions>
<!-- Plugin configuration. There are many available options, see
gwt-maven-plugin documentation at codehaus.org -->
<configuration>
<runTarget>TestWebApp.html</runTarget>
<hostedWebapp>${webappDirectory}</hostedWebapp>
<i18nMessagesBundle>net.test1.TestWebApp.client.Messages</i18nMessagesBundle>
</configuration>
</plugin>
<!-- Copy static web files before executing gwt:run -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>exploded</goal>
</goals>
</execution>
</executions>
<configuration>
<webappDirectory>${webappDirectory}</webappDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
And so on. What is this? I have tried all possible manuals on the Internet, and everywhere the same. I tried to create project manualy without eclipse and the same. I think, the problem is that manuals in the Internet was writing for old version of Eclipse, Maven, GWT. How can I beat it? How can I just create simple project with GWT 2.3, Maven2 plugin and Eclipse Indigo without errors end warnings?
This is known behavior, discussed on the eclipse wiki. See here: http://wiki.eclipse.org/M2E_plugin_execution_not_covered.
Don't just comment out the problematic sections of your pom, you really do need them. For instance The generated comment for that maven-war-plugin in the pom is "Copy static web files before executing gwt:run" This turns out to be true. If you comment out that plugin and "mvn clean gwt:run", static files will not be copied to the target folder and be unavailable to hosted mode.
Fortunately the workaround is easy. If you open up the pom in Eclipse, look in the Overview section, and click the error message at the top, it will give you some quick fix options. Such as "Permanently mark goal exploded in pom.xml as ignored." This will add some m2e configuration to your pom so it is no longer flagged as an error, and everything will work as before. The newly generated section in your pom is what is described in the link above as the "ignore" option.
Hope this helps.