Skip to content

Commit

Permalink
LPS-46897 Use new "classpath.*" pattern, and new dependencies/* patte…
Browse files Browse the repository at this point in the history
…rn meaning that every Ant command is isolated in its own classpath. <baseline-jar now consumes a published com.liferay.ant.bnd.jar.
  • Loading branch information
brianchandotcom committed May 19, 2014
1 parent 46f0384 commit 21aff83
Show file tree
Hide file tree
Showing 14 changed files with 69 additions and 11 deletions.
9 changes: 8 additions & 1 deletion build-common-ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,17 @@

<taskdef classpathref="ivy.lib.path" resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" />

<path id="sdk.dependencies.path">
<dirset dir="${sdk.dir}/dependencies" includes="*" />
</path>

<pathconvert pathsep="," property="sdk.dependencies.path" refid="sdk.dependencies.path" targetos="unix" />

<macrodef name="process-ivy">
<attribute default="${basedir}" name="module.dir" />

<sequential>
<for list="@{module.dir},${sdk.dir}" param="ivy.xml.dir">
<for list="@{module.dir},${sdk.dir},${sdk.dependencies.path}" param="ivy.xml.dir">
<sequential>
<if>
<available file="@{ivy.xml.dir}/ivy.xml" />
Expand All @@ -73,6 +79,7 @@
<if>
<or>
<equals arg1="@{ivy.xml.dir}" arg2="${sdk.dir}" />
<contains string="@{ivy.xml.dir}" substring="${sdk.dir}/dependencies" />
<antelope:endswith string="${ant.project.name}" with="-shared" />
<available file="@{ivy.xml.dir}/bnd.bnd" />
</or>
Expand Down
25 changes: 17 additions & 8 deletions build-common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,23 @@
<fileset dir="${sdk.dir}/lib" includes="junit.jar,mockito-all.jar,powermock-*.jar,spring-test.jar" />
</path>

<taskdef classpathref="portal.classpath" resource="aQute/bnd/ant/taskdef.properties" />
<taskdef classpathref="lib.classpath" resource="org/codehaus/groovy/antlib.xml" />
<path id="classpath.aQute.bnd">
<fileset dir="${sdk.dir}/dependencies/aQute.bnd/lib" includes="*.jar" />
</path>

<taskdef classpathref="classpath.aQute.bnd" resource="aQute/bnd/ant/taskdef.properties" />

<path id="classpath.com.liferay.ant.bnd">
<fileset dir="${sdk.dir}/dependencies/com.liferay.ant.bnd/lib" includes="*.jar" />
</path>

<taskdef classname="com.liferay.ant.bnd.BaselineJarTask" classpathref="classpath.com.liferay.ant.bnd" name="baseline-jar" />

<path id="classpath.org.codehaus.groovy">
<fileset dir="${sdk.dir}/dependencies/org.codehaus.groovy/lib" includes="*.jar" />
</path>

<taskdef classpathref="classpath.org.codehaus.groovy" resource="org/codehaus/groovy/antlib.xml" />

<condition property="correct.ant.version">
<antversion atleast="1.8.0" />
Expand Down Expand Up @@ -135,12 +150,6 @@ Error-Prone was automatically installed. Please rerun your task.
<attribute name="sourcePath" />

<sequential>
<taskdef
classname="com.liferay.util.ant.bnd.BaselineJarTask"
classpathref="portal.classpath"
name="baseline-jar"
/>

<manifest-helper />

<bndexpand propertyfile="@{bndRootFile}" />
Expand Down
13 changes: 13 additions & 0 deletions dependencies/aQute.bnd/ivy.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0"?>

<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 module="dependencies.biz.aQute.bnd" organisation="com.liferay.sdk" />

<dependencies defaultconf="default">
<dependency name="aQute.bnd" org="com.liferay" rev="2.3.0" />
</dependencies>
</ivy-module>
1 change: 1 addition & 0 deletions dependencies/aQute.bnd/ivy.xml.MD5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9089dbe862bcee4ed04c555bd447a073
Binary file added dependencies/aQute.bnd/lib/aQute.bnd.jar
Binary file not shown.
14 changes: 14 additions & 0 deletions dependencies/com.liferay.ant.bnd/ivy.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>

<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 module="dependencies.com.liferay.ant.bnd" organisation="com.liferay.sdk" />

<dependencies defaultconf="default">
<dependency name="aQute.bnd" org="com.liferay" rev="2.3.0" />
<dependency name="com.liferay.ant.bnd" org="com.liferay" rev="1.0.0-SNAPSHOT" />
</dependencies>
</ivy-module>
1 change: 1 addition & 0 deletions dependencies/com.liferay.ant.bnd/ivy.xml.MD5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c1402714640dbec745db7b48ddd2fe4c
Binary file not shown.
Binary file not shown.
13 changes: 13 additions & 0 deletions dependencies/org.codehaus.groovy/ivy.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0"?>

<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 module="dependencies.org.codehaus.groovy" organisation="com.liferay.sdk" />

<dependencies defaultconf="default">
<dependency name="groovy-all" org="org.codehaus.groovy" rev="2.0.1" />
</dependencies>
</ivy-module>
1 change: 1 addition & 0 deletions dependencies/org.codehaus.groovy/ivy.xml.MD5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
60e188fa88bcb4d920b094b8ff81f022
File renamed without changes.
1 change: 0 additions & 1 deletion ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
<dependency name="commons-logging" org="commons-logging" rev="1.1.1" />
<dependency name="ecj" org="org.eclipse.jdt.core.compiler" rev="3.7.2" />
<dependency name="error_prone_ant" org="com.google.errorprone" rev="1.0.8" />
<dependency name="groovy-all" org="org.codehaus.groovy" rev="2.0.1" />
<dependency name="jalopy" org="jalopy" rev="1.5rc3" />
<dependency name="jargs" org="net.sf" rev="1.0" />
<dependency name="javax.servlet-api" org="javax.servlet" rev="3.0.1" />
Expand Down
2 changes: 1 addition & 1 deletion ivy.xml.MD5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f5b4c99d22f29df5c6ed59bd323af609
b43f040a69f180cd801e472c8e105f28

0 comments on commit 21aff83

Please sign in to comment.