there's already a deployment with the same runtime name - java

I'm trying to use the maven wildfly plugin to deploy my .war to my application server.
So I have this configured in IntelliJ, and it deploys the war for me, but I want to use maven so I can also deploy with jenkins.
When I call mvn wildfly:deploy I get the following error:
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.2.1.Final:deploy (default-cli) on project Kwetter: Failed to execute goal deploy: {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "WFLYSRV0205: There is already a deployment called Kwetter.war with the same runtime name Kwetter.war"}}
So I went to the jboss-cli.bat and tried to remove undeploy the .war.
But when I go there and call undeploy Kwetter.war I get:
Undeploy failed: {"WFLYCTL0062: Composite operation failed and was
rolled back. Steps that failed:" => {"Operation step-1" =>
"WFLYCTL0216: Management resource '[(\"deployment\" =>
\"Kwetter.war\")]' not found"}}
When I try to undeploy *.war I get the same error, so it seems that there is nothing deployed?
I also tried to add force = true in my pom.xml so it would override the already existing .war but this just gives me the same error.
I included my pom.xml for reference:
<repositories>
<repository>
<id>maven2-repository.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
<layout>default</layout>
</repository>
</repositories>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<failOnMissingWebXml>false</failOnMissingWebXml>
</properties>
<build>
<finalName>Kwetter</finalName>
<plugins>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>1.2.1.Final</version>
<configuration>
<!--change management console port-->
<port>9990</port>
<!--redeploy if exists-->
<force>true</force>
<username>newadmin</username>
<password>newadmin</password>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- The profile to execute wildfly managed integration tests.
Other profiles similar to this could be created for other container adapters-->
<id>wildfly</id>
<!-- the dependencies for Wildfly -->
<dependencies>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-arquillian-container-managed</artifactId>
<version>8.2.1.Final</version>
</dependency>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-embedded</artifactId>
<version>8.2.1.Final</version>
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
<testResource>
<directory>src/test/resources-jbossas-managed</directory>
</testResource>
</testResources>
</build>
</profile>
</profiles>
<!-- https://mvnrepository.com/artifact/javax.faces/jsf-api -->
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mockito/mockito-all -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.wildfly/wildfly-dist -->
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-dist</artifactId>
<version>11.0.0.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<version>1.3.0.Final</version>
</dependency>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-arquillian-container-managed</artifactId>
<version>8.2.1.Final</version>
</dependency>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-embedded</artifactId>
<version>8.2.1.Final</version>
</dependency>
<!--Junit-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-7.0</artifactId>
<version>1.0.3.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/javax/javaee-api -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.persistence/persistence-api -->
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.ws.rs/javax.ws.rs-api -->
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.8.9</version>
</dependency>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>1.3.0.Final</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>

I have found where the problem is.
I run application from inteiij and some time I have got error with that the application is deployed.
stop wildfy
go to sandalone.xml
remove deployments section
<deployments>
<deployment name="xxx.war" runtime-name="xxx.war">
<fs-archive path="...\xxx.war"/>
</deployment>
</deployments>

I'm not 100% sure what exactly the problem was. But I was able to find a deployment that was active in wildfly's admin console. (Why it didn't show up in CLI, I don't know). When I removed the deployment there using the UI, I was able to run the mvn deploy command, and deploy the .war. Also when I run the mvn deploy command again, it removes the old .war and put's the newly build one there.
Check this topic for reference:
How do I undeploy all artifacts from WildFly?

I recently faced this issue. I figured that standalone.xml file under JBoss installation directory had an archived deployment tag. Once I removed that it fixed the issue.

Related

Upgrading magnolia to 5.6.1, vaadin resources

After Tomcat starts Magnolia, I always get the following error:
17:04:36.781 [localhost-startStop-1] ERROR info.magnolia.module.ModuleManagerImpl - Can't start module ui-framework
com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: com/vaadin/data/util/converter/Converter$ConversionException
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2216) ~[guava-23.1-jre.jar:?]
And later when I request the admin page, I keep getting these errors.
INFO: Requested resource [/VAADIN/themes/valo/styles.css] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
Jan 23, 2018 12:50:50 PM com.vaadin.server.VaadinServlet serveStaticResourcesInVAADIN
INFO: Requested resource [/VAADIN/themes/valo/favicon.ico] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
Amongst other things, I've included everything I think I need in the dependencies for the UI framework:
<project>
<!-- ... -->
<dependency>
<groupId>info.magnolia.ui</groupId>
<artifactId>magnolia-ui-framework</artifactId>
<version>${magnoliaUiVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia.ui</groupId>
<artifactId>magnolia-ui-admincentral</artifactId>
<version>${magnoliaUiVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia.ui</groupId>
<artifactId>magnolia-ui-contentapp</artifactId>
<version>${magnoliaUiVersion}</version>
</dependency>
</project>
Edit 1:
So I've found that magnolia-resources is version 2.4 in the Magnolia Travel Demo. When you run it with this version (and Magnolia 5.6.1 Core) the login screen doesn't display the Magnolia logo. When I upgraded to version 2.6, the Magnolia logo appeared.
Edit 2:
I'm now able to login, and the admincentral is stuck on loading. After a few seconds, the following message pops up:
Failed to load the widgetset: ./../VAADIN/widgetsets/info.magnolia.widgetset.MagnoliaWidgetSet/info.magnolia.widgetset.MagnoliaWidgetSet.nocache.js?1516882029507
POM below:
<?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><!-- hidden --></groupId>
<artifactId><!-- hidden --></artifactId>
<name><!-- hidden --></name>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<description><!-- hidden --></description>
<properties>
<magnoliaVersion>5.6.1</magnoliaVersion>
<magnoliaUiVersion>5.6.1</magnoliaUiVersion>
<magnoliaDamVersion>2.3</magnoliaDamVersion>
<magnoliaPasswordManagerVersion>1.2</magnoliaPasswordManagerVersion>
<magnoliaImagingVersion>3.4</magnoliaImagingVersion>
<magnoliaCategorizationVersion>2.6</magnoliaCategorizationVersion>
<magnoliaTemplatingVersion>1.2</magnoliaTemplatingVersion>
<magnoliaResourcesVersion>2.6</magnoliaResourcesVersion>
<magnoliaFormVersion>2.4</magnoliaFormVersion>
<magnoliaSiteVersion>1.2</magnoliaSiteVersion>
<vaadinVersion>8.1.5</vaadinVersion>
<mavenCompilerVersion>3.6.1</mavenCompilerVersion>
<tomcat7Version>2.2</tomcat7Version>
</properties>
<dependencyManagement>
<dependencies>
<!-- info.magnolia -->
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-project</artifactId>
<version>${magnoliaVersion}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>info.magnolia.ui</groupId>
<artifactId>magnolia-ui-project</artifactId>
<version>${magnoliaUiVersion}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>info.magnolia.cache</groupId>
<artifactId>magnolia-cache-core</artifactId>
<version>${magnoliaVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia.site</groupId>
<artifactId>magnolia-site</artifactId>
<version>${magnoliaSiteVersion}</version>
</dependency>
<!-- info.magnolia.dam -->
<dependency>
<groupId>info.magnolia.dam</groupId>
<artifactId>magnolia-dam-templating</artifactId>
<version>${magnoliaDamVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia.dam</groupId>
<artifactId>magnolia-dam-jcr</artifactId>
<version>${magnoliaDamVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia.dam</groupId>
<artifactId>magnolia-dam-api</artifactId>
<version>${magnoliaDamVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia.dam</groupId>
<artifactId>magnolia-dam-app</artifactId>
<version>${magnoliaDamVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia.dam</groupId>
<artifactId>magnolia-dam-imaging</artifactId>
<version>${magnoliaDamVersion}</version>
</dependency>
<!-- info.magnolia.imaging -->
<dependency>
<groupId>info.magnolia.imaging</groupId>
<artifactId>magnolia-imaging</artifactId>
<version>${magnoliaImagingVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia.imaging</groupId>
<artifactId>magnolia-imaging-support</artifactId>
<version>${magnoliaImagingVersion}</version>
</dependency>
<!-- info.magnolia.passwordmanager -->
<dependency>
<groupId>info.magnolia.passwordmanager</groupId>
<artifactId>magnolia-module-password-manager</artifactId>
<version>${magnoliaPasswordManagerVersion}</version>
</dependency>
<!-- info.magnolia.resources -->
<dependency>
<groupId>info.magnolia.boms</groupId>
<artifactId>magnolia-external-dependencies</artifactId>
<version>${magnoliaVersion}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>info.magnolia.resources</groupId>
<artifactId>magnolia-resources</artifactId>
<version>${magnoliaResourcesVersion}</version>
</dependency>
<!-- info.magnolia.categorization -->
<dependency>
<groupId>info.magnolia.categorization</groupId>
<artifactId>magnolia-categorization</artifactId>
<version>${magnoliaCategorizationVersion}</version>
</dependency>
<!-- info.magnolia.templating -->
<dependency>
<groupId>info.magnolia.templating</groupId>
<artifactId>magnolia-templating-kit</artifactId>
<version>${magnoliaTemplatingVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia.templating</groupId>
<artifactId>magnolia-templating-essentials-models</artifactId>
<version>${magnoliaTemplatingVersion}</version>
</dependency>
<!-- info.magnolia.form -->
<dependency>
<groupId>info.magnolia.form</groupId>
<artifactId>magnolia-form</artifactId>
<version>${magnoliaFormVersion}</version>
</dependency>
<!-- com.vaadin -->
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-compatibility-server</artifactId>
<version>${vaadinVersion}</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-server</artifactId>
<version>${vaadinVersion}</version>
</dependency>
</dependencies>
</dependencyManagement>
<repositories>
<repository>
<id>magnolia.public</id>
<url>https://nexus.magnolia-cms.com/content/groups/public</url>
<snapshots />
</repository>
<!-- IF YOU NEED MODULES FROM THE ENTERPRISE VERSION, UNCOMMENT THE FOLLOWING REPOSITORY -->
<!--
<repository>
<id>magnolia.enterprise.releases</id>
<url>https://nexus.magnolia-cms.com/content/repositories/magnolia.enterprise.releases</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
-->
<repository>
<id>vaadin-addons</id>
<url>https://maven.vaadin.com/vaadin-addons</url>
</repository>
</repositories>
<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<profileName>default</profileName>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>${tomcat7Version}</version>
<configuration>
<path>/</path>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${mavenCompilerVersion}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<modules>
<module><!-- hidden -->-webapp</module>
<module><!-- hidden -->-blossom</module>
</modules>
</project>
Any thoughts?
Please have a look at https://documentation.magnolia-cms.com/display/DOCS56/Upgrading+to+Magnolia+5.6.x. Especially part of Vaadin8 Upgrade and BOM. I believe you have to import dependency management section from BOM project.
Hope this helps,
Cheers,

maven is not compiling test/java classes into target folder

I tried cleaning my project through maven->clean and project->clean but it didnot work. I tried changing my output folders explicitly under build path but not sure what to select for src/test/java
I also updated my testng plugin in pom.xml
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd" >
<modelVersion>4.0.0</modelVersion>
<groupId>abc</groupId>
<artifactId>xyz</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<description>Test</description>
<dependencies>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.11</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>21.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-support</artifactId>
<version>3.3.1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>3.3.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-ie-driver -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-ie-driver</artifactId>
<version>3.3.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.16</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.16</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.37</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.relevantcodes/extentreports -->
<dependency>
<groupId>com.relevantcodes</groupId>
<artifactId>extentreports</artifactId>
<version>2.41.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-firefox-driver</artifactId>
<version>3.1.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
</dependencies>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
<resources>
<resource>
<directory>src/test/resources</directory>
<filtering>false</filtering>
<includes>
<include>**/*.properties</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
Output folders for src/test/java and src/test/resources is /target/classes
and I am getting TestNG class not found in classpath error :
org.testng.TestNGException:
Cannot find class in classpath: testclass file
Earlier this code was working fine. I just tried refractoring the project by changing artifact id of maven project and from then not able to proceed.
Not sure how widely this applies, but I had success with this:
Right click > Java build path > Source
Make sure Include:(All) and Exclude:(None) is checked for all 4 folders
src/main/java
src/main/resources
src/test/java
src/test/resources
You need to add maven surefire plugin to run testNG classes. It's a miracle if you were able to run the tests earlier without this plugin. You have to add below plugin in the build phase to get going.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20.1</version>
<configuration>
<includes>
<include>Sample.java</include>
</includes>
</configuration>
</plugin>
If you don't want to include the tests manually then by default, the Surefire Plugin will automatically include all test classes with the following wildcard patterns:
"**/Test*.java"
"**/*Test.java"
"**/*Tests.java"
"**/*TestCase.java"
I think you have to convert non-maven project to maven project
right click on project->Configure->Convert it to Maven
The issue for me was that the "Skip Tests" checkbox was checked.
RClick project -> Run As -> Run Configurations -> Maven Build (select your build configuration) -> Uncheck Skip Tests checkbox
This checkbox prevents Maven from compiling tests
If you want to compile the tests, but don't want to execute them during build process, add -DskipTests in Goals

"Full Publish" does not work for publishing Dynamic Web Project on wildfly since using Maven

Since i am using maven in my JSF Project it seems that eclipse does not support "Full publish" Button correctly anymore. I was adding maven support with right-click on Project > Configure > Convert to Maven Project...
After importing required dependencies and updating Project from pom.xml Server runs correctly but publishing changes (Java Code) takes no effect. Just cleaning whole Project and Server takes effect.
Eclipse Neon.3 Release (4.6.3)
Wildfly Full Profile 10.1.0.Final
JBoss Tools 4.4.4.Final
with Embedded Maven installation (3.3.9) and m2e-wtp
I tried solutions like:
How to configure deployment from Eclipse to Wildfly or Hot deploy on JBoss - how do I make JBoss "see" the change? but none of these changes have helped.
Here is my pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Test</groupId>
<artifactId>Test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.faces</groupId>
<artifactId>jboss-jsf-api_2.2_spec</artifactId>
<version>2.2.13</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.6</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>23.0</version>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.1</version>
</dependency>
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>3.10</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
Is there a mistake e.g. in my pom.xml or any solution to restore Pulish function?

can't run maven project, build fail. Advice about Maven

i'm new in maven, i have no such time to study it at all.
i'm so sorry about my generic question.
i was programming my app with MVC JSF JPA and so on. I had problems with testing, i saw something about mocking, but i thing it is good for a team project, where i don't know all about project.
So i was searching something useful as "real case" test... i found arquillian! The faster and easier way to use arquillian is with maven. So i converted my project to a maven project.
i'm using the embedded version in Netbeans. After a clean, when i try to run my app, it return
------------------------------------------------------------------------
Building myProject 1.0-SNAPSHOT
------------------------------------------------------------------------
--- maven-dependency-plugin:2.6:copy (default) # myProject ---
--- maven-resources-plugin:2.5:resources (default-resources) # myProject ---
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
Copying 2 resources
--- maven-compiler-plugin:3.1:compile (default-compile) # myProject ---
Changes detected - recompiling the module!
Compiling 73 source files to D:\OneDrive\Documenti\NetBeansProjects\myProject\target\classes
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 18.197s
Finished at: Fri Jun 17 09:32:44 CEST 2016
Final Memory: 32M/252M
------------------------------------------------------------------------
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project myProject: Fatal error compiling: java.lang.RuntimeException: javax.annotation.processing.FilerException: Attempt to recreate a file for type model.entities.MultimediaType_ -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
This is the full stack trace:
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project eWheel: Fatal error compiling
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
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:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Fatal error compiling
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:796)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.codehaus.plexus.compiler.CompilerException: java.lang.RuntimeException: javax.annotation.processing.FilerException: Attempt to recreate a file for type model.entities.FeatureType_
at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:191)
at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:169)
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:785)
... 22 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: javax.annotation.processing.FilerException: Attempt to recreate a file for type model.entities.FeatureType_
at com.sun.tools.javac.main.Main.compile(Main.java:469)
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:132)
at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:126)
... 24 more
Caused by: java.lang.RuntimeException: javax.annotation.processing.FilerException: Attempt to recreate a file for type model.entities.FeatureType_
at org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor.process(CanonicalModelProcessor.java:407)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:793)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:722)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1700(JavacProcessingEnvironment.java:97)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1029)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1163)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1108)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:824)
at com.sun.tools.javac.main.Main.compile(Main.java:439)
... 26 more
Caused by: javax.annotation.processing.FilerException: Attempt to recreate a file for type model.entities.FeatureType_
at com.sun.tools.javac.processing.JavacFiler.checkNameAndExistence(JavacFiler.java:522)
at com.sun.tools.javac.processing.JavacFiler.createSourceOrClassFile(JavacFiler.java:396)
at com.sun.tools.javac.processing.JavacFiler.createSourceFile(JavacFiler.java:378)
at org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor.generateCanonicalModelClass(CanonicalModelProcessor.java:98)
at org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor.generateCanonicalModelClasses(CanonicalModelProcessor.java:226)
at org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor.process(CanonicalModelProcessor.java:403)
... 34 more
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>myProject</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>myProject</name>
<properties>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<!-- clip -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-bom</artifactId>
<version>2.0.0-alpha-1</version>
<scope>test</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>1.1.11.Final</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<!-- clip -->
<dependencies>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.5.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId>
<version>2.5.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<!-- clip -->
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
</dependency>
<!-- clip -->
<!-- We also need to configure Maven to run the JPA 2 annotation processor,
which is done simply by adding the Hibernate JPA metamodel generator as
a compile-only project dependency: -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>1.2.0.Final</version>
<scope>provided</scope>
</dependency>
</dependencies>
<!-- Weld EE embedded profile -->
<profiles>
<profile>
<id>arquillian-weld-ee-embedded</id>
<dependencies>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>1.0.0.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
<version>1.0.0.CR3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core</artifactId>
<version>1.1.5.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.6.4</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<!-- Weld EE embedded profile -->
<!-- Glassfish embedded profile -->
<profile>
<id>arquillian-glassfish-embedded</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-glassfish-embedded-3.1</artifactId>
<version>1.0.0.CR3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.main.extras</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>3.1.2</version>
<scope>provided</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>arquillian-payara-embedded</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-glassfish-embedded-3.1</artifactId>
<version>1.0.0.CR4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>fish.payara.extras</groupId>
<artifactId>payara-embedded-all</artifactId>
<version>4.1.1.161</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<!-- Glassfish embedded profile -->
<!-- JBoss AS profile -->
<profile>
<id>arquillian-jbossas-managed</id>
<dependencies>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>1.0.0.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-managed</artifactId>
<version>7.1.1.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.protocol</groupId>
<artifactId>arquillian-protocol-servlet</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<!-- JBoss AS profile -->
<!-- remote container Boss AS 7.1 -->
<profile>
<id>arquillian-jbossas-remote</id>
<dependencies>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>1.0.0.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-remote</artifactId>
<version>7.1.1.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.protocol</groupId>
<artifactId>arquillian-protocol-servlet</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<!-- remote container Boss AS 7.1 -->
<!-- remote container Glassfish 3.1.2 -->
<profile>
<id>arquillian-glassfish-remote</id>
<dependencies>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>1.0.0.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-api</artifactId>
<version>1.1.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-glassfish-remote-3.1</artifactId>
<version>1.0.0.CR3</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<!-- remote container Glassfish 3.1.2 -->
<!-- remote container Payara -->
<profile>
<id>arquillian-payara-remote</id>
<dependencies>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>1.0.0.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-api</artifactId>
<version>1.1.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-glassfish-remote-3.1</artifactId>
<version>1.0.0.CR4</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<!-- remote container payara-->
</profiles>
<!-- clip -->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
</configuration>
</plugin>
<!-- clip -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
</plugin>
<!-- clip -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${endorsed.dir}</outputDirectory>
<silent>true</silent>
<artifactItems>
<artifactItem>
<groupId>javax</groupId>
<artifactId>javaee-endorsed-api</artifactId>
<version>7.0</version>
<type>jar</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Read the maven output:
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
This means you have to execute maven in this way to display the exception:
mvn -X
To do this in Netbeans, open project properties, select Actions and select the action you are executing. Add -X to the Execute Goals.
Rerun the test again and you will get the real exception in the output console.
This is looking strange and could cause problems:
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-bom</artifactId>
<version>2.0.0-alpha-1</version>
<scope>test</scope>
<type>pom</type>
</dependency>
You are using an old shrinkwrap resolver in an alpha version!
Remove this dependency and just use this as a normal dependency. The version is already defined in the arquillian-bom.
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
<scope>test</scope>
</dependency>
Right click on your project, select run as -> maven build...
in goals, write:
mvn -X clean install
Found problem in your pom.xml
${project.build.directory}/endorsed
${project.build.directory} is a variable which you used but haven't defined
you can do it like this
<properties>
<project.build.directory>your build directory here</project.build.directory>
</properties>

ErrorListener missing when using maven-jaxb-plugin with eclipse and m2e

I have setup a project just for the plugin "org.jvnet.jaxb2.maven2:maven-jaxb2-plugin". It works but I don't like the error message displayed within the Eclipse editor for the "pom.xml". The message states:
Execution default of goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.13.1:generate failed: A required class was missing while executing org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.13.1:generate: com/sun/xml/bind/api/ErrorListener
The pom and by this the whole project ist marked to be in error.
Here is my pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.gombers.lernen.jaxb</groupId>
<artifactId>PlayWithJAXB</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<show>private</show>
<nohelp>true</nohelp>
</configuration>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.13.1</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<extension>true</extension>
<useDependenciesAsEpisodes>true</useDependenciesAsEpisodes>
<outputDirectory>target/generated-sources/jaxb</outputDirectory>
<packageName>de.gombers.lernen.jaxb.generated</packageName>
<schemaDirectory>src/main/resources</schemaDirectory>
<schemaFiles>Employee.xsd</schemaFiles>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<!-- JAXB -->
<dependency>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin-core</artifactId>
<version>0.13.1</version>
</dependency>
<dependency>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb22-plugin</artifactId>
<version>0.13.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0.9</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-settings</artifactId>
<version>2.0.9</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<version>1.0-alpha-9-stable-1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.2.7</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.7</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.7</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-jxc</artifactId>
<version>2.2.7</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId>
<version>2.2.7</version>
</dependency>
<!-- HELPERS -->
<dependency>
<groupId>de.gombers</groupId>
<artifactId>BasicTools</artifactId>
<version>1.0.0</version>
</dependency>
<!-- LOGGING -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.13</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.2</version>
</dependency>
<!-- JUNIT -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.4</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<!-- JSON converter -->
<dependency>
<artifactId>jackson-core</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
<version>2.3.3</version>
</dependency>
<dependency>
<artifactId>jackson-annotations</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
<version>2.3.3</version>
</dependency>
<dependency>
<artifactId>jackson-databind</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
<version>2.3.3</version>
</dependency>
</dependencies>
</project>
My "mvn validate" command does not state any error, and the claimed ErrorListener is provided with the artifact "com.sun.xml.bind:jaxb-core". And as already said, when running the project to generate sources it works fine. Has anybody running this plugin and can share his pom.xml?
Updating Plugin to version 0.13.3 fixes this issue.
I resolved this issue by removing any JREs from my Eclipse preferences (Java > Installed JREs) and only leaving the selected JDK there. Even though the JREs were not selected, they still cause the issue and have to be removed. I was able to leave the JREs on my system.
This post was helpful: http://diggingthroughcode.blogspot.ca/2016/05/trouble-with-maven-jaxb2-plugin-and.html
[Update]
Another coworker just ran into this and for him it seemed the critical factor was which Java was being used to run Eclipse. It won't use what JAVA_HOME is configured too, but the first Java runtime available. He removed all jres from his system and only left a jdk and that resolved the issue. I believe the critical factor is whether eclipse is running with a jre or a jdk. When I resolved the issue I did remove one jre from my system and this was likely what eclipse had been using. With this jre missing it switched to a jdk even though I had other jres available. If you don't want to remove jres from your system you can specify what java runtime eclipse should use (How to run eclipse with different java version?). If nothing is specified eclipse will determine the java runtime to use (Find out what JVM Eclipse is running on).
This problem was caused by eclipse running on a JRE instead of a JDK.
Edit your eclipse.ini and point to a suitable JDK - for example
-vm C:/Program Files (x86)/Java/jdk1.7.0_55/bin/javaw.exe
Same problem here - solved it when I decrease the version.
From :
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.13.1</version>
To:
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.8.1</version>
EDIT:
I tried everything else :
-Deleting all the JRE from Eclipse
-Starting Eclipse with JDK
EDIT2:
Check your .m2 folder. Find the problematic jar and check its size. In some situations Maven could have not download the dependency properly and the .jar can exist but have 0kb size. IF SO: Delete the .jar and let Maven download it again.
You can try
<build>
<pluginManagement>
<plugins>
<plugin> ... </plugin>
<plugin> ... </plugin>
....
</plugins>
</pluginManagement>
</build>
I had a similar problem:
Execution default of goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.13.3:generate failed: Prefix '' is already bound to ''
In my case this was due to using Java 10 on a Java 8 project. Switching to the correct Java version resolved it.
I had the same problem, I know It could be kind of silly but try checking if the all resources (wsdl and xsd) are available in the url that you are giving in the pom.xml

Categories