You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Håkon Sagehaug <ha...@uni.no> on 2011/02/08 16:44:56 UTC

Using maven to create Client jar

Hi all,

I was wondering if anybody know of any maven plugins or tweeking so that one
can build the jar for the client stubs. We want to use this when we release
a new version of our web service. The release is 1. creating a aar file,
using maven aar plugin, then it would be nice to be able to create a client
jar with the stubs using some sort of maven configuration/plugin.

Does anybody know of this or done similar stuff?

cheers, Håkon

Re: Using maven to create Client jar

Posted by Gerard Draper <dr...@gmail.com>.
If I'm not wrong, the "package" command should do that. Assuming that you
have  "<packaging>jar</packaging>" in your POM configuration file.

2011/2/8 Håkon Sagehaug <ha...@uni.no>

> Hi all,
>
> I was wondering if anybody know of any maven plugins or tweeking so that
> one can build the jar for the client stubs. We want to use this when we
> release a new version of our web service. The release is 1. creating a aar
> file, using maven aar plugin, then it would be nice to be able to create a
> client jar with the stubs using some sort of maven configuration/plugin.
>
> Does anybody know of this or done similar stuff?
>
> cheers, Håkon
>



-- 
Gerard Draper Gil

Re: Using maven to create Client jar

Posted by Håkon Sagehaug <ha...@uni.no>.
Hi

Thanks for the tips, I 'll try them out.

cheers, Håkon

On 10 February 2011 19:06, Tharindu Mathew <mc...@gmail.com> wrote:

> I think you are looking at creating a client stubs jar inside of maven. You
> can use an ant task inside maven to do this. Have the regular maven stuff
> with an ant task.
>
> Hope this helps.
>
> Ex:
> <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-antrun-plugin</artifactId>
>                 <version>1.1</version>
>                 <executions>
>                     <execution>
>                         <id>source-code-generation</id>
>                         <phase>process-resources</phase>
>                         <goals>
>                             <goal>run</goal>
>                         </goals>
>                         <configuration>
>                             <tasks>
>                                 <java
> classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
>                                     <arg line="-uri
> src/main/resources/BAMConfigAdminService.wsdl -u -uw
>                                       -o target/generated-code -p
> org.wso2.carbon.bam.ui
>                                       -ns2p
> http://service.dataobjects.common.bam.carbon.wso2.org/xsd=org.wso2.carbon.bam.ui.config,http://org.apache.axis2/xsd=org.wso2.carbon.bam.ui.config,http://common.dataobjects.common.bam.carbon.wso2.org/xsd=org.wso2.carbon.bam.ui.config,http://services.core.bam.carbon.wso2.org=org.wso2.carbon.bam.ui.config,http://util.bam.carbon.wso2.org/xsd=org.wso2.carbon.bam.ui.config
> "/>
>                                     <classpath
> refid="maven.dependency.classpath"/>
>                                     <classpath
> refid="maven.compile.classpath"/>
>                                     <classpath
> refid="maven.runtime.classpath"/>
>                                 </java>
>
> ...... (xml close tags)
>
>
> On Thu, Feb 10, 2011 at 11:05 PM, Caristi, Joe <jc...@whisolutions.com>wrote:
>
>>  We use the Maven Assembly Plugin to do this:
>> http://maven.apache.org/plugins/maven-assembly-plugin/
>>  ------------------------------
>>
>> *From:* Håkon Sagehaug [mailto:hakon.sagehaug@uni.no]
>> *Sent:* Tuesday, February 08, 2011 10:45 AM
>> *To:* java-user@axis.apache.org
>> *Subject:* Using maven to create Client jar
>>
>>
>>
>> Hi all,
>>
>> I was wondering if anybody know of any maven plugins or tweeking so that
>> one can build the jar for the client stubs. We want to use this when we
>> release a new version of our web service. The release is 1. creating a aar
>> file, using maven aar plugin, then it would be nice to be able to create a
>> client jar with the stubs using some sort of maven configuration/plugin.
>>
>> Does anybody know of this or done similar stuff?
>>
>> cheers, Håkon
>>
>> ------------------------------
>> STATEMENT OF CONFIDENTIALITY:
>>
>>
>>
>> The information contained in this electronic message and any attachments
>> to
>> this message are intended for the exclusive use of the addressee(s) and
>> may
>> contain confidential or privileged information. If you are not the
>> intended
>> recipient, please notify WHI Solutions immediately at gc@whisolutions.com
>> ,
>> and destroy all copies of this message and any attachments.
>>
>
>
>
> --
> Regards,
>
> Tharindu
>

Re: Using maven to create Client jar

Posted by Tharindu Mathew <mc...@gmail.com>.
I think you are looking at creating a client stubs jar inside of maven. You
can use an ant task inside maven to do this. Have the regular maven stuff
with an ant task.

Hope this helps.

Ex:
<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.1</version>
                <executions>
                    <execution>
                        <id>source-code-generation</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <java
classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
                                    <arg line="-uri
src/main/resources/BAMConfigAdminService.wsdl -u -uw
                                      -o target/generated-code -p
org.wso2.carbon.bam.ui
                                      -ns2p
http://service.dataobjects.common.bam.carbon.wso2.org/xsd=org.wso2.carbon.bam.ui.config,http://org.apache.axis2/xsd=org.wso2.carbon.bam.ui.config,http://common.dataobjects.common.bam.carbon.wso2.org/xsd=org.wso2.carbon.bam.ui.config,http://services.core.bam.carbon.wso2.org=org.wso2.carbon.bam.ui.config,http://util.bam.carbon.wso2.org/xsd=org.wso2.carbon.bam.ui.config
"/>
                                    <classpath
refid="maven.dependency.classpath"/>
                                    <classpath
refid="maven.compile.classpath"/>
                                    <classpath
refid="maven.runtime.classpath"/>
                                </java>

...... (xml close tags)


On Thu, Feb 10, 2011 at 11:05 PM, Caristi, Joe <jc...@whisolutions.com>wrote:

>  We use the Maven Assembly Plugin to do this:
> http://maven.apache.org/plugins/maven-assembly-plugin/
>  ------------------------------
>
> *From:* Håkon Sagehaug [mailto:hakon.sagehaug@uni.no]
> *Sent:* Tuesday, February 08, 2011 10:45 AM
> *To:* java-user@axis.apache.org
> *Subject:* Using maven to create Client jar
>
>
>
> Hi all,
>
> I was wondering if anybody know of any maven plugins or tweeking so that
> one can build the jar for the client stubs. We want to use this when we
> release a new version of our web service. The release is 1. creating a aar
> file, using maven aar plugin, then it would be nice to be able to create a
> client jar with the stubs using some sort of maven configuration/plugin.
>
> Does anybody know of this or done similar stuff?
>
> cheers, Håkon
>
> ------------------------------
> STATEMENT OF CONFIDENTIALITY:
>
>
>
> The information contained in this electronic message and any attachments to
> this message are intended for the exclusive use of the addressee(s) and may
> contain confidential or privileged information. If you are not the intended
> recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
> and destroy all copies of this message and any attachments.
>



-- 
Regards,

Tharindu

RE: Using maven to create Client jar

Posted by "Caristi, Joe" <jc...@whisolutions.com>.
We use the Maven Assembly Plugin to do this:  http://maven.apache.org/plugins/maven-assembly-plugin/
________________________________
From: Håkon Sagehaug [mailto:hakon.sagehaug@uni.no]
Sent: Tuesday, February 08, 2011 10:45 AM
To: java-user@axis.apache.org
Subject: Using maven to create Client jar

Hi all,

I was wondering if anybody know of any maven plugins or tweeking so that one can build the jar for the client stubs. We want to use this when we release a new version of our web service. The release is 1. creating a aar file, using maven aar plugin, then it would be nice to be able to create a client jar with the stubs using some sort of maven configuration/plugin.

Does anybody know of this or done similar stuff?

cheers, Håkon

________________________________
STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.