Skip to content

Commit

Permalink
LPS-40913 WAR: macrodef stub, and looping
Browse files Browse the repository at this point in the history
  • Loading branch information
brianchandotcom committed Jan 11, 2014
1 parent 74bb7b1 commit b0ff4d6
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 12 deletions.
11 changes: 4 additions & 7 deletions build-common-plugins.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,9 @@
</target>

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

<target name="war-module">
<ant dir="${module.name}" target="war" inheritAll="false" />
<loop-modules
loop.modules.cmd="war-macro"
loop.modules.dir="."
/>
</target>
</project>
18 changes: 18 additions & 0 deletions build-common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,14 @@ Error-Prone was automatically installed. Please rerun your task.
/>
</then>
</elseif>
<elseif>
<equals arg1="@{macrodef.name}" arg2="war-macro" />
<then>
<war-macro
module.dir="@{module.dir}"
/>
</then>
</elseif>
</if>
</else>
</if>
Expand Down Expand Up @@ -1347,6 +1355,16 @@ Please find a solution that does not require portal-impl.jar.
</sequential>
</macrodef>

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

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

<target name="create">
<if>
<or>
Expand Down
13 changes: 8 additions & 5 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,14 @@
</target>

<target name="war">
<ant dir="hooks" target="war" inheritAll="false" />
<ant dir="layouttpl" target="war" inheritAll="false" />
<ant dir="portlets" target="war" inheritAll="false" />
<ant dir="themes" target="war" inheritAll="false" />
<ant dir="webs" target="war" inheritAll="false" />
<for list="hooks,layouttpl,portlets,shared,themes,webs" param="loop.modules.dir">
<sequential>
<loop-modules
loop.modules.cmd="war-macro"
loop.modules.dir="@{loop.modules.dir}"
/>
</sequential>
</for>
</target>

<target name="zip-portal">
Expand Down

0 comments on commit b0ff4d6

Please sign in to comment.