[Yanel-commits] rev 41657 - in public/yanel/trunk/src/contributions/resources/resource-creator: . src/build

michi at wyona.com michi at wyona.com
Fri Feb 20 11:09:03 CET 2009


Author: michi
Date: 2009-02-20 11:09:03 +0100 (Fri, 20 Feb 2009)
New Revision: 41657

Added:
   public/yanel/trunk/src/contributions/resources/resource-creator/src/build/pom.xml
Modified:
   public/yanel/trunk/src/contributions/resources/resource-creator/build.xml
Log:
make resource available for dependencies

Modified: public/yanel/trunk/src/contributions/resources/resource-creator/build.xml
===================================================================
--- public/yanel/trunk/src/contributions/resources/resource-creator/build.xml	2009-02-20 08:25:17 UTC (rev 41656)
+++ public/yanel/trunk/src/contributions/resources/resource-creator/build.xml	2009-02-20 10:09:03 UTC (rev 41657)
@@ -2,6 +2,15 @@
 
 <project name="yanel-resource" default="compile">
 
+  <!-- For example set within build.sh ... -->
+  <property name="yanel.home" value="${yanel.source.home}"/>
+  <!-- See yanel.home ... -->
+  <property file="${user.home}/.ant-global.properties"/>
+  <echo>YANEL_HOME is set to: ${yanel.home}</echo>
+
+  <property file="${yanel.home}/src/build/local.build.properties"/>
+  <property file="${yanel.home}/src/build/build.properties"/>
+
   <import file="src/build/dependencies.xml"/>
 
   <target name="init" description="Initialize build" depends="dependencies">
@@ -33,6 +42,7 @@
     <jar destfile="${resource.lib.dir}/yanel-resource-${resource.name}-${resource.version}.jar"
       basedir="${resource.classes.dir}"
     />
+    <antcall target="install-jar"/>
   </target>
 
   <target name="clean" depends="init">
@@ -45,4 +55,20 @@
       <mapper type="flatten"/>
     </copy>
   </target>
+
+  <target name="install-jar" description="Place jar file for this resource into local maven repository" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
+    <copy file="src/build/pom.xml" tofile="build/lib/pom.xml"/>
+
+    <replace file="build/lib/pom.xml" value="${resource.version}">
+      <replacetoken>@VERSION@</replacetoken>
+    </replace>
+    <replace file="build/lib/pom.xml" value="${resource.name}">
+      <replacetoken>@NAME@</replacetoken>
+    </replace>
+
+    <artifact:pom id="maven.project.core" file="build/lib/pom.xml"/>
+    <artifact:install file="build/lib/yanel-resource-${resource.name}-${resource.version}.jar">
+      <pom refid="maven.project.core"/>
+    </artifact:install>
+  </target>
 </project>

Added: public/yanel/trunk/src/contributions/resources/resource-creator/src/build/pom.xml
===================================================================
--- public/yanel/trunk/src/contributions/resources/resource-creator/src/build/pom.xml	                        (rev 0)
+++ public/yanel/trunk/src/contributions/resources/resource-creator/src/build/pom.xml	2009-02-20 10:09:03 UTC (rev 41657)
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>wyona-org-yanel</groupId>
+  <artifactId>yanel-resource- at NAME@</artifactId>
+  <version>@VERSION@</version>
+</project>



More information about the Yanel-commits mailing list