I have to override dependency in maven plugin: org.apache.maven.plugins:maven-site-plugin:maven-plugin:3.9.1 and in this plugin I have dependency commons-beanutils:commons-beanutils:jar:1.7.0 and I have to override version to ver 1.9.4 and I added dependencies tag with new version of commons-utils but it still doesn't override. When I run mvn dependency:resolve-plugins I still see old version
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.9.1</version>
<dependencies>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.4</version>
</dependency>
</dependencies>
</plugin>
[INFO] org.apache.maven.plugins:maven-site-plugin:maven-plugin:3.3:runtime
[INFO] commons-beanutils:commons-beanutils:jar:1.7.0
As we can see in this log common beanutils is nessesery
[INFO] --- maven-dependency-plugin:3.1.2:resolve-plugins (default-cli) # everything ---
Downloading from central: https://repo.maven.apache.org/maven2/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.pom
Downloaded from central: https://repo.maven.apache.org/maven2/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.pom (357 B at 645 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar
Downloaded from central: https://repo.maven.apache.org/maven2/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar (189 kB at 586 kB/s)
And I found where this beanutils is used
org.apache.maven.reporting:maven-reporting-impl:2.3
commons-validator:commons-validator:1.3.1
commons-beanutils:commons-beanutils:1.7.0
maven dependency tree doesn't have any beanutils
and plugins which I'm using are:
org.codehaus.mojo.jaxb2-maven-plugin.2.3.1
org.apache.maven.plugin
org.springframework.boot.spring-boot-maven-plugin
org.jacoco.jacoco-maven-plugin.0.8.7
Thanks in advance for help
You can double check your dependencies one by one to find more dependencies which are using maven-reporting-impl:2.3. Somehow I think what could be reason for that is jaxb2-maven-plugin.2.3.1. The maven-checkstyle-plugin is defined in the pom of the plugin. It has a dependence to maven-reporting-impl:2.3
jaxb2-maven-plugin
<reporting>
<plugins>
<!-- Apache plugins in alphabetical order -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven-checkstyle-plugin.version}</version>
<configuration>
<skip>true</skip>
<configLocation>config/maven_checks.xml</configLocation>
<headerLocation>config/maven-header.txt</headerLocation>
</configuration>
</plugin>
</plugins>
</reporting>
maven-checkstyle-plugin
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
<version>2.3</version>
<exclusions>
<exclusion>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
</exclusion>
</exclusions>
</dependency>
You are not possible to override as it comes from another project
Related
I know this is a duplicate question but the answers on other topics didn't help me.
I'm using Eclipse Photon, Java Version :10, I've set jdk/jre versions on 10 in eclipse and pom.xml file. I've changed eclipse.ini file :
-Dosgi.requiredJavaVersion=10 (it was set to 1.8)
and also I've added plugin in my pom.xml :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>10</source>
<target>10</target>
</configuration>
</plugin>
Nothing helped. This 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>com.luv2code</groupId>
<artifactId>spring-security-demo-06-user-roles</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<name>spring-security-demo</name>
<properties>
<maven.compiler.source>10</maven.compiler.source>
<maven.compiler.target>10</maven.compiler.target>
</properties>
<dependencies>
<!-- Spring Security -->
<!-- Spring Security WEB -->
<!-- Spring Security taglibs -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>5.1.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>5.1.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-taglibs</artifactId>
<version>5.1.1.RELEASE</version>
</dependency>
<!-- Spring MVC support -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>5.1.2.RELEASE</version>
</dependency>
<!-- Servlet, JSP and JSTL support -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</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.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<!-- TO DO: Add support for Maven WAR Plugin -->
<build>
<finalName>spring-security-demo</finalName>
<pluginManagement>
<plugins>
<plugin>
<!-- Add Maven coordinates forL maven-war-plugin -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>10</source>
<target>10</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
The dependencies aren't being read in class files and also I've tried deleting .m2 repository and starting Eclipse and doing the : Maven->Clean, Maven->install, and than Maven->update project. Nothing helped. I'm really stuck here for about 2-3 hours now.
Note: in Windows->Preferences->installed JRE's the jre10 was marked with the tick. I changed it to mark the jdk10. but still error :
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project spring-security-demo-06-user-roles: Compilation failure
Everything was working fine until I added the dependency of : spring-security-taglibs.
Deleting the dependency doesn't do anything aswell.
Check properly settings with version of your project in eclipse and version of your runner for maven.
I have reproduced the same issue with maven-compiler plugin, but using version 3.8.1:
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project testName: Fatal error compiling
My POM was:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
To clarify:
in project I'm using Java 11 and IntelijIDEA (but logic I think the same for eclipse). So I'm using maven lifecycle phases fine only if my version of project (check properly Project Structure -> Project Settings) corresponds to version of maven runner.
E.g. if version of runner is for java 8, but project settings are for Java 11 then I'm getting this error. If I have the same for both then I don't have any problems.
And I highly recommend to check all settings for maven and the whole project. It helps to avoid the issues in the future. Deleting folder for maven is as alternative solution, but it must be last thing that you need to do.
It started working Automagically . FIX : delete .m2 repository.
I did that yesterday but it didn't help, today somehow, deleting the .m2 repository and updating the project helped !
Confirm, delete your entire local repository pointed to by .m2/settings.xml, usually this is .m2/repository
I updated my Java SDK to 11.9 and reloaded the project. With this I solved my problem.
I had the same issue, it was because the Spring Boot project was using Java 11 but my %JAVA_HOME% variable was pointing to Java 8 home directory. I resolved the issue by changing the path to %JAVA_HOME% variable.
You just need to go to preference(eclipse in this case) and change the right version of JDK like below in pic:
I have a project that uses Netty 4.0.29 and I have another dependency that pulls in netty 3.9.0. I put in an exclusion but it is still roping in 3.9.0 when I run copy-dependencies.
<dependency>
<groupId>com.ning</groupId>
<artifactId>async-http-client</artifactId>
<version>1.9.31</version>
<exclusions>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
</exclusions>
</dependency>
If I run mvn dependency:tree with this exclusion in place, I see that it is indeed excluded:
[INFO] +- com.ning:async-http-client:jar:1.9.31:compile
But when I run mvn clean dependency:copy-dependencies I see the jar 3.9.0 being copied along with the 4.0.29. According to the documentation and Google, this should not copy when there is an exclusion.
[INFO] Copying netty-3.9.0.Final.jar to /Users/udonom1/wk/141/coursecopy-api/target/dependency/netty-3.9.0.Final.jar
[INFO] Copying netty-all-4.0.29.Final.jar to /Users/udonom1/wk/141/coursecopy-api/target/dependency/netty-all-4.0.29.Final.jar
I tried excluding as suggested by the first answer below and that did not work.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>process-sources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration> <outputDirectory>${project.build.directory}/lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<excludeArtifactIds>io.netty:netty:3.9.0.Final</excludeArtifactIds>
</configuration>
</execution>
</executions>
</plugin>
I also added a dependency as further suggested:
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.0.29.Final</version>
</dependency>
What am I doing wrong?
For those who are having the same issue. I used mvn -X and discovered that dependency:tree is omitting two other jars that are referencing netty. I added exclusions for those and I'm good to go. Spent a whole day on this.
If you are writing not library you have simple way to control versions of any dependency in your project - dependencyManagement block in root pom file, example:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
<version>4.0.29.Final</version>
</dependency>
</dependencies>
</dependencyManagement>
Additional bonuses from this block - you can omit version and scope for dependency in concrete dependency (with same group id, artifact id and packaging).
PS another look to your dependencies make me ask you: are you sure that this dependency have single maven artifact id? netty-all-4.0.29.Final.jar - seems that this artifact should have netty-all artifact id... If they have different artifact id's my recipe wouldn't help. In this case you should define build configuration for maven-dependency-plugin, example:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<configuration>
<excludeArtifactIds>io.netty:netty:3.9.0.Final</excludeArtifactIds>
</configuration>
</plugin>
</plugins>
</build>
or just use -DexcludeArtifactIds parameter in your maven call
I have a rest Spring Boot REST API that I want to test. I can run the tests manually in Eclipse (without maven and by running the application as JUnit test) and it runs fine and displays the results, but mvn test does not "work" as you will find out below.
Here is my POM file:
http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
<groupId>org.demo</groupId>
<artifactId>rest</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>UserRegistrationServices</name>
<description>RESTful API</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.5.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<!-- Junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!-- Spring dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<!-- To deploy to external servlet container -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<!-- For Spring Boot testing -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.restassured</groupId>
<artifactId>rest-assured</artifactId>
<version>2.4.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.restassured</groupId>
<artifactId>json-schema-validator</artifactId>
<version>2.4.1</version>
<scope>test</scope>
</dependency>
<!-- For returning objects as JSON -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.5.4</version><!--$NO-MVN-MAN-VER$ -->
</dependency>
<dependency>
<groupId>com.fasterxml</groupId>
<artifactId>jackson-xml-databind</artifactId>
<version>0.6.2</version>
</dependency>
<!-- To decode Base64 data -->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.10</version>
</dependency>
</dependencies>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<url>http://repo.spring.io/snapshot</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
This is the result of mvn test:
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building UserRegistrationServices 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # rest ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # rest ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 9 source files to C:\Users\pmandayam\git\UserRegistrationServices\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # rest ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\pmandayam\git\UserRegistrationServices\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # rest ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\pmandayam\git\UserRegistrationServices\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) # rest ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.768 s
[INFO] Finished at: 2015-07-28T12:07:41-05:00
[INFO] Final Memory: 24M/212M
[INFO] ------------------------------------------------------------------------
Here is a segment of my TestController.java class in src/test/java:
#Test
public void f_findByUsername() {
// Finding user with username 'user1username'
given().auth().basic("User1username", "Testpassword").when().get(
"http://localhost:8080/users/get/ByUsername?username=User1username")
.then().assertThat().body("username", is("User1username"));
}
At the top of the TestController class I have these annotations:
#RunWith(SpringJUnit4ClassRunner.class)
#SpringApplicationConfiguration(classes = Application.class)
#WebAppConfiguration
/* Tells the embedded Tomcat server to start on a random, open port */
#IntegrationTest("server.port:0")
#FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestController {....}
I'm not sure whats wrong. I don't have the surefire plugin but its looking for that it seems.
The code in the class you named TestController isn't a controller, it's a test, but the convention says that it's a controller (perhaps used in testing). By default, Surefire will be looking for tests matching *Test; rename the class to ControllerTest.
Use the below maven jar. It fixed my issue.
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
try checking if you are using the correct package for #Test annotation. In Spring Boot 2.3.6 is org.junit.jupiter.api.Test
Even if this is not recommended (as not standard), you can configure the maven surefire plugin too, as follows:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*Test*.java</include>
</includes>
</configuration>
</plugin>
</plugins>
Edit: Wildcard added before /Test*.java
As this question populates first on search engines I thought it would be helpful for the people looking for the solution for the wired behavior of SpringBoot from version 2.4 onwards.
Problem - When you migrate your SpringBoot project from older version to newer like 2.5.x then the existing junit test cases are ignored by maven.
Reason - SpringBoot has been migrated to junit5 and thats why maven is ignoring junit4 test cases. To see detailed test dependencies explore the pom for spring-boot-starter-test.
Solution 1 - Either you write your test cases in junit5 with class level annotation #SpringBootTest and follow Junit5 rules.
Solution 2 - Or you can use junit-vintage dependency in your project to run both junit4 and junit5 test cases together.
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.6.3</version>
<scope>test</scope>
</dependency>
Another reason this may be happening is to have declared another surefire plugin in your pom. In my case I migrated an app to spring boot and left this in the pom.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<testFailureIgnore>false</testFailureIgnore>
<includes>
<include>**/*Test*.java</include>
</includes>
</configuration>
<executions>
<execution>
<phase>clean</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
Spring boot test were executed after remove this part from the pom.
If none of the above works for you and you are using junit 5 with appropriate annotations, issue might be with Maven Surefire and Failsafe plugins.
This is because of some conflict between the JUnit Surefire provider and the JUnit support in the Surefire 2.22.0 plugin release.
Update your POM to require the 2.22.0 releases of the Maven Surefire and Failsafe plugins.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.0</version>
</plugin>
</plugins>
</build>
Refer here for an example
Adding org.junit.jupiter.api.Test worked for me
With Spring boot 2.5.0
junit-vintage-engine jar isn't added, hence any org.junit.Test won't be run.
Only org.junit.jupiter.api.Test seems to run.
After Adding this jar (junit-vintage-engine) all my old tests(org.junit.Test) run absolutely fine.
This issue can happen because your test class is not public.
this works for my problem to update springboot 2.3.9 to 2.4.3
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.6.3</version>
<scope>test</scope>
</dependency>
If you are facing this issue with spring boot 3, I had to upgrade my surefire plugin version to 3.0.0-M8
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M8</version>
</plugin>
For other people who still have the issue. Personally I resolved that by removing :
<packaging>pom</packaging>
from the pom.xml file.
I'm trying to use wsimport to generate classes from a WSDL.
I'm using the Maven POP generated by Netbeans (7.1) but I get the following output when I attempt to build it:
[jaxws:wsimport]
Processing: C:\Users\...\src\wsdl\ShipService_v5.wsdl
jaxws:wsimport args: [-s, C:\Users\...\target\generated-sources\jaxws-wsimport, -d, C:\Users\...\target\classes, -verbose, -catalog, C:\Users\...\src\jax-ws-catalog.xml, -wsdllocation, file:/C:/Users/.../Desktop/ShipService_v5.wsdl, -extension, -Xnocompile, C:\Users\...\src\wsdl\ShipService_v5.wsdl]
parsing WSDL...
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 1.361s
Finished at: Mon Apr 09 12:51:52 BST 2012
Final Memory: 4M/120M
------------------------------------------------------------------------
Failed to execute goal org.codehaus.mojo:jaxws-maven-plugin:1.10:wsimport (wsimport-generate-ShipService_v5) on project RPDataStreams: Error executing: wsimport [-s, C:\Users\...\target\generated-sources\jaxws-wsimport, -d, C:\Users\...\target\classes, -verbose, -catalog, C:\Users\...\src\jax-ws-catalog.xml, -wsdllocation, file:/C:/Users/.../Desktop/ShipService_v5.wsdl, -extension, -Xnocompile, C:\Users\...\src\wsdl\ShipService_v5.wsdl] -> [Help 1]
The Plugin section from my POM is:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<execution>
<goals>
<goal>wsimport</goal>
</goals>
<configuration>
<wsdlFiles>
<wsdlFile>ShipService_v5.wsdl</wsdlFile>
</wsdlFiles>
<wsdlLocation>file:/C:/Users/.../Desktop/ShipService_v5.wsdl</wsdlLocation>
<staleFile>${project.build.directory}/jaxws/stale/ShipService_v5.stale</staleFile>
</configuration>
<id>wsimport-generate-ShipService_v5</id>
<phase>generate-sources</phase>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>webservices-api</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
<configuration>
<sourceDestDir>${project.build.directory}/generated-sources/jaxws-wsimport</sourceDestDir>
<xnocompile>true</xnocompile>
<verbose>true</verbose>
<extension>true</extension>
<catalog>${basedir}/src/jax-ws-catalog.xml</catalog>
</configuration>
</plugin>
I know that there's nothing wrong with the WSDL I'm using, I've also tried it with the WSDL from http://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl.
I've tried building this project from Netbeans and on the command line from an Ubuntu server, both times I get the same result.
I've now narrowed this down to the dependency on jconfig. If I Comment out the block below then the web service sources are build successfully.
<dependency>
<groupId>org.jconfig</groupId>
<artifactId>jconfig</artifactId>
<version>2.9</version>
<exclusions>
<exclusion>
<artifactId>jmxri</artifactId>
<groupId>com.sun.jmx</groupId>
</exclusion>
</exclusions>
</dependency>
Thanks for the help.
You should use:
<groupId>org.jvnet.jax-ws-commons</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.2</version>
which is the latest version (notice that the plugin got moved to org.jvnet.jax-ws-commons)
Edit:
You could try selectively excluding jconfig build dependencies. The complete list looks like:
<dependency>
<groupId>org.jconfig</groupId>
<artifactId>jconfig</artifactId>
<version>2.9</version>
<exclusions>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
<exclusion>
<groupId>javax.xml.parsers</groupId>
<artifactId>jaxp-api</artifactId>
</exclusion>
<exclusion>
<groupId>crimson</groupId>
<artifactId>crimson</artifactId>
</exclusion>
</exclusions>
</dependency>
Edit: do you actually need jconfig? If not, just get rid of it.
You might be using JRE rather than JDK.
Please try changing the JDK and Run again maven build.
Change JRE to JDK - http://www.gamefromscratch.com/post/2011/11/15/Telling-Eclipse-to-use-the-JDK-instead-of-JRE.aspx
In the JRE tab of run configuration of your project, select the alternate JRE and add the path of the installed JDK.
For me, doing this solved the issue.
Does anyone have an idea how to resolve this Maven error? I get the following when I attempt to update my project's snapshots:
Build errors for my-projects-name;
org.apache.maven.lifecycle.LifecycleExecutionException:
Internal error in the plugin manager
executing goal
'org.apache.maven.plugins:maven-dependency-plugin:2.0:unpack':
Mojo execution failed.
And then when I try running "mvn install":
[INFO] [assembly:single {execution:default}] [INFO]
---------------------------------------------------------
[ERROR] BUILD ERROR [INFO]
---------------------------------------------------------
[INFO] Error reading assemblies: No assembly descriptors found.
I'm running Maven 2.1.0. Can anyone shed some light as to why it's balking at me? Other team members are able to perform the above actions with the exact same copy of the code from SVN.
Thanks!
Edit: Here's the POM:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.company.group</groupId>
<artifactId>the-project-parent</artifactId>
<version>1.0</version>
</parent>
<groupId>com.company.group.project</groupId>
<artifactId>project-root</artifactId>
<packaging>pom</packaging>
<name>Project Name</name>
<version>1.0.2-SNAPSHOT</version>
<description>This artifact contains the common settings for the Project.</description>
<url>http://maven.dev.companyName.com/sites/projectGroup/project</url>
<scm>
<connection>scm:svn:https://sourceforge.companyname.com/svn/repos/group/tags/projGroup/my-project-name</connection>
<developerConnection>scm:svn:https://sourceforge.companyname.com/svn/repos/group/tags/projGroup/my-project-name</developerConnection>
</scm>
<modules>
<module>module-1</module>
<module>module-2</module>
<module>module-3</module>
<module>module-4</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>net.sourceforge.jtds.jdbc</groupId>
<artifactId>jtds</artifactId>
<version>1.2.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.unitils</groupId>
<artifactId>unitils</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>2.3</version>
<scope>test</scope>
</dependency>
<!-- I cut most dependencies for brevity -->
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.0-beta-5</version>
<inherited>false</inherited>
<configuration>
<preparationGoals>clean install</preparationGoals>
<tagBase>https://sourceforge.companyname.com/svn/repos/projects/tags/projGroup/my-project-name</tagBase>
</configuration>
</plugin>
</plugins>
</build>
</project>
You have no assembly plugin configuration shown in the pom you pasted. Perhaps it's in the parent? If there's no config then the assembly plugin will complain because you haven't configured it with a descriptor that tells it what to do. run mvn help:effective-pom and then paste those results (make sure to scrub any passwords) so I can see your full pom after inheritence.
I finally got it to run the install goal by downgrading Maven to 2.0.9.
EDIT:
I tried executing mvn clean install and mvn clean install assembly:assembly using Maven 2.1.0 and it duplicated the above error: > "No Assembly descriptors found."
It still works with Maven 2.0.9. I'm wholly convinced that at minimum something has changed between versions which is causing this this discrepancy...
EDIT:
From what I've been able to find out, it appears there's likely some kind of version conflict between Maven 2.1.0 and the version of this plugin we use:
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.0-beta-5</version>