Skip to content

Commit

Permalink
LPS-40913 JAR
Browse files Browse the repository at this point in the history
  • Loading branch information
brianchandotcom committed Jan 11, 2014
1 parent 98f4f7c commit dfe1466
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 19 deletions.
11 changes: 4 additions & 7 deletions build-common-plugins.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,10 @@
</target>

<target name="jar">
<antcall target="loop-modules">
<param name="loop.modules.cmd" value="jar-module" />
</antcall>
</target>

<target name="jar-module">
<ant dir="${module.name}" target="jar" inheritAll="false" />
<loop-modules
loop.modules.cmd="jar-macro"
loop.modules.dir="."
/>
</target>

<target name="loop-modules">
Expand Down
39 changes: 38 additions & 1 deletion build-common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ Error-Prone was automatically installed. Please rerun your task.
/>
</then>
</elseif>
<elseif>
<equals arg1="@{macrodef.name}" arg2="jar-macro" />
<then>
<jar-macro
module.dir="@{module.dir}"
/>
</then>
</elseif>
<elseif>
<equals arg1="@{macrodef.name}" arg2="merge" />
<then>
Expand Down Expand Up @@ -456,7 +464,14 @@ Error-Prone was automatically installed. Please rerun your task.
<if>
<available file="${sdk.dir}/shared/@{import.shared.current}/src" />
<then>
<ant dir="${sdk.dir}/shared/@{import.shared.current}" target="jar" inheritAll="false" />
<call-macrodef-or-target
macrodef.name="jar-macro"
module.dir="${sdk.dir}/shared/@{import.shared.current}"
/>

<set-module-properties
module.dir="@{module.dir}"
/>

<for param="import.shared.full.path">
<path>
Expand Down Expand Up @@ -849,6 +864,28 @@ Please find a solution that does not require portal-impl.jar.
</sequential>
</macrodef>

<macrodef name="jar-macro">
<attribute name="module.dir" />

<sequential>
<set-module-properties
module.dir="@{module.dir}"
/>

<call-macrodef-or-target
macrodef.name="compile"
module.dir="@{module.dir}"
/>

<mkdir dir="${sdk.dir}/dist" />

<jar
basedir="@{module.dir}/classes"
jarfile="${plugin.file}"
/>
</sequential>
</macrodef>

<macrodef name="loop-modules">
<attribute name="loop.modules.cmd" />
<attribute name="loop.modules.dir" />
Expand Down
19 changes: 8 additions & 11 deletions shared/build-common-shared.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,16 @@
</then>
</if>

<target name="deploy" depends="jar">
<target name="deploy">
<jar-macro
module.dir="."
/>
</target>

<target name="jar">
<call-macrodef-or-target
macrodef.name="compile"
<jar-macro
module.dir="."
/>

<mkdir dir="${sdk.dir}/dist" />

<jar
basedir="classes"
jarfile="${plugin.file}"
/>
</target>

<target name="javadoc">
Expand All @@ -43,6 +38,8 @@
</target>

<target name="war">
<antcall target="jar" />
<jar-macro
module.dir="."
/>
</target>
</project>

0 comments on commit dfe1466

Please sign in to comment.