[jbossws-commits] JBossWS SVN: r6497 - in common/trunk: src/main and 1 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Fri Apr 18 06:00:28 EDT 2008


Author: thomas.diesler at jboss.com
Date: 2008-04-18 06:00:28 -0400 (Fri, 18 Apr 2008)
New Revision: 6497

Added:
   common/trunk/profiles-example.xml
   common/trunk/src/main/ant/
   common/trunk/src/main/ant/build-install.xml
Modified:
   common/trunk/pom.xml
Log:
Add ant scripts for install target

Modified: common/trunk/pom.xml
===================================================================
--- common/trunk/pom.xml	2008-04-18 09:58:12 UTC (rev 6496)
+++ common/trunk/pom.xml	2008-04-18 10:00:28 UTC (rev 6497)
@@ -1,11 +1,14 @@
 <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>
+  
+  <name>JBoss Web Services - Common</name>
   <groupId>org.jboss.ws</groupId>
   <artifactId>jbossws-common</artifactId>
   <packaging>jar</packaging>
+  
   <version>3.0.0-SNAPSHOT</version>
-  <name>JBoss Web Services - Common</name>
+  
   <organization>
     <name>JBoss, a division of Red Hat</name>
     <url>http://www.jboss.org</url>
@@ -79,6 +82,24 @@
           </archive>
         </configuration>
       </plugin>
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>install</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <tasks>
+                <property name="version.id" value="${project.version}"/>
+                <property name="jboss.local.repository" value="${jboss.local.repository}"/>
+                <ant antfile="src/main/ant/build-install.xml" target="install"/>
+              </tasks>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
   

Added: common/trunk/profiles-example.xml
===================================================================
--- common/trunk/profiles-example.xml	                        (rev 0)
+++ common/trunk/profiles-example.xml	2008-04-18 10:00:28 UTC (rev 6497)
@@ -0,0 +1,18 @@
+<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">
+
+  <!-- This profile can also be defined in ~/.m2/settings.xml -->   
+  <profiles>
+    <profile>
+      <id>user-profile</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <properties>
+        <!-- The location of the legacy jboss repository -->
+        <jboss.local.repository>/home/tdiesler/svn/jboss.local.repository</jboss.local.repository>
+      </properties>
+    </profile>
+  </profiles>
+  
+</project>
\ No newline at end of file


Property changes on: common/trunk/profiles-example.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: common/trunk/src/main/ant/build-install.xml
===================================================================
--- common/trunk/src/main/ant/build-install.xml	                        (rev 0)
+++ common/trunk/src/main/ant/build-install.xml	2008-04-18 10:00:28 UTC (rev 6497)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!--                                                                        -->
+<!--  JBoss, the OpenSource J2EE webOS                                      -->
+<!--                                                                        -->
+<!--  Distributable under LGPL license.                                     -->
+<!--  See terms of license at http://www.gnu.org.                           -->
+<!--                                                                        -->
+<!-- ====================================================================== -->
+
+<!-- $Id$ -->
+
+<project>
+  
+  <!-- ================================================================== -->
+  <!-- Setup                                                              -->
+  <!-- ================================================================== -->
+  
+  <property name="common.dir" value="${basedir}"/>
+  <property name="common.etc.dir" value="${common.dir}/src/main/etc"/>
+  <property name="common.target.dir" value="${common.dir}/target"/>
+  
+  <!-- ================================================================== -->
+  <!-- Initialization                                                     -->
+  <!-- ================================================================== -->
+  
+  <target name="init">
+    <property name="repository.id" value="${version.id}"/>
+    <echo message="version.id=${version.id}"/>
+    <echo message="repository.id=${repository.id}"/>
+    <echo message="jboss.local.repository=${jboss.local.repository}"/>
+  </target>
+  
+  <target name="check-properties" depends="init">
+    <available property="jboss.local.repository.available" type="dir" file="${jboss.local.repository}"/>
+    <fail message="Cannot find directory ${jboss.local.repository}. Did you copy profiles-example.xml?" unless="jboss.local.repository.available"/>
+  </target>
+  
+  <!-- ================================================================== -->
+  <!-- Installation                                                       -->
+  <!-- ================================================================== -->
+  
+  <!-- Install to jboss.local.repository -->
+  <target name="install" depends="check-properties" description="Install to jboss.local.repository">
+    
+    <!-- Check if the target jar is available -->
+    <available property="jbossws.common.jar.available" file="${common.target.dir}/jbossws-common-${version.id}.jar"/>
+    <fail message="Cannot find jbossws-common-${version.id}.jar. Did you run 'mvn package'?" unless="jbossws.common.jar.available"/>
+    
+    <!-- Check if the source jar is available -->
+    <available property="jbossws.common.sources.jar.available" file="${common.target.dir}/jbossws-common-${version.id}-sources.jar"/>
+    <fail message="Cannot find jbossws-common-${version.id}-sources.jar. Did you run 'mvn source:jar'?" unless="jbossws.common.sources.jar.available"/>
+    
+    <!-- jboss/jbossws-common -->
+    <property name="jboss.repository.dir" value="${jboss.local.repository}/jboss/jbossws-common/${repository.id}"/>
+    <mkdir dir="${jboss.repository.dir}/lib"/>
+    <copy file="${common.target.dir}/jbossws-common-${version.id}.jar" tofile="${jboss.repository.dir}//lib/jbossws-common.jar" overwrite="true"/>
+    <copy file="${common.target.dir}/jbossws-common-${version.id}-sources.jar" tofile="${jboss.repository.dir}/lib/jbossws-common-src.jar" overwrite="true"/>
+    <copy file="${common.target.dir}/etc/component-info.xml" tofile="${jboss.repository.dir}/component-info.xml" overwrite="true"/>
+  </target>
+  
+</project>


Property changes on: common/trunk/src/main/ant/build-install.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jbossws-commits mailing list