0
복사 정적 jar 파일 IVY 통해 항아리와 ANT를 대상으로 : 나는 jar 파일을 생성하는 개미와 아이비를 사용하고복사 정적 jar 파일은 아이비와 ANT를 통해 단지를 대상으로
을, 내가 해요 6 개 항아리가 $ {build.google.reports.jars.dir} 디렉토리에 복사합니다. 이들은 정적 파일이지만 IVY를 통해 가져오고 싶습니다.
아이비 설치 및 검색을 시도했지만 행운이 없습니다. 누군가 아이비 캐시 또는 $ {build.jar.file} jar 파일의 다른 더 나은 솔루션에서 복사 할 수 있습니까?
ivy.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<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="google" module="google-utils" status="integration"/>
<dependencies>
<dependency org="log4j" name="apache-log4j-extras" rev="1.0"/>
<dependency org="commons-cli" name="commons-cli" rev="1.2"/>
<dependency org="dom4j" name="dom4j" rev="1.5.2" />
<dependency org="jaxen" name="jaxen" rev="1.1.3"/>
<dependency org="log4j" name="log4j" rev="1.2.16" />
<dependency org="net.sf.staf" name="jstaf" rev="3.4.4"/>
</dependencies>
</ivy-module>
의 build.xml
<project name="google-utils" default="jar" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<import file="../google-global.xml"/>
<property name="build.google.dir" location="${build.dir}/google"/>
<property name="build.google.jars.dir" location="${build.google.dir}/STAF-INF/jars"/>
<property name="build.google.classes.dir" location="${build.google.dir}/STAF-INF/classes"/>
<property name="build.google.reports" location="${build.google.dir}/reports" />
<property name="build.google.reports.classes.dir" location="${build.google.reports}/STAF-INF/classes"/>
<property name="build.google.reports.jars.dir" location="${build.google.reports}/STAF-INF/jars"/>
<property name="build.jar.file" location="${dist.dir}/googleResults.jar"/>
<target name="jar" depends="google-reports" description="Default target to create jar file"/>
<target name="google-reports" depends="compile" description="Creates google jar file">
<copy todir="${build.google.reports.jars.dir}">
<fileset dir="jars">
<include name="apache-log4j-extras-1.0.jar" />
<include name="commons-cli-1.2.jar" />
<include name="dom4j-1.5.2.jar" />
<include name="jaxen-1.1.3.jar" />
<include name="log4j-1.2.16.jar" />
<include name="jstaf-3.4.4.jar" />
</fileset>
</copy>
<copy todir="${build.google.reports.classes.dir}">
<fileset dir="${build.classes.dir}" />
</copy>
<jar destfile="${build.jar.file}" basedir="${build.google.reports}">
<manifest>
<attribute name="Main-Class" value="google.Driver" />
<section name="google/service/info">
<attribute name="Service-Class" value="com.google.reports.ResultsGoogle" />
<attribute name="Packaged-Jars" value="apache-log4j-extras-1.0 commons-cli-1.2 dom4j-1.5.2 jaxen-1.1.3 log4j-1.2.16 jstaf-3.4.4"/>
</section>
</manifest>
</jar>
</target>
</project>