Created
July 3, 2013 16:12
-
-
Save snekse/5919913 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<artifactId>maven-antrun-plugin</artifactId> | |
<version>1.7</version> | |
<executions> | |
<execution> | |
<phase>generate-sources</phase> | |
<configuration> | |
<target name="building"> | |
<echo> | |
--------------------------------------------------- | |
-- NPM INSTALL -- | |
--------------------------------------------------- | |
</echo> | |
<exec executable="cmd" dir="${project.basedir}" osfamily="windows" failonerror="true"> | |
<arg line="/c npm config set color false"/> | |
</exec> | |
<exec executable="bash" dir="${project.basedir}" osfamily="unix" failonerror="true"> | |
<arg line="npm config set color false"/> | |
</exec> | |
<exec executable="cmd" dir="${project.basedir}" osfamily="windows" failonerror="true"> | |
<arg line="/c npm install"/> | |
</exec> | |
<exec executable="bash" dir="${project.basedir}" osfamily="unix" failonerror="true"> | |
<arg line="npm install"/> | |
</exec> | |
<echo> | |
--------------------------------------------------- | |
-- GRUNT -- | |
--------------------------------------------------- | |
</echo> | |
<exec executable="cmd" dir="${project.basedir}" osfamily="windows" resultproperty="cmdresult"> | |
<arg line="/c grunt --no-color > grunt.status "/> | |
</exec> | |
<exec executable="bash" dir="${project.basedir}" osfamily="unix" resultproperty="cmdresult"> | |
<arg line="grunt --no-color > grunt.status"/> | |
</exec> | |
<loadfile property="grunt.status" srcFile="grunt.status"/> | |
<echo>${grunt.status}</echo> | |
<delete file="grunt.status" quiet="true"/> | |
<condition property="cmdsuccess"> | |
<equals arg1="${cmdresult}" arg2="0"/> | |
</condition> | |
<fail unless="cmdsuccess"/> | |
</target> | |
</configuration> | |
<goals> | |
<goal>run</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment