added ivy build scripts for spring data graph projects
This commit is contained in:
75
build/ivy/build.xml
Normal file
75
build/ivy/build.xml
Normal file
@@ -0,0 +1,75 @@
|
||||
<project name="spring-data-graph-example" default="test" xmlns:ivy="antlib:org.apache.ivy.ant" basedir=".">
|
||||
<property name="settings.dir" location="settings" />
|
||||
<property name="lib.dir" location="lib" />
|
||||
|
||||
<import file="${settings.dir}/path.xml" />
|
||||
|
||||
<import file="${settings.dir}/install-ivy.xml" />
|
||||
<import file="${settings.dir}/path.xml" />
|
||||
|
||||
<taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties" classpath="${lib.dir}/aspectjtools.jar"/>
|
||||
|
||||
<target name="lib.retrieve" depends="install-ivy">
|
||||
<mkdir dir="${lib.dir}" />
|
||||
<ivy:settings file="${settings.dir}/ivysettings.xml" />
|
||||
<ivy:resolve file="${settings.dir}/ivy.xml" />
|
||||
<ivy:retrieve type="jar" pattern="${lib.dir}/[artifact].[ext]" changing="true"/>
|
||||
<ivy:retrieve type="bundle" pattern="${lib.dir}/[artifact].[ext]" changing="true"/>
|
||||
</target>
|
||||
|
||||
<target name="lib.clean">
|
||||
<delete dir="${lib.dir}" />
|
||||
</target>
|
||||
|
||||
<target name="clean" description="Removes the build directory, but not any cached ivy dependencies">
|
||||
<delete dir="target" />
|
||||
<delete dir="build" />
|
||||
</target>
|
||||
|
||||
<target name="compile" description="Compile production classes" depends="lib.retrieve">
|
||||
<mkdir dir="${main.target}" />
|
||||
|
||||
<iajc sourceroots="${main.src}" destDir="${main.target}" classpathref="path.libs" source="1.6">
|
||||
<aspectpath>
|
||||
<pathelement location="${lib.dir}/spring-aspects.jar"/>
|
||||
</aspectpath>
|
||||
<aspectpath>
|
||||
<pathelement location="${lib.dir}/spring-data-neo4j.jar"/>
|
||||
</aspectpath>
|
||||
</iajc>
|
||||
</target>
|
||||
|
||||
<target name="compile-tests" description="Compile unit test classes" depends="compile">
|
||||
<mkdir dir="${test.target}" />
|
||||
<copy todir="${main.target}" failonerror="false">
|
||||
<fileset dir="${main.resources}"/>
|
||||
</copy>
|
||||
<iajc sourceroots="${test.src}" destDir="${test.target}" classpathref="path.testing" source="1.6">
|
||||
<aspectpath>
|
||||
<pathelement location="${lib.dir}/spring-aspects.jar"/>
|
||||
</aspectpath>
|
||||
<aspectpath>
|
||||
<pathelement location="${lib.dir}/spring-data-neo4j.jar"/>
|
||||
</aspectpath>
|
||||
</iajc>
|
||||
</target>
|
||||
|
||||
<target name="test" depends="clean, compile, compile-tests">
|
||||
<mkdir dir="${test.reports}"/>
|
||||
<copy todir="${test.target}" failonerror="false">
|
||||
<fileset dir="${test.resources}" includes="**/*"/>
|
||||
</copy>
|
||||
|
||||
<fileset id="unittest.source.files" dir="${test.src}">
|
||||
<include name="**/*Test.java" />
|
||||
</fileset>
|
||||
|
||||
<junit printsummary="yes" showoutput="true" dir="." outputtoformatters="false">
|
||||
<classpath refid="path.testing"/>
|
||||
<formatter type="plain" />
|
||||
<batchtest fork="no" todir="${test.reports}">
|
||||
<fileset refid="unittest.source.files"/>
|
||||
</batchtest>
|
||||
</junit>
|
||||
</target>
|
||||
</project>
|
||||
29
build/ivy/settings/install-ivy.xml
Normal file
29
build/ivy/settings/install-ivy.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<project xmlns:ivy="antlib:org.apache.ivy.ant" basedir="..">
|
||||
|
||||
<property name="ivy.install.version" value="2.2.0" />
|
||||
<property name="ivy.jar.dir" location="${basedir}/.ivy" />
|
||||
<property name="ivy.jar.file" location="${ivy.jar.dir}/ivy.jar" />
|
||||
<property name="ivy.cache.dir" location="${basedir}/.ivy/cache" />
|
||||
|
||||
<target name="download-ivy" unless="skip.download">
|
||||
<mkdir dir="${ivy.jar.dir}"/>
|
||||
<get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
|
||||
dest="${ivy.jar.file}" usetimestamp="true"/>
|
||||
</target>
|
||||
|
||||
<target name="install-ivy" depends="download-ivy">
|
||||
<path id="ivy.lib.path">
|
||||
<fileset dir="${ivy.jar.dir}" includes="*.jar"/>
|
||||
</path>
|
||||
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
|
||||
</target>
|
||||
|
||||
<target name="clean-ivy">
|
||||
<delete dir="${ivy.jar.dir}"/>
|
||||
</target>
|
||||
|
||||
<target name="clean-ivy-cache" depends="install-ivy">
|
||||
<ivy:cleancache />
|
||||
</target>
|
||||
|
||||
</project>
|
||||
14
build/ivy/settings/ivy.xml
Normal file
14
build/ivy/settings/ivy.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven">
|
||||
<info organisation="org.springframework.data.neo4j.examples" module="hello-worlds"/>
|
||||
<dependencies>
|
||||
<dependency org="org.springframework.data" name="spring-data-neo4j" rev="1.0.0.RELEASE">
|
||||
<exclude module="jms"/>
|
||||
<exclude module="jmxtools"/>
|
||||
<exclude module="jmxri"/>
|
||||
</dependency>
|
||||
<dependency org="org.aspectj" name="aspectjrt" rev="1.6.11.RELEASE"/>
|
||||
<dependency org="org.aspectj" name="aspectjtools" rev="1.6.11.RELEASE"/>
|
||||
<dependency org="org.neo4j" name="neo4j-community" rev="1.3"/>
|
||||
<dependency org="junit" name="junit" rev="4.8.1"/>
|
||||
</dependencies>
|
||||
</ivy-module>
|
||||
23
build/ivy/settings/ivysettings.xml
Normal file
23
build/ivy/settings/ivysettings.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0"?>
|
||||
<ivysettings>
|
||||
<settings defaultResolver="chained"/>
|
||||
<property name="local-maven2-pattern"
|
||||
value="${user.home}/.m2/repository/[organisation]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]"
|
||||
override="false" />
|
||||
|
||||
<resolvers>
|
||||
<chain name="chained" returnFirst="false">
|
||||
<filesystem name="local-maven2" m2compatible="true" >
|
||||
<ivy pattern="${local-maven2-pattern}"/>
|
||||
<artifact pattern="${local-maven2-pattern}"/>
|
||||
</filesystem>
|
||||
<ibiblio name="neo4j" root="http://m2.neo4j.org/" m2compatible="true"/>
|
||||
<ibiblio name="maven_central" root="http://repo2.maven.org/maven2/" m2compatible="true"/>
|
||||
<ibiblio name="jboss" root="http://repository.jboss.org/nexus/content/groups/public/" m2compatible="true"/>
|
||||
<ibiblio name="springframework" root="http://maven.springframework.org/release" m2compatible="true"/>
|
||||
</chain>
|
||||
</resolvers>
|
||||
<caches>
|
||||
<cache name="default-cache" basedir="${ivy.cache.dir}" />
|
||||
</caches>
|
||||
</ivysettings>
|
||||
30
build/ivy/settings/path.xml
Normal file
30
build/ivy/settings/path.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" ?>
|
||||
|
||||
<project name="path" default="donothingToMakeAValidAntFile"
|
||||
basedir=".">
|
||||
|
||||
<property name="main.src" location="src/main/java" />
|
||||
<property name="main.resources" location="src/main/resources" />
|
||||
<property name="main.target" location="target/main/classes" />
|
||||
|
||||
<property name="test.src" location="src/test/java" />
|
||||
<property name="test.target" location="target/test/classes" />
|
||||
<property name="test.reports" location="target/test/reports" />
|
||||
<property name="test.resources" location="src/test/resources" />
|
||||
|
||||
<target name="donothingToMakeAValidAntFile" />
|
||||
|
||||
<path id="path.libs">
|
||||
<fileset dir="lib" />
|
||||
</path>
|
||||
|
||||
<path id="path.compile">
|
||||
<path refid="path.libs" />
|
||||
<dirset dir="${main.target}" />
|
||||
</path>
|
||||
|
||||
<path id="path.testing">
|
||||
<path refid="path.compile" />
|
||||
<dirset dir="${test.target}"/>
|
||||
</path>
|
||||
</project>
|
||||
Reference in New Issue
Block a user