Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Commit

Permalink
added support for automatically moving the cdnjs files when a release…
Browse files Browse the repository at this point in the history
… is not -SNAPSHOT
  • Loading branch information
prb112 committed Dec 1, 2015
1 parent ed0e727 commit 27ed8f5
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
17 changes: 17 additions & 0 deletions assembly/deploy-cdnjs.xml
@@ -0,0 +1,17 @@
<project default="manage-cdnjs">
<target name="snapshotstatus">
<condition property="notSnapshot" value="false" else="true">
<matches string="${project.version}" pattern="SNAPSHOT$" />
</condition>
<echo message="This is version - ${project.version}"/>
<echo message="The not snapshot status is - ${notSnapshot}" />
</target>

<target name="manage-cdnjs" if="${notSnapshot}" depends="snapshotstatus">
<copy file="./sdk/com.ibm.sbt.web/src/main/webapp/js/sdk/_layers/sbt-core-dojo-amd.js.uncompressed.js" todir="./assembly/cdnjs" overwrite="true"/>
<copy file="./sdk/com.ibm.sbt.web/src/main/webapp/js/sdk/_layers/sbt-core-dojo-amd.js" todir="./assembly/cdnjs" overwrite="true"/>
<copy file="./sdk/com.ibm.sbt.web/src/main/webapp/js/sdk/_layers/sbt-extra-controls-dojo-amd.js.uncompressed.js" todir="./assembly/cdnjs" overwrite="true"/>
<copy file="./sdk/com.ibm.sbt.web/src/main/webapp/js/sdk/_layers/sbt-extra-controls-dojo-amd.js" todir="./assembly/cdnjs" overwrite="true"/>
</target>

</project>
25 changes: 25 additions & 0 deletions assembly/pom.xml
Expand Up @@ -417,6 +417,31 @@
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<!-- Automates the movement of the js files to the approved assembly
location -->
<execution>
<id>move-cdnjs</id>

<!-- phase selected is deploy - ONLY EXECUTED WHEN DEPLOY/INSTALL to Nexus. to debug use clean -->
<phase>deploy</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<ant antfile="deploy-cdnjs.xml" />
<echo message="Finished Calling Target" />
</target>

</configuration>
</execution>
</executions>
</plugin>
</plugins>

</build>
Expand Down

0 comments on commit 27ed8f5

Please sign in to comment.