I'm trying to generate with 'axis2-wsdl2code-maven-plugin' a separate jar for
the clients of my webservice (only containing the stub classes and their
dependencies) and a separate jar for the implementation of my webservice
(only containing the skeleton classes and their dependencies).

By including twice the 'axis2-wsdl2code-maven-plugin' and 'maven-jar-plugin'
plugins, I've been able to generate both JARs, but this is not a very clean
solution. The jar that contains both the stub and skeleton classes gets
still generated and published in my maven repository. I would like to avoid
this, such that only the separate JARs will be generated and published.

What is the best way to generate a separate stub and a separate skeleton JAR
by using one pom.xml ?

pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
        <parent>
                <groupId>be.fgov.minfin.stiron</groupId>
                <artifactId>stiron-sitran</artifactId>
                <version>0.6-SNAPSHOT</version>
        </parent>
        <modelVersion>4.0.0</modelVersion>
        <groupId>be.fgov.minfin.stiron</groupId>
        <artifactId>stiron-sitran-ws</artifactId>
        <name>${project.artifactId}</name>
        <packaging>jar</packaging>
        <version>0.6-SNAPSHOT</version>
        <properties>
        
<generated-sources-dir>${project.artifactId}/src/main</generated-sources-dir>
        </properties>

        <!-- axis2 -->
        <build>
                <resources>
                        <!-- required to include the generated 
schemaorg_apache_xmlbeans classes
-->
                        <resource>
                        
<directory>target/generated-sources/axis2/wsdl2code/resources</directory>
                                <filtering>true</filtering>
                        </resource>
                </resources>

                <plugins>
                        <plugin>
                                <artifactId>maven-compiler-plugin</artifactId>
                                <configuration>
                                        <source>1.6</source>
                                        <target>1.6</target>
                                </configuration>
                        </plugin>
                        <plugin>
                                <groupId>org.apache.axis2</groupId>
                                
<artifactId>axis2-wsdl2code-maven-plugin</artifactId>
                                <version>1.5.4</version>
                                <executions>
                                        <execution>
                                                <id>stub.wsdl2code</id>
                                                <goals>
                                                        <goal>wsdl2code</goal>
                                                </goals>
                                                <configuration>
                                                
<packageName>be.fgov.minfin.stiron.integratie.sitran.ws.stub</packageName>
                                                
<wsdlFile>${project.basedir}/src/main/resources/SITRAN-v3.wsdl</wsdlFile>
                                                        
<databindingName>xmlbeans</databindingName>
                                                        
<!--generateTestcase>true</generateTestcase-->
                                                        
<!--outputDirectory>${generated-sources-dir}</outputDirectory-->
                                                </configuration>
                                        </execution>
                                </executions>
                        </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-jar-plugin</artifactId>
                                <version>2.3.1</version>
                                <executions>
                                        <execution>
                                                <id>stub.jar</id>
                                                <goals>
                                                        <goal>jar</goal>
                                                </goals>
                                                <configuration>
                                                        
<classesDirectory></classesDirectory>
                                                        
<finalName>${project.build.finalName}-stub</finalName>
                                                        <includes>
                                                        
<include>be/fgov/minfin/stiron/integratie/sitran/ws/stub/**</include>
                                                                
<include>be/fgov/minfin/sitran/**</include>
                                                                
<include>org/**</include>
                                                                
<include>../resources/**</include>
                                                                
<include>../../../classes/**</include>
                                                        </includes>
                                                </configuration>
                                        </execution>
                                </executions>
                        </plugin>
                        <!-- TODO: check if generation should be done twice, or 
if we could
generate stub and skeleton in one shot -->
                        <plugin>
                                <groupId>org.apache.axis2</groupId>
                                
<artifactId>axis2-wsdl2code-maven-plugin</artifactId>
                                <version>1.5.4</version>
                                <executions>
                                        <execution>
                                                <id>skeleton.wsdl2code</id>
                                                <goals>
                                                        <goal>wsdl2code</goal>
                                                </goals>
                                                <configuration>
                                                
<packageName>be.fgov.minfin.stiron.integratie.sitran.ws.skeleton</packageName>
                                                
<wsdlFile>${project.basedir}/src/main/resources/SITRAN-v3.wsdl</wsdlFile>
                                                        
<databindingName>xmlbeans</databindingName>
                                                        
<generateServerSide>true</generateServerSide>
                                                        
<generateServerSideInterface>true</generateServerSideInterface>
                                                        
<!--generateTestcase>true</generateTestcase-->
                                                        
<!--outputDirectory>${generated-sources-dir}</outputDirectory-->
                                                </configuration>
                                        </execution>
                                </executions>
                        </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-jar-plugin</artifactId>
                                <version>2.3.1</version>
                                <executions>
                                        <execution>
                                                <id>skeleton.jar</id>
                                                <goals>
                                                        <goal>jar</goal>
                                                </goals>
                                                <configuration>
                                                        
<classesDirectory></classesDirectory>
                                                        
<finalName>${project.build.finalName}-skeleton</finalName>
                                                        <includes>
                                                        
<include>be/fgov/minfin/stiron/integratie/sitran/ws/skeleton/**</include>
                                                                
<include>be/fgov/minfin/sitran/**</include>
                                                                
<include>org/**</include>
                                                                
<include>../resources/**</include>
                                                                
<include>../../../classes/**</include>
                                                        </includes>
                                                </configuration>
                                        </execution>
                                </executions>
                        </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-install-plugin</artifactId>
                                <version>2.3.1</version>
                                <executions>
                                        <execution>
                                                <id>stub.install</id>
                                                <goals>
                                                        
<goal>install-file</goal>
                                                </goals>
                                                <configuration>
                                                        
<file>${project.build.finalName}-stub</file>
                                                </configuration>
                                        </execution>
                                </executions>
                        </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-install-plugin</artifactId>
                                <version>2.3.1</version>
                                <executions>
                                        <execution>
                                                <id>skeleton.install</id>
                                                <goals>
                                                        
<goal>install-file</goal>
                                                </goals>
                                                <configuration>
                                                        
<file>${project.build.finalName}-skeleton</file>
                                                </configuration>
                                        </execution>
                                </executions>
                        </plugin>
                </plugins>
        </build>

        <dependencies>
                <dependency>
                        <groupId>org.apache.xmlbeans</groupId>
                        <artifactId>xmlbeans</artifactId>
                        <version>2.4.0</version>
                </dependency>
                <dependency>
                        <groupId>org.apache.ws.commons.axiom</groupId>
                        <artifactId>axiom-impl</artifactId>
                        <version>1.2.7</version>
                </dependency>
                <dependency>
                        <groupId>org.apache.axis2</groupId>
                        <artifactId>axis2</artifactId>
                        <version>1.5.4</version>
                </dependency>
                <dependency>
                        <groupId>wsdl4j</groupId>
                        <artifactId>wsdl4j</artifactId>
                        <version>1.6.2</version>
                </dependency>
        </dependencies>

</project>
-- 
View this message in context: 
http://old.nabble.com/How-to-generate-a-stub-and-skeleton-jar-with-one-pom.xml-tp31734767p31734767.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to