You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kevin Witten <Ke...@nomadix.com> on 2009/02/11 21:01:49 UTC

Axis2 wsdl2code Plugin Help!

I'm trying to use the axis2 wsdl2code plugin to generate code. Unfortunately I'm getting an error in maven that it cannot fine the plugin.
Does anyone know how to get this working?

I'm Using maven V2.0.9

My pom contains:

           <plugin>
               <groupId>org.apache.axis2</groupId>
               <artifactId>axis2-wsdl2code-maven-plugin</artifactId>
               <version>1.4.1</version>
               <executions>
                  <execution>
                     <phase>generate-sources</phase>
                     <goals>
                        <goal>wsdl2code</goal>
                     </goals>
                  </execution>
               </executions>
               <configuration>
                  <packageName>com.nomadix</packageName>
                  <wsdlFile>src/main/resources/ACSService.wsdl</wsdlFile>
                  <databindingName>adb</databindingName>
                  <generateServerSide>true</generateServerSide>
                  <generateServerSideInterface>true</generateServerSideInterface>
                  <generateServicesXml>true</generateServicesXml>
                  <namespaceToPackages>
                     http://nomadix.com/acs/services/ns/acs=com.nomadix.acs.services.acsservice
                  </namespaceToPackages>
                  <outputDirectory>src/main/java</outputDirectory>
                  <skipWSDL>true</skipWSDL>
                  <skipBuildXml>true</skipBuildXml>
               </configuration>
               <dependencies>
                  <dependency>
                     <groupId>org.apache.axis2</groupId>
                     <artifactId>axis2</artifactId>
                     <version>1.4.1</version>
                  </dependency>
               </dependencies>
            </plugin>


Any the error is:

$ mvn axis2-wsdl2code:wsdl2code
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'axis2-wsdl2code'.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-axis2-wsdl2code-plugin' does not exist or no valid version could be found
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Wed Feb 11 11:58:37 PST 2009
[INFO] Final Memory: 1M/4M
[INFO] ------------------------------------------------------------------------


Very strange. From the error, maven seems to be looking for the plugin in "'org.apache.maven.plugins",
but I have defined the groupId as "org.apache.axis2". Is this a bug in maven?

Thanks in advance for any help,

Kevin Witten



________________________________
Notice? The information and attachment(s) contained in this communication are intended for the addressee only, and may be confidential and/or legally privileged. If you have received this communication in error, please contact the sender immediately, and delete this communication from any computer or network system. Any interception, review, printing, copying, re-transmission, dissemination, or other use of, or taking of any action upon this information by persons or entities other than the intended recipient is strictly prohibited by law and may subject them to criminal or civil liability. None of the interTouch Group of Companies shall be liable for the improper and/or incomplete transmission of the information contained in this communication or for any delay in its receipt.

Re: Axis2 wsdl2code Plugin Help!

Posted by Stephen Connolly <st...@gmail.com>.
when you invoke a phase, maven invokes all the phases, in the  
lifecycle to which the phase belongs, up to and including the phase  
you specified

you are invoking the clean phase, which is part of the clean  
lifecycle, so maven will invoke all the mojos attached to the pre- 
clean phase, and then all those attached to the clean phase, and then  
it will stop

the same confusion happens with integration tests... where people  
think they should dunn them with "mvn integration-test" but this is  
not the way they should work. the integration-test phase should run  
all the tests and *never fail the build*. then a plugin attached to  
the verify phase should check the results of the integration tests and  
fail the build if necessary. with that case you invoke the integration  
tests with "mvn verify". this allows a IT test container to be started  
and stopped in the pre-it and post-it phases

Sent from my [rhymes with myPod] ;-)

On 13 Feb 2009, at 18:12, Kevin Witten <Ke...@nomadix.com> wrote:

> From the maven documentation http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference
> My understanding of the maven clean lifecycle is that the following  
> phases
> will be run in order when you perform a "mvn clean"
>
>        pre-clean
>        clean
>        post-clean
>
> And with the ant plugin you can run code in any of these phases.
>
> The issue is that the post-clean does not seem to work. Am I missing  
> something?
>
> Here is a simple pom which does an ant echo task in each phase.
>
> When I run "mvn clean", the post-clean is never echoed.
>
> <?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.nomadix</groupId>
>   <artifactId>Test</artifactId>
>   <name>Test</name>
>   <version>1.0.0</version>
>
>    <build>
>      <plugins>
>         <plugin>
>            <groupId>org.apache.maven.plugins</groupId>
>            <artifactId>maven-antrun-plugin</artifactId>
>            <executions>
>               <execution>
>                  <id>Extended-Pre-Clean</id>
>                  <phase>pre-clean</phase>
>                  <goals>
>                     <goal>run</goal>
>                  </goals>
>                  <configuration>
>                     <tasks>
>                         
> <echo> 
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</echo>
>                         
> <echo>@                                                              
> @</echo>
>                        <echo>@           PRE- 
> CLEAN                                         @</echo>
>                         
> <echo>@                                                              
> @</echo>
>                         
> <echo> 
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</echo>
>                     </tasks>
>                  </configuration>
>               </execution>
>               <execution>
>                  <id>Extended-Clean</id>
>                  <phase>clean</phase>
>                  <goals>
>                     <goal>run</goal>
>                  </goals>
>                  <configuration>
>                     <tasks>
>                         
> <echo> 
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</echo>
>                         
> <echo>@                                                              
> @</echo>
>                        <echo>@            
> CLEAN                                             @</echo>
>                         
> <echo>@                                                              
> @</echo>
>                         
> <echo> 
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</echo>
>                     </tasks>
>                  </configuration>
>               </execution>
>               <execution>
>                  <id>Extended-Post-Clean</id>
>                  <phase>post-clean</phase>
>                  <goals>
>                     <goal>run</goal>
>                  </goals>
>                  <configuration>
>                     <tasks>
>                         
> <echo> 
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</echo>
>                         
> <echo>@                                                              
> @</echo>
>                        <echo>@           POST- 
> CLEAN                                        @</echo>
>                         
> <echo>@                                                              
> @</echo>
>                         
> <echo> 
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</echo>
>                     </tasks>
>                  </configuration>
>               </execution>
>            </executions>
>         </plugin>
>      </plugins>
>   </build>
> </project>
>
>
>
> Thanks for the help,
> Kevin
>
> Notice● The information and attachment(s) contained in this communic 
> ation are intended for the addressee only, and may be confidential a 
> nd/or legally privileged.  If you have received this communication i 
> n error, please contact the sender immediately, and delete this comm 
> unication from any computer or network system.  Any interception, re 
> view, printing, copying, re-transmission, dissemination, or other us 
> e of, or taking of any action upon this information by persons or en 
> tities other than the intended recipient is strictly prohibited by l 
> aw and may subject them to criminal or civil liability.  None of the 
>  interTouch Group of Companies shall be liable for the improper and/ 
> or incomplete transmission of the information contained in this comm 
> unication or for any delay in its receipt.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Axis2 wsdl2code Plugin Help!

Posted by Kevin Witten <Ke...@nomadix.com>.
From the maven documentation http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference
My understanding of the maven clean lifecycle is that the following phases
will be run in order when you perform a "mvn clean"

        pre-clean
        clean
        post-clean

And with the ant plugin you can run code in any of these phases.

The issue is that the post-clean does not seem to work. Am I missing something?

Here is a simple pom which does an ant echo task in each phase.

When I run "mvn clean", the post-clean is never echoed.

<?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.nomadix</groupId>
   <artifactId>Test</artifactId>
   <name>Test</name>
   <version>1.0.0</version>

    <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
               <execution>
                  <id>Extended-Pre-Clean</id>
                  <phase>pre-clean</phase>
                  <goals>
                     <goal>run</goal>
                  </goals>
                  <configuration>
                     <tasks>
                        <echo>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</echo>
                        <echo>@                                                             @</echo>
                        <echo>@           PRE-CLEAN                                         @</echo>
                        <echo>@                                                             @</echo>
                        <echo>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</echo>
                     </tasks>
                  </configuration>
               </execution>
               <execution>
                  <id>Extended-Clean</id>
                  <phase>clean</phase>
                  <goals>
                     <goal>run</goal>
                  </goals>
                  <configuration>
                     <tasks>
                        <echo>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</echo>
                        <echo>@                                                             @</echo>
                        <echo>@           CLEAN                                             @</echo>
                        <echo>@                                                             @</echo>
                        <echo>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</echo>
                     </tasks>
                  </configuration>
               </execution>
               <execution>
                  <id>Extended-Post-Clean</id>
                  <phase>post-clean</phase>
                  <goals>
                     <goal>run</goal>
                  </goals>
                  <configuration>
                     <tasks>
                        <echo>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</echo>
                        <echo>@                                                             @</echo>
                        <echo>@           POST-CLEAN                                        @</echo>
                        <echo>@                                                             @</echo>
                        <echo>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</echo>
                     </tasks>
                  </configuration>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>
</project>



Thanks for the help,
Kevin

Notice● The information and attachment(s) contained in this communication are intended for the addressee only, and may be confidential and/or legally privileged.  If you have received this communication in error, please contact the sender immediately, and delete this communication from any computer or network system.  Any interception, review, printing, copying, re-transmission, dissemination, or other use of, or taking of any action upon this information by persons or entities other than the intended recipient is strictly prohibited by law and may subject them to criminal or civil liability.  None of the interTouch Group of Companies shall be liable for the improper and/or incomplete transmission of the information contained in this communication or for any delay in its receipt.

RE: Axis2 wsdl2code Plugin Help!

Posted by Kevin Witten <Ke...@nomadix.com>.
This works. Thanks!


Kevin

-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com]
Sent: Wednesday, February 11, 2009 1:35 PM
To: Maven Users List
Subject: Re: Axis2 wsdl2code Plugin Help!

> I'm trying to use the axis2 wsdl2code plugin to generate code. Unfortunately I'm getting an error in maven that it cannot fine the plugin.
> Does anyone know how to get this working?

Try using the "full name" of the plugin:
mvn org.apache.axis2:axis2-wsdl2code-maven-plugin:1.4.1:wsdl2code

I don't use this plugin myself. You should probably also contact the
dev team responsible for the plugin directly, or their corresponding
user list.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org



Notice● The information and attachment(s) contained in this communication are intended for the addressee only, and may be confidential and/or legally privileged.  If you have received this communication in error, please contact the sender immediately, and delete this communication from any computer or network system.  Any interception, review, printing, copying, re-transmission, dissemination, or other use of, or taking of any action upon this information by persons or entities other than the intended recipient is strictly prohibited by law and may subject them to criminal or civil liability.  None of the interTouch Group of Companies shall be liable for the improper and/or incomplete transmission of the information contained in this communication or for any delay in its receipt.

Maven antrun plugin

Posted by Kevin Witten <Ke...@nomadix.com>.
Any help appreciated:

I'm trying to run an ant task on clean using maven 2.0.9. So I'm basically following examples from
The book "Maven - The Definitive Guide". I created a simple pom.xml shown below, which uses the
antrun plugin configured to run echo tasks. This is set up to run on phase "pre-clean",
so the echo message should be displayed before the clean. But it does not work.

When I run clean, I do not get the echo.

$ mvn clean
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building test
[INFO]    task-segment: [clean]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Thu Feb 12 11:50:54 PST 2009
[INFO] Final Memory: 3M/6M
[INFO] ------------------------------------------------------------------------


<?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.nomadix</groupId>
   <artifactId>test</artifactId>
   <name>test</name>
   <version>1.0.0</version>

   <build>
      <pluginManagement>
         <plugins>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-antrun-plugin</artifactId>
               <executions>
                  <execution>
                     <id>file-exists</id>
                     <phase>pre-clean</phase>
                     <goals>
                        <goal>run</goal>
                     </goals>
                     <configuration>
                        <tasks>
                           <echo>***********************************************************</echo>
                           <echo>Running Clean</echo>
                           <echo>***********************************************************</echo>
                        </tasks>
                     </configuration>
                  </execution>
               </executions>
            </plugin>
         </plugins>
      </pluginManagement>
   </build>
</project>


Thanks in advance for the help,
Kevin

Notice● The information and attachment(s) contained in this communication are intended for the addressee only, and may be confidential and/or legally privileged.  If you have received this communication in error, please contact the sender immediately, and delete this communication from any computer or network system.  Any interception, review, printing, copying, re-transmission, dissemination, or other use of, or taking of any action upon this information by persons or entities other than the intended recipient is strictly prohibited by law and may subject them to criminal or civil liability.  None of the interTouch Group of Companies shall be liable for the improper and/or incomplete transmission of the information contained in this communication or for any delay in its receipt.

Re: Maven2/Axis2 help

Posted by Wayne Fay <wa...@gmail.com>.
> I'm trying to convert to maven2 from ant builds. I have a WS in Axis2 and I add axis2 to the pom file.
> But I can't build, because maven can't find the dependencies of axis2.

You should probably take this up with the Axis2 plugin development
team, as it is "their" defect. Their pom file should include all
necessary dependencies.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Maven2/Axis2 help

Posted by Kevin Witten <Ke...@nomadix.com>.
I'm trying to convert to maven2 from ant builds. I have a WS in Axis2 and I add axis2 to the pom file.
But I can't build, because maven can't find the dependencies of axis2.

Pom 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>ServiceTest</groupId>
   <artifactId>ServiceTest</artifactId>
   <version>1.0.0</version>

   <build>
      <pluginManagement>
         <plugins>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-compiler-plugin</artifactId>
               <configuration>
                  <!-- Compiler version -->
                  <source>1.6</source>
                  <target>1.6</target>
               </configuration>
            </plugin>

            <!--
                Note: Must run the following
                mvn org.apache.axis2:axis2-wsdl2code-maven-plugin:1.4.1:wsdl2code
            -->
            <plugin>
               <groupId>org.apache.axis2</groupId>
               <artifactId>axis2-wsdl2code-maven-plugin</artifactId>
               <version>1.4.1</version>
               <executions>
                  <execution>
                     <phase>generate-sources</phase>
                     <goals>
                        <goal>wsdl2code</goal>
                     </goals>
                  </execution>
               </executions>
               <configuration>
                  <packageName>com.nomadix.acs.services.acsservice</packageName>
                  <wsdlFile>src/main/resources/ACSService.wsdl</wsdlFile>
                  <generateServerSide>true</generateServerSide>
                  <generateServicesXml>true</generateServicesXml>
                  <skipBuildXML>true</skipBuildXML>
                  <skipWSDL>true</skipWSDL>
                  <generateServerSideInterface>true</generateServerSideInterface>
                  <namespaceToPackages>
                     http://nomadix.com/acs/services/ns/acs=com.nomadix.acs.services.acsservice
                  </namespaceToPackages>
                  <outputDirectory>src/main</outputDirectory>
                  <targetSourceFolderLocation>java</targetSourceFolderLocation>
                  <targetResourcesFolderLocation>resources</targetResourcesFolderLocation>
                  <overWrite>true</overWrite>
                  <unwrap>true</unwrap>
                  <databindingName>adb</databindingName>
               </configuration>
            </plugin>
         </plugins>
      </pluginManagement>
   </build>

   <dependencies>
      <dependency>
         <groupId>org.apache.axis2</groupId>
         <artifactId>axis2</artifactId>
         <version>1.4.1</version>
      </dependency>
   </dependencies>

</project>


Thanks in advance for the help,
Kevin

Notice● The information and attachment(s) contained in this communication are intended for the addressee only, and may be confidential and/or legally privileged.  If you have received this communication in error, please contact the sender immediately, and delete this communication from any computer or network system.  Any interception, review, printing, copying, re-transmission, dissemination, or other use of, or taking of any action upon this information by persons or entities other than the intended recipient is strictly prohibited by law and may subject them to criminal or civil liability.  None of the interTouch Group of Companies shall be liable for the improper and/or incomplete transmission of the information contained in this communication or for any delay in its receipt.

Re: Axis2 wsdl2code Plugin Help!

Posted by Wayne Fay <wa...@gmail.com>.
> I'm trying to use the axis2 wsdl2code plugin to generate code. Unfortunately I'm getting an error in maven that it cannot fine the plugin.
> Does anyone know how to get this working?

Try using the "full name" of the plugin:
mvn org.apache.axis2:axis2-wsdl2code-maven-plugin:1.4.1:wsdl2code

I don't use this plugin myself. You should probably also contact the
dev team responsible for the plugin directly, or their corresponding
user list.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org