[asterisk-scf-commits] asterisk-scf/release/slice.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Wed Feb 2 13:56:28 CST 2011
branch "master" has been updated
via 1aa6920d1e19c88a347c09cecc38dcd6ea781ed1 (commit)
from 18ffe3f2cda243ea1df79e9bc78c3d4ed15b570c (commit)
Summary of changes:
build.xml | 28 ++++------------------------
install-ice-jar.xml | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+), 24 deletions(-)
create mode 100644 install-ice-jar.xml
- Log -----------------------------------------------------------------
commit 1aa6920d1e19c88a347c09cecc38dcd6ea781ed1
Author: David M. Lee <dlee at digium.com>
Date: Wed Feb 2 13:56:23 2011 -0600
Extracted Ice.jar installation to its own file.
diff --git a/build.xml b/build.xml
index b6ff105..b2459bb 100644
--- a/build.xml
+++ b/build.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
<project name="asterisk-scf-api" default="install"
xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<property environment="env"/>
@@ -10,6 +11,8 @@
<property name="mvn.version" value="2.1.1"/>
+ <include file="install-ice-jar.xml" as="ice"/>
+
<taskdef name="slice2java" classpath="${env.ICE_HOME}/lib/ant-ice.jar"
classname="Slice2JavaTask"/>
@@ -19,29 +22,6 @@
uri="antlib:org.apache.maven.artifact.ant"
classpathref="maven-ant-tasks.classpath"/>
- <available property="ice-home-set" file="${env.ICE_HOME}"/>
-
- <target name="fail-if-no-ice-home" unless="ice-home-set">
- <fail message="ICE_HOME not set correctly (${env.ICE_HOME})"/>
- </target>
-
- <target name="get-ice-version" depends="fail-if-no-ice-home">
- <exec executable="${env.ICE_HOME}/bin/slice2java"
- outputproperty="ice-version">
- <arg value="--version"/>
- </exec>
- <filter token="ice-version" value="${ice-version}"/>
- </target>
-
- <target name="install-ice" depends="get-ice-version"
- description="Installs ice.jar from ICE_HOME into local Maven repo">
- <copy file="ice-pom.xml.in" tofile="${generated-pom-dir}/ice-pom.xml"
- filtering="true" failonerror="true"/>
- <artifact:pom id="ice-pom" file="${generated-pom-dir}/ice-pom.xml"/>
- <artifact:install file="${env.ICE_HOME}/lib/ice.jar"
- pomrefid="ice-pom"/>
- </target>
-
<target name="generate-sources"
description="Generate .java files from .slice sources">
<mkdir dir="${slice2java-dir}"/>
@@ -98,7 +78,7 @@
basedir="${javadoc-dir}"/>
</target>
- <target name="install" depends="package,get-ice-version"
+ <target name="install" depends="package,ice.get-ice-version"
description="installs packages into local Maven repo">
<copy file="pom.xml.in" tofile="${generated-pom-dir}/pom.xml"
filtering="true" failonerror="true"/>
diff --git a/install-ice-jar.xml b/install-ice-jar.xml
new file mode 100644
index 0000000..70afb79
--- /dev/null
+++ b/install-ice-jar.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project name="asterisk-scf-api" default="install-ice"
+ xmlns:artifact="antlib:org.apache.maven.artifact.ant">
+ <property environment="env"/>
+ <property name="generated-pom-dir"
+ value="target/tmp/pom"/>
+ <property name="ice.jar" location="${env.ICE_HOME}/lib/Ice.jar"/>
+
+ <property name="mvn.version" value="2.1.1"/>
+
+ <path id="maven-ant-tasks.classpath"
+ path="lib/maven-ant-tasks-${mvn.version}.jar"/>
+ <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
+ uri="antlib:org.apache.maven.artifact.ant"
+ classpathref="maven-ant-tasks.classpath"/>
+
+ <available property="ice-home-set" file="${env.ICE_HOME}"/>
+
+ <target name="fail-if-no-ice-home" unless="ice-home-set">
+ <fail message="ICE_HOME not set correctly (${env.ICE_HOME})"/>
+ </target>
+
+ <target name="get-ice-version" depends="fail-if-no-ice-home">
+ <exec executable="${env.ICE_HOME}/bin/slice2java"
+ outputproperty="ice-version">
+ <arg value="--version"/>
+ </exec>
+ <filter token="ice-version" value="${ice-version}"/>
+ </target>
+
+ <target name="ice-src" depends="fail-if-no-ice-home">
+ <!-- Ice.jar contains the sources. Extract them to a separate .jar -->
+ <jar destfile="target/Ice-sources.jar">
+ <zipfileset includes="**/*.java" src="${ice.jar}"/>
+ </jar>
+ </target>
+
+ <target name="install-ice" depends="get-ice-version,ice-src"
+ description="Installs ice.jar from ICE_HOME into local Maven repo">
+ <copy file="ice-pom.xml.in" tofile="${generated-pom-dir}/ice-pom.xml"
+ filtering="true" failonerror="true"/>
+ <artifact:pom id="ice-pom" file="${generated-pom-dir}/ice-pom.xml"/>
+ <artifact:install file="${env.ICE_HOME}/lib/Ice.jar"
+ pomrefid="ice-pom">
+ <attach file="target/Ice-sources.jar" classifier="sources"/>
+ </artifact:install>
+ </target>
+
+</project>
-----------------------------------------------------------------------
--
asterisk-scf/release/slice.git
More information about the asterisk-scf-commits
mailing list