Hi Devs,

The current Maven2 build of Axis2 dose not create the axis2-<version>.jar
artifact. There was a discussion in past what should be included in
Axis2.jar. With that in mind I would propose the following way to build the
axis2-<version>.jar out of Maven2 build.

Axis2-<version>.jar contains following classes from the given maven modules.

java2wsdl,kernel,tool,saaj,addressing,codegen,adb,adb-codegen, and xmlbeans
. {based on Maven1 maven.xml lines [353-366]}. Default will be for
Java 1.4version.

This artifact will be created using maven-antrun-plugin and
build-helper-maven-plugin and its available in Axis2 root pom.xml. {diff is
attached herewith}.

Just a thought :

If we are giving major axis2-version.jar for Java 1.4 or  1.5 or 1.6,
wonder whether we could build axis2-1.4-<version>.jar axis2-1.5-<version>.jar
and axis2-1.6-<version>.jar. Thus, 1.4 version will contain only classes for
that environment, 1.5 will use Axis2 1.5 modules like, jaxws, clustering
etc, and 1.6 for that environment.

At the moment this attached  patch will create Axis2-<version>.jar with the
prior mentioned modules.

Please  be kind enough to express you  consensus on prior.

Thank you

Saminda


--
Saminda Abeyruwan

Software Engineer
WSO2 Inc. - www.wso2.org
Index: pom.xml
===================================================================
--- pom.xml     (revision 518898)
+++ pom.xml     (working copy)
@@ -16,95 +16,98 @@
        ! limitations under the License.
        !-->
 <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";>
-       <parent>
-               <groupId>org.apache</groupId>
-               <artifactId>apache</artifactId>
-               <version>3</version>
-       </parent>
-       <modelVersion>4.0.0</modelVersion>
-       <groupId>org.apache.axis2</groupId>
-       <artifactId>axis2</artifactId>
-       <version>SNAPSHOT</version>
-       <packaging>pom</packaging>
-       <name>Apache Axis 2.0 - Root</name>
-       <modules>
-               <module>modules/tool/axis2-aar-maven-plugin</module>
-               <module>modules/tool/axis2-ant-plugin</module>
-               
<!--<module>modules/tool/axis2-eclipse-codegen-plugin</module>-->
-               
<!--<module>modules/tool/axis2-eclipse-service-plugin</module>-->
-               <module>modules/tool/axis2-idea-plugin</module>
-               <module>modules/tool/axis2-java2wsdl-maven-plugin</module>
-               <module>modules/tool/axis2-wsdl2code-maven-plugin</module>
-               <module>modules/tool/axis2-mar-maven-plugin</module>
-               <module>modules/parent</module>
-               <module>modules/addressing</module>
-               <module>modules/java2wsdl</module>
-               <module>modules/kernel</module>
-               <!--<module>modules/tool</module>-->
-               <module>modules/adb</module>
-               <module>modules/codegen</module>
-               <module>modules/adb-codegen</module>
-               <module>modules/jibx</module>
-               <module>modules/xmlbeans</module>
-               <module>modules/json</module>
-               <module>modules/mtompolicy</module>
-               <module>modules/spring</module>
-       </modules>
-       <profiles>
-               <profile>
-                       <id>java15</id>
-                       <activation>
-                               <jdk>1.5</jdk>
-                       </activation>
-                       <modules>
-                               <module>modules/jaxbri</module>
-                               <module>modules/metadata</module>
-                               <module>modules/saaj-api</module>
-                               <module>modules/saaj</module>
-                               <module>modules/jaxws-api</module>
-                               <module>modules/jaxws</module>
-                       </modules>
-               </profile>
-               <profile>
-                       <id>java16</id>
-                       <activation>
-                               <jdk>1.6</jdk>
-                       </activation>
-                       <modules>
-                               <module>modules/jaxbri</module>
-                               <module>modules/metadata</module>
-                               <module>modules/saaj-api</module>
-                               <module>modules/saaj</module>
-                               <module>modules/jaxws-api</module>
-                               <module>modules/jaxws</module>
-                       </modules>
-               </profile>
-       </profiles>
+         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";>
+    <parent>
+        <groupId>org.apache</groupId>
+        <artifactId>apache</artifactId>
+        <version>3</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.axis2</groupId>
+    <artifactId>axis2</artifactId>
+    <version>SNAPSHOT</version>
+    <packaging>pom</packaging>
+    <name>Apache Axis 2.0 - Root</name>
+    <modules>
+        <module>modules/tool/axis2-aar-maven-plugin</module>
+        <module>modules/tool/axis2-ant-plugin</module>
+        <!--<module>modules/tool/axis2-eclipse-codegen-plugin</module>-->
+        <!--<module>modules/tool/axis2-eclipse-service-plugin</module>-->
+        <module>modules/tool/axis2-idea-plugin</module>
+        <module>modules/tool/axis2-java2wsdl-maven-plugin</module>
+        <module>modules/tool/axis2-wsdl2code-maven-plugin</module>
+        <module>modules/tool/axis2-mar-maven-plugin</module>
+        <module>modules/parent</module>
+        <module>modules/addressing</module>
+        <module>modules/java2wsdl</module>
+        <module>modules/kernel</module>
+        <!--<module>modules/tool</module>-->
+        <module>modules/adb</module>
+        <module>modules/codegen</module>
+        <module>modules/adb-codegen</module>
+        <module>modules/jibx</module>
+        <module>modules/xmlbeans</module>
+        <module>modules/json</module>
+        <module>modules/mtompolicy</module>
+        <module>modules/spring</module>
+    </modules>
+    <profiles>
+        <profile>
+            <id>java15</id>
+            <activation>
+                <jdk>1.5</jdk>
+            </activation>
+            <modules>
+                <module>modules/jaxbri</module>
+                <module>modules/metadata</module>
+                <module>modules/saaj-api</module>
+                <module>modules/saaj</module>
+                <module>modules/jaxws-api</module>
+                <module>modules/jaxws</module>
+            </modules>
+        </profile>
+        <profile>
+            <id>java16</id>
+            <activation>
+                <jdk>1.6</jdk>
+            </activation>
+            <modules>
+                <module>modules/jaxbri</module>
+                <module>modules/metadata</module>
+                <module>modules/saaj-api</module>
+                <module>modules/saaj</module>
+                <module>modules/jaxws-api</module>
+                <module>modules/jaxws</module>
+            </modules>
+        </profile>
+    </profiles>
 
-       <ciManagement>
-            <system>continuum</system>
-            <url>http://vmbuild.apache.org/continuum</url>
-            <notifiers>
-                <notifier>
-                    <configuration>
-                        <address>[EMAIL PROTECTED]</address>
-                    </configuration>
-                </notifier>
-            </notifiers>
-        </ciManagement>
+    <ciManagement>
+        <system>continuum</system>
+        <url>http://vmbuild.apache.org/continuum</url>
+        <notifiers>
+            <notifier>
+                <configuration>
+                    <address>[EMAIL PROTECTED]</address>
+                </configuration>
+            </notifier>
+        </notifiers>
+    </ciManagement>
 
-       <scm>
-               
<connection>scm:svn:http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/</connection>
-               
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/webservices/axis2/trunk/java/</developerConnection>
-               
<url>http://svn.apache.org/viewvc/webservices/axis2/trunk/java/</url>
-       </scm>
-       <distributionManagement>
+    <scm>
+        <connection>
+            
scm:svn:http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/</connection>
+        <developerConnection>
+            
scm:svn:https://svn.apache.org/repos/asf/webservices/axis2/trunk/java/</developerConnection>
+        <url>http://svn.apache.org/viewvc/webservices/axis2/trunk/java/</url>
+    </scm>
+    <distributionManagement>
         <repository>
             <id>apache-repo</id>
             <name>Maven Central Repository</name>
-            
<url>scpexe://people.apache.org//www/people.apache.org/repo/m2-ibiblio-rsync-repository</url>
+            <url>
+                
scpexe://people.apache.org//www/people.apache.org/repo/m2-ibiblio-rsync-repository</url>
         </repository>
         <snapshotRepository>
             <id>apache-snapshots</id>
@@ -112,4 +115,63 @@
             
<url>scpexe://people.apache.org//www/people.apache.org/repo/m2-snapshot-repository</url>
         </snapshotRepository>
     </distributionManagement>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <version>1.1</version>
+                <executions>
+                    <execution>
+                        <id>axis2-jar</id>
+                        <phase>package</phase>
+                        <configuration>
+                            <tasks>
+                                <mkdir dir="target/lib"/>
+                                <jar 
destfile="target/lib/axis2-${pom.version}.jar">
+                                    <fileset 
dir="modules/java2wsdl/target/classes"/>
+                                    <fileset 
dir="modules/kernel/target/classes"/>
+                                    <!-- adding the tool classes. This is 
needed to get the ant task -->
+                                    <fileset 
dir="modules/tool/target/classes"/>
+                                    <fileset 
dir="modules/saaj/target/classes"/>
+                                    <fileset 
dir="modules/addressing/target/classes"/>
+                                    <fileset 
dir="modules/codegen/target/classes"/>
+                                    <fileset dir="modules/adb/target/classes"/>
+                                    <fileset 
dir="modules/adb-codegen/target/classes"/>
+                                    <fileset 
dir="modules/xmlbeans/target/classes"/>
+                                </jar>
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>1.0</version>
+                <executions>
+                    <execution>
+                        <id>axis2-jar-package</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>attach-artifact</goal>
+                        </goals>
+                        <configuration>
+                            <artifacts>
+                                <artifact>
+                                    
<file>target/lib/axis2-${pom.version}.jar</file>
+                                    <type>jar</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
 </project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to