Permalink
Browse files

[TTALE-102] Switch build environment to Ant+Ivy

  • Loading branch information...
1 parent 2bace71 commit def1ab841520c99f11020fb59b6d7ec4e101afea jesper.pedersen committed Nov 14, 2009
Showing with 135 additions and 7 deletions.
  1. +39 −7 build.xml
  2. +10 −0 doc/developerguide/en/modules/building.xml
  3. +45 −0 ivy.settings.xml
  4. +41 −0 ivy.xml
  5. BIN lib/ant.jar
  6. BIN lib/javassist.jar
View
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<project name="jboss-tattletale" default="dist" basedir=".">
+<project name="jboss-tattletale"
+ default="dist"
+ basedir="."
+ xmlns:ivy="antlib:org.apache.ivy.ant">
+
<property name="build.dir" value="${basedir}/build"/>
<property name="lib.dir" value="${basedir}/lib"/>
<property name="doc.dir" value="${basedir}/doc"/>
@@ -21,17 +25,30 @@
<property name="jboss-tattletale.jar" value="jboss-tattletale.jar"/>
+ <!-- =================================
+ Repositories
+ ================================= -->
+ <property name="central.repo" value="http://repo1.maven.org/maven2"/>
+ <property name="jboss.repo" value="http://repository.jboss.org/maven2"/>
+ <property name="snapshots.repo" value="http://snapshots.jboss.org/maven2"/>
+
+ <!-- =================================
+ Versions
+ ================================= -->
+ <property name="version.ant" value="1.6.5"/>
+ <property name="version.javassist" value="3.11.0.GA"/>
+
<!-- =================================================================== -->
<!-- Define the class path -->
<!-- =================================================================== -->
<path id="class.path">
- <fileset dir="${lib.dir}">
+ <fileset dir="${lib.dir}/core">
<include name="*.jar"/>
</fileset>
</path>
<path id="test.class.path">
- <fileset dir="${lib.dir}">
+ <fileset dir="${lib.dir}/test">
<include name="*.jar"/>
</fileset>
<fileset dir="${dist.dir}">
@@ -41,7 +58,7 @@
<path id="checkstyle.class.path">
<fileset dir="${tools.dir}/checkstyle/lib"/>
- <fileset dir="${lib.dir}">
+ <fileset dir="${lib.dir}/core">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${dist.dir}">
@@ -53,20 +70,28 @@
<!-- Initialize -->
<!-- =================================================================== -->
<target name="init">
+ <ivy:settings file="${basedir}/ivy.settings.xml"/>
</target>
+ <!-- =================================
+ Target: resolve
+ ================================= -->
+ <target name="resolve" depends="init">
+ <ivy:retrieve pattern="${lib.dir}/[conf]/[artifact].[ext]" sync="true"/>
+ </target>
+
<!-- =================================================================== -->
<!-- Prepares the directory structure -->
<!-- =================================================================== -->
<target name="prepare" depends="init">
- <mkdir dir="${build.dir}"/>
- <mkdir dir="${dist.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${dist.dir}"/>
</target>
<!-- =================================================================== -->
<!-- Jars -->
<!-- =================================================================== -->
- <target name="jars" depends="prepare">
+ <target name="jars" depends="prepare,resolve">
<delete dir="${build.dir}"/>
<mkdir dir="${build.dir}"/>
<javac
@@ -230,4 +255,11 @@
<delete file="*.tar.bz2"/>
</target>
+ <!-- =================================
+ Target: clean-cache
+ ================================= -->
+ <target name="clean-cache">
+ <ivy:cleancache />
+ </target>
+
</project>
@@ -45,6 +45,16 @@ export PATH
</section>
+ <section id="ivy">
+ <title>Apache Ivy</title>
+ <para>You must have Apache Ivy 2.1+ installed in your Apache Ant installation.</para>
+
+ <programlisting>
+cp ivy.jar $ANT_HOME/lib
+ </programlisting>
+
+ </section>
+
<section id="subversion">
<title>Subversion</title>
<para>You must have Subversion 1.5+ installed on your system.</para>
View
@@ -0,0 +1,45 @@
+<!--
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<ivysettings>
+ <settings defaultResolver="default"/>
+ <caches defaultCacheDir="${user.home}/.ivy2/cache"
+ artifactPattern="[organisation]/[module]/[type]s/[artifact]-[revision](-[classifier]).[ext]"
+ checkUpToDate="true"/>
+ <resolvers>
+ <filesystem name="local">
+ <ivy pattern="${ivy.cache.dir}/[module]/ivy-[revision].xml"/>
+ <artifact pattern="${ivy.cache.dir}/[module]/[artifact]-[revision](-[classifier]).[ext]"/>
+ </filesystem>
+ <ibiblio name="jboss" m2compatible="true" usepoms="false" root="${jboss.repo}"
+ pattern="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
+ <ibiblio name="snapshots" m2compatible="true" usepoms="false" root="${snapshots.repo}"
+ pattern="[organisation]/[module]/[revision]/[artifact]-[snapshotrevision](-[classifier]).[ext]"/>
+ <ibiblio name="central" m2compatible="true" usepoms="false" root="${central.repo}"
+ pattern="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
+ <chain name="default" returnFirst="true">
+ <resolver ref="local"/>
+ <resolver ref="jboss"/>
+ <resolver ref="snapshots"/>
+ <resolver ref="central"/>
+ </chain>
+ </resolvers>
+</ivysettings>
View
41 ivy.xml
@@ -0,0 +1,41 @@
+<!--
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<ivy-module version="2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
+
+ <info organisation="org.jboss"
+ module="jboss-tattletale">
+ <license name="lgpl" url="http://repository.jboss.org/licenses/lgpl.txt"/>
+ <repository name="jboss" url="http://repository.jboss.org"/>
+ </info>
+
+ <configurations>
+ <conf name="core" transitive="false"/>
+ </configurations>
+
+ <dependencies>
+ <dependency org="ant" name="ant" rev="${version.ant}" conf="core->default"/>
+ <dependency org="javassist" name="javassist" rev="${version.javassist}" conf="core->default"/>
+ </dependencies>
+
+</ivy-module>
View
Binary file not shown.
View
Binary file not shown.

0 comments on commit def1ab8

Please sign in to comment.