I am trying to build a web service client. I am using maven 3.0.5 to manage my project and I would like to use the wsimport goal to generate my client stubs. I have read through examples of how to configure the pom to achieve this here. When I run an mvn clean install my stubs are not generated. Below is my pom and an excerpt from the output of running mvn -X clean install. I am trying to use the org.jvnet.jax-ws-commons version of the plugin since the org.codehaus.mojo version is old. Can somebody tell me what I am doing wrong? Thank you.
Here is my 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>
<groupId>org.group.app</groupId>
<artifactId>ProjectName</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>ProjectName Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.2.8</version>
</dependency>
</dependencies>
<build>
<finalName>ProjectName</finalName>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.jvnet.jax-ws-commons</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>basic</id>
<phase>generate-sources</phase>
<goals>
<goal>wsimport</goal>
</goals>
</execution>
</executions>
<configuration>
<packageName>src/main/webapp/WEB-INF/classes/client_support</packageName>
<wsdlLocation>http://localhost:8080/wsdlLocation</wsdlLocation>
<destDir>src/main/webapp/WEB-INF/classes/</destDir>
<verbose>true</verbose>
<target>2.1</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
Here is part of the output from running an mvn -X clean install:
[INFO] ------------------------------------------------------------------------
[INFO] Building ProjectName Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[DEBUG] Resolving plugin version for org.jvnet.jax-ws-commons:jaxws-maven-plugin
[DEBUG] Could not find metadata org.jvnet.jax-ws-commons:jaxws-maven-plugin/maven-metadata.xml in local (/home/michael/.m2/repository)
[DEBUG] Skipped remote update check for org.jvnet.jax-ws-commons:jaxws-maven-plugin/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Resolved plugin version for org.jvnet.jax-ws-commons:jaxws-maven-plugin to 2.3.1-b03 from repository central (http://repo.maven.apache.org/maven2, releases)
Here is an excerpt from my tomcat log file for when I try to deploy the service.
Jun 18, 2014 11:47:28 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.sun.xml.ws.transport.http.servlet.WSServletContextListener
com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: failed to parse runtime descriptor: runtime modeler error:
Wrapper class path.to.jaxws.FaultBean is not found. Have you run APT to generate them? at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:118)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: com.sun.xml.ws.model.RuntimeModelerException: runtime modeler error:
Wrapper class path.to.jaxws.FaultBean is not found. Have you run APT to generate them?
at com.sun.xml.ws.model.RuntimeModeler.getClass(RuntimeModeler.java:287)
at com.sun.xml.ws.model.RuntimeModeler.processExceptions(RuntimeModeler.java:1006)
at com.sun.xml.ws.model.RuntimeModeler.processRpcMethod(RuntimeModeler.java:969)
at com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:546)
at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:371)
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:258)
at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:322)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:188)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptor Parser.java:253)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.j ava:147)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServlet ContextListener.java:108)
... 7 more
After running the mvn -X clean install the project builds successfully, however, neither the support stubs nor the package that contains then is created. Thank you for your help.
Related
I am trying to generate an aggregate Jacoco code coverage report by following the steps here.
My initial maven project may contain multiple modules and I add an aggregator module aggregator to the main pom dynamically through my code.
The folder structure looks somewhat like this (there can be any number of modules and sub modules in the main project):
/SampleProject/
-- pom.xml
-- module1/
---- pom.xml
---- src/
-- module2/
---- pom.xml
---- src/
-- module3/
---- pom.xml
---- src/
-- aggregator/
---- pom.xml
This is the main pom:
SampleProject/pom.xml . (here, the aggregator module is added dynamically through my code)
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sample</groupId>
<artifactId>sampleProject</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<name>sampleProject</name>
<modules>
<module>module1</module>
<module>module2</module>
<module>module3</module>
<module>aggregator</module>
</modules>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.9</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Each module has its own pom.xml. and the aggregator pom (which is generated by my code) looks something like this (each module is added as a dependency in this pom. This information is fetched from the individual poms of the modules):
aggregator/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>
<parent>
<groupId>com.sample</groupId>
<artifactId>sampleProject</artifactId>
<version>1.0</version>
</parent>
<artifactId>aggregator</artifactId>
<dependencies>
<dependency>
<groupId>com.sample.module1</groupId>
<artifactId>module1</artifactId>
<version>0.1</version>
</dependency>
<dependency>
<groupId>com.sample.module2</groupId>
<artifactId>module2</artifactId>
<version>0.1</version>
</dependency>
<dependency>
<groupId>com.sample.module3</groupId>
<artifactId>module3</artifactId>
<version>0.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<argLine>${argLine} -Xms256m -Xmx2048m</argLine>
<forkCount>1</forkCount>
<runOrder>random</runOrder>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.9</version>
<executions>
<execution>
<id>report-aggregate</id>
<phase>test</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
and, to generate the aggregate report I use the following command:
mvn clean test -DskipTests=false
This generates the aggregate report in 'aggregator/target/site/jacoco-aggregate/index.html'
Now, the problem is if something goes wrong with only the aggregator build, and that build fails (but all other modules' build is successful). Then the maven output will look something like this:
[INFO] module1 .......................................... SUCCESS [ 2.197 s]
[INFO] module2 .......................................... SUCCESS [ 11.287 s]
[INFO] module3 .......................................... SUCCESS [ 6.969 s]
[INFO] aggregator ....................................... FAILURE [ 1.241 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 00:21 min
[INFO] Finished at: 2018-07-26T13:01:12-07:00
[INFO] Final Memory: 258M/1149M
Which means that the overall build is also marked as failed if just the aggregator part fails. This causes problem in the next step in the deployment pipeline.
So, what I want is that even if the aggregator build is failing, the overall build should be marked as passed (i.e. ignore the failing aggregator build) so that I can proceed with the next step in deployment, so that not generating the code coverage report, does not fail my entire deployment process. (I will handle the missing code coverage report later in the process).
Is there some way to achieve this? any help would be appreciated.
UPDATE 1:
I already check this answer and this is not what I want. Using -fae flag in maven would still mark the build as failed at the end.
Also, I do not want the -fn flag either because then I would be ignoring actual build failures in the modules as well, which is not desired.
What I'm looking for is a way to ignore the failures of just one module in maven.
I'm not really sure if doing that is possible, any alternate suggestions are welcome too.
UPDATE 2:
Update and some background info.:
So, I am building this tool as kind of a central tool which runs on all projects so it should be generic enough to cater to different types of configurations, without changing anything in the main project (on which the tests are being run).
As of now, it seems what I am looking for is not possible. So, as a workaround, I am asking the main project's owner to include a config file which tells my tool which packages to be included for code coverage.
Will update here if I find a better solution or workaround.
I have a project. Originally it was a single module project with structure like this
java-cloud-sample\
src\
main\
java
pom.xml
I decided to make it into a multi-module structure - I use java 9 anyway.
So I separated it like this
java-cloud-sample\
java-cloud-rest-api\
src\
pom.xml
pom.xml
Where root pom.xml looks like this
<?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.lapots.breed.platform.cloud</groupId>
<artifactId>java-cloud-sample</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>java-cloud-rest-api</module>
</modules>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.9</maven.compiler.source>
<maven.compiler.target>1.9</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals><goal>copy-dependencies</goal></goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
And module pom.xml looks like this
<?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>
<parent>
<groupId>com.lapots.breed.platform.cloud</groupId>
<artifactId>java-cloud-sample</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>java-cloud-rest-api</artifactId>
<description>Demo project for Spring Boot</description>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</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-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>build-info</goal>
</goals>
<configuration>
<additionalProperties>
<encoding.source>${project.build.sourceEncoding}</encoding.source>
<encoding.reporting>${project.reporting.outputEncoding}</encoding.reporting>
<java.source>${maven.compiler.source}</java.source>
<java.target>${maven.compiler.target}</java.target>
</additionalProperties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
But when I try to run mvn clean package I get
INFO] java-cloud-rest-api ................................ FAILURE [ 1.060 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.104 s
[INFO] Finished at: 2017-09-08T17:15:46+03:00
[INFO] Final Memory: 27M/331M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.2:compile (default-compile) on project java-cloud-rest-api: Fatal error compiling: invalid flag: --module-path -> [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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :java-cloud-rest-api
What is the problem? (maybe I should split maven project into separate modules and each maven module split into java modules)
This failure occurs when maven installed on your machine is configured with java8 as the default java version. You can confirm this by executing
mvn -version
on your terminal and checking the Java version stated in the configuration.
To resolve the version to a newer and supported version like java9 at the moment, you can create/edit the mavenrc(on MacOS) file on your machine:
vi ~/.mavenrc
to include these
export PATH
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/
export PATH=${PATH}:$JAVA_HOME/bin
Once you save this configuration, you can confirm maven should be using Java version 9 using the same command and then your project shall build without the stated error.
I had this error with the Maven compiler plugin 3.8.1 when a project was defining a module-info.java and Java 8 was used with Maven to compile the project. It seems that as soon a module-info.java is seen by the Maven compiler plugin it is adding the flag --module-path to the command line which is unknown to the Java 8 compiler. A way to exclude this file and compile the project without module support is to exclude the module-info.java from compilation based on a Maven profile:
<profiles>
<profile>
<id>java8</id>
<activation>
<jdk>1.8</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
I created a project named app-service that uses a core module(app-core). I include this core module in my project as maven dependency through <systemPath> that reside in project base directory.
<dependency>
<groupId>app-group</groupId>
<artifactId>app-core</artifactId>
<version>${project.version}</version>
<scope>system</scope>
<systemPath>${project.basedir}/app-core-0.1.1-SNAPSHOT.jar</systemPath>
</dependency>
I configure maven and run goal
mvn clean package install
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 44.733 s
[INFO] Finished at: 2017-04-05T12:27:46+05:30
[INFO] Final Memory: 29M/533M
[INFO] ------------------------------------------------------------------------
After BUILD SUCCESS $CLASSPATH does not contain the app-core.jar file, expect this it include all dependencies that listed in maven <dependencies>
I want to use this app-core module as compile scope. When I try this it prompt error
[ERROR] 'dependencies.dependency.systemPath' for app-group:app-core:jar must be omitted. This field may only be specified for a dependency with system scope. # line 71, column 25
Note: I do not upload this app-core on public repository due to security purpose. I want to use through project base directory because I need to deploy the same on Heroku.
Update
I googled it and found a plugin that installs local repository.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
<executions>
<execution>
<id>install-external</id>
<phase>clean</phase>
<configuration>
<file>${project.basedir}/app-core-0.1.1-SNAPSHOT.jar</file>
<repositoryLayout>default</repositoryLayout>
<groupId>app-group</groupId>
<artifactId>app-core</artifactId>
<version>${project.version}</version>
<packaging>jar</packaging>
<generatePom>true</generatePom>
</configuration>
<goals>
<goal>install-file</goal>
</goals>
</execution>
</executions>
</plugin>
But the result is same......
You should follow this guide to Adding Unmanaged Dependencies to a Maven Project on Heroku. To summarize the guide, run:
mvn deploy:deploy-file -Durl=file:///path/to/app-group/app-core/ -Dfile=app-core-1.0.jar -DgroupId=app-group -DartifactId=app-core -Dpackaging=jar -Dversion=1.0
Then add this repository to your pom.xml:
<repository>
<id>project.local</id>
<name>project</name>
<url>file:${project.basedir}/repo</url>
</repository>
Then use the dependency i your pom.xml:
<dependency>
<groupId>app-group</groupId>
<artifactId>app-core</artifactId>
<version>1.0</version>
</dependency>
I think the error is telling you to delete part how you setup your dependency.
Try omitting parts of it such as:
<systemPath>${project.basedir}</systemPath>
..and working from there.
Edit:
I would also try the most limited amount of information.
<dependency>
<groupId>app-group</groupId>
<artifactId>app-core</artifactId>
<version>${project.version}</version>
</dependency>
Try changing the project version even. I've had problems with maven dependencies not pulling from repositories because the pom.xml was written incorrectly. The way I ended up solving them was to keep trying different ways of writing the dependency until it actually pulled it correctly.
I am trying to deploy a simple web application maven project to jboss eat 6.2 and I want to start the server and deploy the project from inside maven.
Here is my pom.xml file :
<?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.skiabox.webapps</groupId>
<artifactId>Tmt-Project2</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.5.Final</version>
<executions>
<execution>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
<goal>deploy</goal>
</goals>
</execution>
</executions>
<configuration>
<jbossHome>/Users/Administrator/Servers/jboss-eap-6.2/bin</jbossHome>
<hostname>localhost</hostname>
<username>user1</username>
<password>password1</password>
<port>10001</port>
</configuration>
</plugin>
</plugins>
</build>
</project>
The error I am getting after mvm install is the following :
[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:run (default) on project Tmt-Project2: Modules path 'null' is not a valid directory.
It seems that maven cannot see the directory of the server that I give in the configuration tag.
I tried to reproduce your trouble: (I have got only Jboss AS 6.0 installed under Windows 7)
I copied your pom.xml to an empty directory
I removed a "/bin" from JbossHome path and used full path (starting from a drive letter)
I removed the credentials as my server instance doesn't have any configured
The server started normally after mvn clean install
So the problem may be:
JbossHome path or credentials or some your configuration files under jbossHome
I've imported my project into Eclipse (Helios + m2eclipse), and also into Netbeans (7.0) and in both IDEs one of the troubles is:
This is what I get in Netbeans when I try to build.
The project com.miCompany:myProject:1.0 (.....) has 1 error
Unresolveable build extension: Plugin
org.apache.axis2:axis2-wsdl2code-maven-plugin:1.3
or one of its dependencies could not
be resolved: Failed to collect
dependencies for
org.apache.axis2:axis2-wsdl2code-maven-plugin:jar:1.3
(): Failed to read artifact descriptor
for
org.apache.woden:woden:jar:1.0-incubating-M7b:
Could not transfer artifact
org.apache.woden:woden:pom:1.0-incubating-M7b
from/to jibx
(http://jibx.sourceforge.net/maven):
No connector available to access
repository jibx
(http://jibx.sourceforge.net/maven) of
type legacy using the available
factories
WagonRepositoryConnectorFactory ->
[Help 2]
This is what I get in Eclipse:
Project build error: Unresolveable build extension: Plugin
org.apache.axis2:axis2-wsdl2code-maven-plugin:1.3
or one of its dependencies could not
be resolved: Failed to collect
dependencies for
org.apache.axis2:axis2-wsdl2code-maven-plugin:jar:1.3
() pom.xml /myProject line 1 Maven
Problem
In Eclipse I've downloaded this: http://www.apache.org/dyn/mirrors/mirrors.cgi/axis/axis2/java/core/1.5.4/axis2-eclipse-service-plugin-1.5.4.zip unzipped and copied the file: "org.apache.axis2.eclipse.codegen.plugin_1.5.4.jar" into the directory "plugins" of my Eclipse instalation. And I still getting the same error.
I am running Netbeans over Win XP and Eclipse over Win XP and also over Mac, allways the same error.
Does somebody have any idea what can I do?
Here goes my pom.xml
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>MyParent</artifactId>
<groupId>com.mycompany</groupId>
<version>1.0</version>
</parent>
<groupId>com.mycompany</groupId>
<artifactId>myModule</artifactId>
<version>1.0</version>
<name>myModule</name>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>src/main/java</directory>
<includes>
<include>com/mycompany/client/*.java</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-wsdl2code-maven-plugin</artifactId>
<version>1.3</version>
<extensions>true</extensions>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>wsdl2code</goal>
</goals>
</execution>
</executions>
<configuration>
<packageName>com.mycompany.client</packageName>
<wsdlFile>src/main/axis2/MyWsdl.wsdl</wsdlFile>
<outputDirectory>.</outputDirectory>
<targetResourcesFolderLocation>target/main/axis2</targetResourcesFolderLocation>
<targetSourceFolderLocation>src/main/java</targetSourceFolderLocation>
<namespaceURIs>
<namespaceURI>
<uri>http://schema.mycompany.com/Esb</uri>
<packageName>com.mycompany.services.Esbsrv.schema</packageName>
</namespaceURI>
<namespaceURI>
<uri>http://wsdl.mycompany.com/Esb</uri>
<packageName>com.mycompany.services.Esbsrv.schema</packageName>
</namespaceURI>
<namespaceURI>
<uri>http://schema.mycompany.com/Global/WSException</uri>
<packageName>com.mycompany.schema.global.wsexception</packageName>
</namespaceURI>
</namespaceURIs>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!--
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>1.6.2</version>
<scope>compile</scope>
</dependency>
-->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-adb</artifactId>
<version>1.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-kernel</artifactId>
<version>1.3</version>
<scope>compile</scope>
</dependency>
<!--
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-xmlbeans</artifactId>
<version>1.3</version>
<scope>compile</scope>
</dependency>
-->
</dependencies>
</project>
Well, I can only offer suggestions as I"m not much of a maven expert, but I did just have to do this today and it was pretty straightforward for me -
set up the maven project to be eclipse friendly : mvn eclipse:eclipse
make sure eclipse can see the libs. this meant going to the projectsetup/buildpath/libraries editor in eclipse and adding the variable M2_REPO to point to your local maven repository (e.g. something like /home/nacho3d/.m2/repository)
Your error, actually, looks to me like maven can't find a dependency for axis. The specifics for that should be on the axis website,
I think you're using maven 3.0+, right?
That pom(org.apache.woden:woden:jar:1.0-incubating-M7b) isn't compatible with maven 3 yet.
If you use maven 2.2.1 to build ESB 4.3.0-03 source, then it would be successfully.
If you have the jar of the missing dependency you can:
1) deploy it on your maven repository, if you have one
2) declare the dependency in your pom with a scope of 'system': check this out
I have also faced the same problem and fixed it by following below step...
In you project directory do the command: mvn eclipse:eclipse
In eclipse project right click->Maven->Update Project.
Again right click->Maven->Disable Maven Nature
Restart eclipse.
Right click on project->Configure->Convert to Maven Project.
Finish. Error will gone.
Thanks