Error when building with maven: A required class was missing - maven

While build the maven application(2.0.4). I got the following build error in POM.xml(eclipse):
Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources failed: A required class was missing while executing org.apache.maven.plugins:maven-resources-plugin:2.6:resources: org/apache/maven/shared/filtering/MavenFilteringException
-----------------------------------------------------
realm = plugin>org.apache.maven.plugins:maven-resources-plugin:2.6
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/C:/Users/NM28088/.m2/repository/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.jar
urls[1] = file:/C:/Users/NM28088/.m2/repository/org/codehaus/plexus/plexus-utils/1.4.1/plexus-utils-1.4.1.jar
urls[2] = file:/C:/Users/NM28088/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
Number of foreign imports: 1
import: Entry[import from realm ClassRealm[maven.api, parent: null]]
-----------------------------------------------------
(org.apache.maven.plugins:maven-resources-plugin:2.6:resources:default-resources:process-resources)
What could be the problem?

Related

"Dependency problems found" when `mvn clean install` a che plugin project

I downloaded the che plugin project example che-ide-server-extension. It works when mvn clean install. But when I add a dependency in
che-ide-server-extension/plugins/plugin-serverservice/plugin-serverservice-ide/pom.xml
, it fails to install.
The dependency I added is
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-ide-ui</artifactId>
</dependency>
And the error message of mvn clean install -e -X is:
...
[WARNING] Unused declared dependencies found:
[WARNING] org.eclipse.che.core:che-core-ide-ui:jar:6.16.0:compile
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Plugin ServerService :: Parent pom ................. SUCCESS [ 2.174 s]
[INFO] Plugin ServerService :: Plugins :: Parent ......... SUCCESS [ 0.064 s]
[INFO] Plugin ServerService :: Plugin :: Parent ........... SUCCESS [ 1.382 s]
[INFO] Plugin ServerService :: Plugin :: Server ........... SUCCESS [ 3.827 s]
[INFO] Plugin ServerService :: Plugin :: IDE .............. FAILURE [ 4.870 s]
[INFO] Plugin ServerService :: Che Assembly :: Assembly Parent SKIPPED
[INFO] Plugin ServerService :: Che Assembly :: Workspace Agent Assembly SKIPPED
[INFO] Plugin ServerService :: Che Assembly :: Workspace Agent Tomcat Assembly SKIPPED
[INFO] Plugin ServerService :: Che Assembly :: IDE Assembly SKIPPED
[INFO] Plugin ServerService :: Che Assembly :: Assemblies Tomcat SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.925 s
[INFO] Finished at: 2019-07-10T10:48:43+08:00
[INFO] Final Memory: 75M/1321M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.0.1:analyze-only (analyze) on project plugin-serverservice-ide: Dependency problems found -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.0.1:analyze-only (analyze) on project plugin-serverservice-ide: Dependency problems found
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Dependency problems found
at org.apache.maven.plugins.dependency.analyze.AbstractAnalyzeMojo.execute(AbstractAnalyzeMojo.java:261)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
[ERROR]
[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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :plugin-serverservice-ide
I don't think I added a wrong dependency. Because when I
import org.eclipse.che.ide.ui.dialogs.DialogFactory;
in my java code, che says
The import org.eclipse.che.ide.ui.dialogs cannot be resolved.
But after I added the dependency, che can recognize it.
I don't know why this happens... The error message says Dependency problems found, but it didn't point out the real problem...
I've just checked and I didn't face any issues you mentioned above.
This my changes for the project:
diff --git a/plugins/plugin-serverservice/plugin-serverservice-ide/pom.xml b/plugins/plugin-serverservice/plugin-serverservice-ide/pom.xml
index 1237c6e..a5eed89 100644
--- a/plugins/plugin-serverservice/plugin-serverservice-ide/pom.xml
+++ b/plugins/plugin-serverservice/plugin-serverservice-ide/pom.xml
## -28,6 +28,10 ##
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
</dependency>
+<dependency>
+ <groupId>org.eclipse.che.core</groupId>
+ <artifactId>che-core-ide-ui</artifactId>
+</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-commons-gwt</artifactId>
diff --git a/plugins/plugin-serverservice/plugin-serverservice-ide/src/main/java/org/eclipse/che/sample/ide/MyServiceClient.java b/plugins/plugin-serverservice/plugin-serverservice-ide/src/main/java/org/eclipse/che/sample/ide/MyServiceClient.java
index cb1cf58..0def9c2 100644
--- a/plugins/plugin-serverservice/plugin-serverservice-ide/src/main/java/org/eclipse/che/sample/ide/MyServiceClient.java
+++ b/plugins/plugin-serverservice/plugin-serverservice-ide/src/main/java/org/eclipse/che/sample/ide/MyServiceClient.java
## -8,13 +8,15 ##
*/
package org.eclipse.che.sample.ide;
-import javax.inject.Inject;
import org.eclipse.che.api.promises.client.Promise;
import org.eclipse.che.ide.api.app.AppContext;
import org.eclipse.che.ide.rest.AsyncRequestFactory;
import org.eclipse.che.ide.rest.StringUnmarshaller;
+import org.eclipse.che.ide.ui.dialogs.DialogFactory;
import org.eclipse.che.ide.ui.loaders.request.LoaderFactory;
+import javax.inject.Inject;
+
/**
* Client for consuming the sample server service.
*
## -25,6 +27,7 ## public class MyServiceClient {
private AppContext appContext;
private AsyncRequestFactory asyncRequestFactory;
private LoaderFactory loaderFactory;
+ private DialogFactory dialogFactory;
/**
* Constructor.
## -38,8 +41,10 ## public class MyServiceClient {
public MyServiceClient(
final AppContext appContext,
final AsyncRequestFactory asyncRequestFactory,
- final LoaderFactory loaderFactory) {
+ final LoaderFactory loaderFactory,
+ final DialogFactory dialogFactory) {
+ this.dialogFactory = dialogFactory;
this.appContext = appContext;
this.asyncRequestFactory = asyncRequestFactory;
this.loaderFactory = loaderFactory;
## -52,6 +57,7 ## public class MyServiceClient {
* #return a Promise containing the server response
*/
public Promise<String> getHello(String name) {
+ this.dialogFactory.createChoiceDialog("1", "2", "", "", null, null);
return asyncRequestFactory
.createGetRequest(appContext.getWsAgentServerApiEndpoint() + "/hello/" + name)
.loader(loaderFactory.newLoader("Waiting for hello..."))

Getting test file resource with maven

I'm trying to get a json file resource in order to use it to build a java object. When I try to run my code in the Intellij I don't have any problem, but when I run with mvn test I get the follow error.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project cadastur-backend-business: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: There was an error in the forked process
[ERROR] java.lang.RuntimeException: Unable to create test class 'guiaVOTemplate.json'
[ERROR] at org.apache.maven.surefire.util.DefaultScanResult.loadClass(DefaultScanResult.java:135)
[ERROR] at org.apache.maven.surefire.util.DefaultScanResult.applyFilter(DefaultScanResult.java:95)
[ERROR] at org.apache.maven.surefire.junit4.JUnit4Provider.scanClassPath(JUnit4Provider.java:222)
[ERROR] at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:107)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[ERROR] Caused by: java.lang.ClassNotFoundException: guiaVOTemplate.json
[ERROR] at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[ERROR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[ERROR] at org.apache.maven.surefire.util.DefaultScanResult.loadClass(DefaultScanResult.java:131)
[ERROR] ... 6 more
[ERROR] -> [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/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :cadastur-backend-business
The project has the follow structure:
Project Structure Image
And above has the code where I'm trying to read the file and convert the json to java object.
package br.gov.mtur.cadastur.builder;
import br.gov.mtur.cadastur.vo.*;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
public class GuiaVOBuilder {
private GuiaVO guia;
public GuiaVOBuilder() {
this.guia = new GuiaVO();
}
public GuiaVOBuilder comId(Integer id) {
guia.setId(id);
return this;
}
public GuiaVOBuilder comPessoaFisica(PessoaFisicaVO pessoaFisica) {
guia.setPessoaFisica(pessoaFisica);
return this;
}
... //Builder methods
public GuiaVO build(){
return guia;
}
public GuiaVO buildGuiaCompleto() throws IOException {
return new ObjectMapper().readValue(GuiaVOBuilder.class.getResource("/guiaVOTemplate.json"), GuiaVO.class);
}
}
I find my mistake, in the main pom.xml, the maven-surefire-plugin was including all files, so because this I was getting Unable to create test class 'guiaVOTemplate.json'. So I could resolve this putting files with extension .json in the exclude list, as bellow. And my guiaVOTemplate.json remains in src/test/resources.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<includes>
<include>**/*</include>
</includes>
<excludes>
<exclude>**/*.json</exclude>
</excludes>
</configuration>
</plugin>
Copy the guiaVOTemplate.json file to src\main\resources and it should work.

ExtentReports error on compiling through Maven

I'm trying to do mvn install from cmd and then i starts compiling the files and then i get the following error which leads to Build failure.
[INFO] Compiling 5 source files to C:\workspace\tes\target\test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/workspace/tes/src/test/java/Test/tes/MyHomepageTestCases/HomeTestCases.java:[17,39] package com.relevantcodes.extentreports does not exist
[ERROR] /C:/workspace/tes/src/test/java/Test/tes/MyHomepageTestCases/HomeTestCases.java:[18,39] package com.relevantcodes.extentreports does not exist
[ERROR] /C:/workspace/tes/src/test/java/Test/tes/MyHomepageTestCases/HomeTestCases.java:[19,39] package com.relevantcodes.extentreports does not exist
[ERROR] /C:/workspace/tes/src/test/java/Test/tes/MyHomepageTestCases/HomeTestCases.java:[31,9] cannot find symbol
symbol: class ExtentReports
location: class Test.tes.MyHomepageTestCases.HomeTestCases
[ERROR] /C:/workspace/tes/src/test/java/Test/tes/MyHomepageTestCases/HomeTestCases.java:[32,9] cannot find symbol
symbol: class ExtentTest
location: class Test.tes.MyHomepageTestCases.HomeTestCases
[ERROR] /C:/workspace/tes/src/test/java/Test/tes/MyHomepageTestCases/HomeTestCases.java:[45,28] cannot find symbol
symbol: class ExtentReports
location: class Test.tes.MyHomepageTestCases.HomeTestCases
[ERROR] /C:/workspace/tes/src/test/java/Test/tes/MyHomepageTestCases/HomeTestCases.java:[47,26] cannot find symbol
symbol: variable LogStatus
location: class Test.tes.MyHomepageTestCases.HomeTestCases
[INFO] 7 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
Below is my code in eclipse where i have already imported the extentreport:
import com.relevantcodes.extentreports.ExtentReports;
import com.relevantcodes.extentreports.ExtentTest;
import com.relevantcodes.extentreports.LogStatus;
import Test.tes.Login.LoginPage;
import Test.tes.MyHomepage.Home;
import Test.tes.Utils.AppUtils;
import Test.tes.Utils.BaseTestSetup;
public class HomeTestCases extends BaseTestSetup { //use of inheritance
private static Logger log=Logger.getLogger(HomeTestCases.class);
private LoginPage lpobj = null;
private Home homeObj = null;
ExtentReports extent;
ExtentTest test;

Trouble building apache mesos with jdk 1.8.0

I am new to apache mesos, while installing with JDK 1.8.0 receive the following error
“[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:21 min
[INFO] Finished at: 2014-07-22T21:27:56+05:30
[INFO] Final Memory: 23M/78M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.8.1:jar (build-and-attach-javadocs) on project mesos: MavenReportException: Error while creating archive:
[ERROR] Exit code: 1 - /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Executor.java:41: error: reference not found
[ERROR] * data to it's executors through the {#link ExecutorInfo#data}
[ERROR] ^
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Executor.java:73: error: reference not found
[ERROR] * via {#link Scheduler#launchTasks}. Note that this task can be
[ERROR] ^
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Executor.java:81: warning - Tag #link: can't find launchTasks in org.apache.mesos.Scheduler
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Executor.java:50: warning - Tag #link: can't find data in org.apache.mesos.Protos.ExecutorInfo
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Log.java:251: warning: no #param for identity
[ERROR] public Position position(byte[] identity) {
[ERROR] ^
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Log.java:251: warning: no #return
[ERROR] public Position position(byte[] identity) {
[ERROR] ^
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Log.java:65: warning: no #return
[ERROR] public byte[] identity() {
[ERROR] ^
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Log.java:149: warning: no #param for from
[ERROR] public native List<Entry> read(Position from,
[ERROR] ^
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Log.java:149: warning: no #param for to
[ERROR] public native List<Entry> read(Position from,
[ERROR] ^
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Log.java:149: warning: no #param for timeout
[ERROR] public native List<Entry> read(Position from,
[ERROR] ^
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Log.java:149: warning: no #param for unit
[ERROR] public native List<Entry> read(Position from,
[ERROR] ^
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Log.java:149: warning: no #return
[ERROR] public native List<Entry> read(Position from,
[ERROR] ^
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Log.java:149: warning: no #throws for java.util.concurrent.TimeoutException
[ERROR] public native List<Entry> read(Position from,
[ERROR] ^
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Log.java:149: warning: no #throws for org.apache.mesos.Log.OperationFailedException
[ERROR] public native List<Entry> read(Position from,
[ERROR] ^
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Log.java:159: warning: no #return
[ERROR] public native Position beginning();
[ERROR] ^
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Log.java:165: warning: no #return
[ERROR] public native Position ending();
[ERROR] ^
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Log.java:191: warning: no #param for data
[ERROR] public native Position append(byte[] data, long timeout, TimeUnit unit)
[ERROR] ^
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Log.java:191: warning: no #param for timeout
[ERROR] public native Position append(byte[] data, long timeout, TimeUnit unit)
[ERROR] ^
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Log.java:191: warning: no #param for unit
[ERROR] public native Position append(byte[] data, long timeout, TimeUnit unit)
[ERROR] ^
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Log.java:191: warning: no #return
[ERROR] public native Position append(byte[] data, long timeout, TimeUnit unit)
[ERROR] ^
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Log.java:191: warning: no #throws for java.util.concurrent.TimeoutException
[ERROR] public native Position append(byte[] data, long timeout, TimeUnit unit)
[ERROR] ^
[ERROR] /vol1/mesos-0.19.0/build/../src/java/src/org/apache/mesos/Log.java:191: warning: no #throws for org.apache.mesos.Log.WriterFailedException
While running it with JDK 1.7 it works fine
Is there anything I am missing to make it work with 1.8 or this is not currently supported ?
Any advice please.
There're missing javadoc annotations in ./src/java/mesos.pom.in
Read more here

org.codehaus.mojo : jaxb2-maven-plugin : 1.6 --> API incompatibility was encountered

when using
jaxb2-maven-plugin from codehaus i get the following problem marker in eclipse
the content of this marker contains the following:
Description Resource Path Location Type
Execution configuration of goal org.codehaus.mojo:jaxb2-maven-plugin:1.6:xjc failed: An API incompatibility was encountered while executing org.codehaus.mojo:jaxb2-maven-plugin:1.6:xjc: java.lang.NoSuchMethodError: org.codehaus.plexus.util.DirectoryScanner.setupMatchPatterns()V
-----------------------------------------------------
realm = plugin>org.codehaus.mojo:jaxb2-maven-plugin:1.6
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/C:/develop/maven/repository/org/codehaus/mojo/jaxb2-maven-plugin/1.6/jaxb2-maven-plugin-1.6.jar
urls[1] = file:/C:/develop/maven/repository/org/slf4j/slf4j-jdk14/1.5.6/slf4j-jdk14-1.5.6.jar
urls[2] = file:/C:/develop/maven/repository/org/slf4j/slf4j-api/1.5.6/slf4j-api-1.5.6.jar
urls[3] = file:/C:/develop/maven/repository/org/slf4j/jcl-over-slf4j/1.5.6/jcl-over-slf4j-1.5.6.jar
urls[4] = file:/C:/develop/maven/repository/org/apache/maven/reporting/maven-reporting-api/2.2.1/maven-reporting-api-2.2.1.jar
urls[5] = file:/C:/develop/maven/repository/org/apache/maven/doxia/doxia-sink-api/1.1/doxia-sink-api-1.1.jar
urls[6] = file:/C:/develop/maven/repository/org/apache/maven/doxia/doxia-logging-api/1.1/doxia-logging-api-1.1.jar
urls[7] = file:/C:/develop/maven/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar
urls[8] = file:/C:/develop/maven/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
urls[9] = file:/C:/develop/maven/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
urls[10] = file:/C:/develop/maven/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
urls[11] = file:/C:/develop/maven/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
urls[12] = file:/C:/develop/maven/repository/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
urls[13] = file:/C:/develop/maven/repository/com/sun/xml/bind/jaxb-xjc/2.2.7/jaxb-xjc-2.2.7.jar
urls[14] = file:/C:/develop/maven/repository/com/sun/xml/bind/jaxb-core/2.2.7/jaxb-core-2.2.7.jar
urls[15] = file:/C:/develop/maven/repository/javax/xml/bind/jaxb-api/2.2.7/jaxb-api-2.2.7.jar
urls[16] = file:/C:/develop/maven/repository/com/sun/istack/istack-commons-runtime/2.16/istack-commons-runtime-2.16.jar
urls[17] = file:/C:/develop/maven/repository/com/sun/xml/bind/jaxb-jxc/2.2.7/jaxb-jxc-2.2.7.jar
urls[18] = file:/C:/develop/maven/repository/com/sun/xml/bind/jaxb-impl/2.2.7/jaxb-impl-2.2.7.jar
urls[19] = file:/C:/develop/maven/repository/com/sun/xml/fastinfoset/FastInfoset/1.2.12/FastInfoset-1.2.12.jar
urls[20] = file:/C:/develop/maven/repository/org/codehaus/plexus/plexus-compiler-api/1.9.1/plexus-compiler-api-1.9.1.jar
urls[21] = file:/C:/develop/maven/repository/org/codehaus/plexus/plexus-utils/3.0.16/plexus-utils-3.0.16.jar
Number of foreign imports: 4
import: Entry[import org.sonatype.plexus.build.incremental from realm ClassRealm[plexus.core, parent: null]]
import: Entry[import org.codehaus.plexus.util.Scanner from realm ClassRealm[plexus.core, parent: null]]
import: Entry[import org.codehaus.plexus.util.AbstractScanner from realm ClassRealm[plexus.core, parent: null]]
import: Entry[import from realm ClassRealm[maven.api, parent: null]]
-----------------------------------------------------
(org.codehaus.mojo:jaxb2-maven-plugin:1.6:xjc:configuration:generate-sources) pom.xml
the configuration of the plugin looks like this:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>data</id>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<schemaDirectory>${project.basedir}/src/main/resources</schemaDirectory>
<schemaFiles>WebServiceDataSchema.xsd</schemaFiles>
<packageName>my.cool.package.jaxb.data</packageName> <!-- The name of your generated source package -->
<outputDirectory>${project.basedir}/src/gen/java</outputDirectory>
<target>2.1</target>
</configuration>
</execution>
<execution>
<id>configuration</id>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<schemaDirectory>${project.basedir}/src/main/resources</schemaDirectory>
<schemaFiles>WebServiceConfigurationSchema.xsd</schemaFiles>
<packageName>my.cool.package.jaxb.config</packageName> <!-- The name of your generated source package -->
<outputDirectory>${project.basedir}/src/gen/java</outputDirectory>
<target>2.1</target>
<clearOutputDir>false</clearOutputDir>
</configuration>
</execution>
</executions>
</plugin>
does anyone have similar problems?
I got a similar error. I solved it using version 1.5 (instead of 1.6) of jaxb2-maven-plugin.
m2e doesn't seem to handle multiple execution blocks with the 1.6 plugin. Command line maven runs these forms correctly, though. If you back up to the 1.5 jaxb plugin, m2e is happy, but the plugin only runs the first of the execution blocks, leaving you with a different broken build.
My solution (so far) is to not use m2e, though that is obviously non-optimal.
I had the same problem. I solved it by updating to the newest Eclipse Luna 4.4 (Java Developer version which includes m2e-wtp, not the Java EE version). I guess it includes a newer version of m2e-wtp which fixes this issue(?!)

Resources