You are viewing a plain text version of this content. The canonical link for it is here.
Posted to easyant-commits@incubator.apache.org by jl...@apache.org on 2012/10/07 14:15:39 UTC
svn commit: r1395310 - in /incubator/easyant/core/trunk: build.xml
easyant-conf.xml ivysettings.xml module.ant sample-easyant-ivysettings.xml
Author: jlboudart
Date: Sun Oct 7 14:15:38 2012
New Revision: 1395310
URL: http://svn.apache.org/viewvc?rev=1395310&view=rev
Log:
Refactor easyant build
do not depend on third-party-repository
do not ship ivysettings.xml in distributions
refactor full-dist to have two directories one for sources one for distribution
Added:
incubator/easyant/core/trunk/sample-easyant-ivysettings.xml
Modified:
incubator/easyant/core/trunk/build.xml
incubator/easyant/core/trunk/easyant-conf.xml
incubator/easyant/core/trunk/ivysettings.xml
incubator/easyant/core/trunk/module.ant
Modified: incubator/easyant/core/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/core/trunk/build.xml?rev=1395310&r1=1395309&r2=1395310&view=diff
==============================================================================
--- incubator/easyant/core/trunk/build.xml (original)
+++ incubator/easyant/core/trunk/build.xml Sun Oct 7 14:15:38 2012
@@ -15,38 +15,41 @@
limitations under the License.
-->
<project name="boostrap" default="dist" xmlns:ivy="antlib:org.apache.ivy.ant">
+ <property name="bootstrap.dir" value="${basedir}/target/bootstrap"/>
<target name="ivy:init">
+ <mkdir dir="${bootstrap.dir}"/>
+ <property name="ivy.version" value="2.3.0-rc1"/>
+ <property name="ivy.jar.url" value="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar"/>
+ <get src="${ivy.jar.url}" dest="${bootstrap.dir}/ivy.jar" usetimestamp="true"/>
<path id="ivy.lib.path">
- <fileset dir="${basedir}/repository/third-party-lib/org.apache.ivy/ivy/2.3.0-r1201268" includes="*.jar" />
+ <fileset dir="${bootstrap.dir}" includes="ivy.jar"/>
</path>
+
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path" />
</target>
<target name="clean">
- <delete dir="${basedir}/target/bootstrap" failonerror="false" />
+ <delete dir="${bootstrap.dir}" failonerror="false" />
</target>
<target name="compile" depends="ivy:init">
<ivy:configure file="${basedir}/ivysettings-bootstrap.xml" />
<ivy:resolve file="${basedir}/module.ivy" />
<ivy:cachepath pathid="default.classpath" conf="default" />
- <mkdir dir="${basedir}/target/bootstrap/classes" />
- <javac srcdir="${basedir}/src/main/java" destdir="${basedir}/target/bootstrap/classes" includeantruntime="false" debug="true">
+ <mkdir dir="${bootstrap.dir}/classes" />
+ <javac srcdir="${basedir}/src/main/java" destdir="${bootstrap.dir}/classes" includeantruntime="false" debug="true">
<classpath refid="default.classpath" />
</javac>
- <copy todir="${basedir}/target/bootstrap/classes">
+ <copy todir="${bootstrap.dir}/classes">
<fileset dir="${basedir}/src/main/resources" />
</copy>
- <copy todir="${basedir}/target/bootstrap/classes/org/apache/easyant/">
- <fileset dir="${basedir}/repository" includes="extra-modules/**" />
- </copy>
<ivy:info file="${basedir}/module.ivy" />
<tstamp>
<format property="now" pattern="yyyyMMddHHmmss" />
</tstamp>
<property name="version" value="${ivy.revision}-build-${now}" />
- <propertyfile file="${basedir}/target/bootstrap/classes/META-INF/version.properties" comment="Generated by easyant">
+ <propertyfile file="${bootstrap.dir}/classes/META-INF/version.properties" comment="Generated by easyant">
<entry key="APPLICATION-NAME" value="${ivy.module}" />
<entry key="SPEC-VERSION" value="${ivy.revision}" />
<entry key="APPLICATION_ORG" value="${ivy.organisation}" />
@@ -56,7 +59,7 @@
</target>
<target name="jar" depends="compile">
- <jar destfile="${basedir}/target/bootstrap/easyant.jar" basedir="${basedir}/target/bootstrap/classes" />
+ <jar destfile="${bootstrap.dir}/easyant.jar" basedir="${bootstrap.dir}/classes" />
</target>
<target name="dist" depends="jar">
@@ -64,7 +67,7 @@
<java classname="org.apache.easyant.core.EasyAntMain" failonerror="true" fork="${bootstrap.fork}">
<classpath>
<path refid="default.classpath" />
- <pathelement location="${basedir}/target/bootstrap/easyant.jar" />
+ <pathelement location="${bootstrap.dir}/easyant.jar" />
<!--
Ant will try to find the tools.jar using java.home System property, but sometimes
this points to JDK, and sometimes to JRE.
Modified: incubator/easyant/core/trunk/easyant-conf.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/core/trunk/easyant-conf.xml?rev=1395310&r1=1395309&r2=1395310&view=diff
==============================================================================
--- incubator/easyant/core/trunk/easyant-conf.xml (original)
+++ incubator/easyant/core/trunk/easyant-conf.xml Sun Oct 7 14:15:38 2012
@@ -15,10 +15,10 @@
limitations under the License.
-->
<easyant-config>
- <ivysettings file="${easyant.home}/ivysettings.xml"/>
<system-plugins>
<plugin mrid="org.apache.easyant.plugins#skeleton;0.9" as="skeleton"/>
<plugin mrid="org.apache.easyant.plugins#ivy-repo-management;0.9" as="repo-management"/>
+ <plugin mrid="org.apache.easyant.plugins#offline;0.9"/>
</system-plugins>
</easyant-config>
Modified: incubator/easyant/core/trunk/ivysettings.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/core/trunk/ivysettings.xml?rev=1395310&r1=1395309&r2=1395310&view=diff
==============================================================================
--- incubator/easyant/core/trunk/ivysettings.xml (original)
+++ incubator/easyant/core/trunk/ivysettings.xml Sun Oct 7 14:15:38 2012
@@ -15,23 +15,21 @@
limitations under the License.
-->
<ivysettings>
- <include file="${ivy.settings.dir}/repository/third-party-lib/third-party-ivysettings.xml"/>
+ <!-- Ivy settings for easyant developpers, this should not be included in easyant distribution -->
<include url="${easyant.default.ivysettings.url}"/>
<settings defaultResolver="main"/>
<resolvers>
- <!--define your own easyant modules repository here
- <filesystem name="custom-easyant-modules">
- <ivy pattern="${ivy.settings.dir}/repository/shared/[organisation]/[module]/[revision]/[module].ivy"/>
- <artifact pattern="${ivy.settings.dir}/repository/shared/[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]"/>
- </filesystem>
- -->
<chain name="main" returnFirst="true">
<!-- core modules provided by easyant full distribution -->
<resolver ref="easyant-core-modules"/>
<resolver ref="easyant-shared-modules"/>
<!-- easyant public repository -->
<resolver ref="apache-easyant-plugins"/>
- <resolver ref="third-party-lib" />
+ <!-- still necessary for plugins using buildtypes prior to 0.9. Should be remove on next release -->
+ <url name="legacy-modules" m2compatible="false">
+ <artifact pattern="http://repo.easyant.org/legacy-releases-local/[organization]/[module]/[revision]/[type]s/[module](-[classifier])-[revision].[ext]" />
+ <ivy pattern="http://repo.easyant.org/legacy-releases-local/[organization]/[module]/[revision]/[type]s/ivy-[revision].xml" />
+ </url>
<resolver ref="public-maven" />
</chain>
</resolvers>
Modified: incubator/easyant/core/trunk/module.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/core/trunk/module.ant?rev=1395310&r1=1395309&r2=1395310&view=diff
==============================================================================
--- incubator/easyant/core/trunk/module.ant (original)
+++ incubator/easyant/core/trunk/module.ant Sun Oct 7 14:15:38 2012
@@ -85,7 +85,7 @@
<exclude name="example/**/lib/**" />
<exclude name="example/**/target/**" />
- <include name="ivysettings.xml" />
+ <include name="sample-easyant-ivysettings.xml" />
<include name="easyant-conf.xml" />
<include name="README" />
<include name="NOTICE" />
@@ -106,6 +106,8 @@
<fileset dir="${basedir}">
<patternset refid="easyant-files.patternset" />
<patternset refid="easyant-exec.patternset" />
+ <!--copy ivysettings.xml for developpers -->
+ <patternset includes="ivysettings.xml"/>
</fileset>
</copy>
@@ -124,10 +126,6 @@
<target name="dist" depends="package-jar:jar, stage-dist" description="update the dist directory (used for development)">
- <!-- publish latest easyant artifacts into dist repository -->
- <ivy:settings id="dist.ivy.settings" file="${target.dist}/repository/third-party-lib/third-party-ivysettings.xml" />
- <ivy:publish settingsRef="dist.ivy.settings" resolver="third-party-lib" overwrite="true" srcivypattern="module.ivy" artifactspattern="${target.artifacts}/[artifact].[ext]" />
-
<!-- declare distribution fileset for use in packaging targets -->
<fileset id="easyant-dist.fileset" dir="${target.dist}">
<patternset refid="easyant-files.patternset" />
@@ -166,17 +164,36 @@
<echo message="Packaging full distribution." />
<property name="full.root.dir" value="${ivy.module}-${ivy.revision}-full" />
<bundle destfile="${target.distributions}/${ivy.module}-${version}-full">
- <zipfileset dir="${target.dist}" prefix="${full.root.dir}">
+ <zipfileset dir="${target.dist}" prefix="${full.root.dir}/dist">
<patternset refid="easyant-files.patternset" />
</zipfileset>
<!-- make scripts executable -->
- <zipfileset dir="${target.dist}" prefix="${full.root.dir}" filemode="744">
+ <zipfileset dir="${target.dist}" prefix="${full.root.dir}/dist" filemode="744">
<patternset refid="easyant-exec.patternset" />
</zipfileset>
<!-- ship the documentation -->
- <zipfileset dir="${target.documentation.dir}" prefix="${full.root.dir}/doc" />
+ <zipfileset dir="${target.documentation.dir}" prefix="${full.root.dir}/dist/doc" />
<!-- easyant sources -->
- <zipfileset dir="${basedir}" includes="src/**,module.ant, module.ivy" prefix="${full.root.dir}" />
+ <zipfileset dir="${basedir}" prefix="${full.root.dir}/sources">
+ <patternset>
+ <include name="src/**"/>
+ <include name="bin/**"/>
+ <include name="example/**"/>
+ <include name="module.ant"/>
+ <include name="module.ivy"/>
+ <include name="build.xml"/>
+ <include name="easyant-conf.xml"/>
+ <include name="ivysettings.xml"/>
+ <include name="ivysettings-bootstrap.xml"/>
+ <include name="sample-easyant-ivysettings.xml"/>
+ <include name="NOTICE"/>
+ <include name="README"/>
+ <include name="LICENSE"/>
+ <include name=".settings/**"/>
+ <include name=".project"/>
+ <include name=".classpath"/>
+ </patternset>
+ </zipfileset>
</bundle>
</target>
Added: incubator/easyant/core/trunk/sample-easyant-ivysettings.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/core/trunk/sample-easyant-ivysettings.xml?rev=1395310&view=auto
==============================================================================
--- incubator/easyant/core/trunk/sample-easyant-ivysettings.xml (added)
+++ incubator/easyant/core/trunk/sample-easyant-ivysettings.xml Sun Oct 7 14:15:38 2012
@@ -0,0 +1,40 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<ivysettings>
+ <include url="${easyant.default.ivysettings.url}"/>
+ <settings defaultResolver="main"/>
+ <resolvers>
+ <!--define your own easyant modules repository here
+ <filesystem name="custom-easyant-modules">
+ <ivy pattern="${ivy.settings.dir}/repository/shared/[organisation]/[module]/[revision]/[module].ivy"/>
+ <artifact pattern="${ivy.settings.dir}/repository/shared/[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]"/>
+ </filesystem>
+ -->
+ <chain name="main" returnFirst="true">
+ <!-- core modules provided by easyant full distribution -->
+ <resolver ref="easyant-core-modules"/>
+ <resolver ref="easyant-shared-modules"/>
+ <!-- easyant public repository -->
+ <resolver ref="apache-easyant-plugins"/>
+ <resolver ref="public-maven" />
+ </chain>
+ </resolvers>
+
+ <modules>
+ <module organisation="*" name="*" resolver="main" />
+ </modules>
+</ivysettings>