I have a build xml
file in my project which packages my java web app (Java, JavaScript, jsp) into a war file. There is an empty post-compile
target
in the build file. I would like to have this task minify and concatenate my js
and amend script tags of the jsp
s so that they reflect and reference the concatenated files.
I wanted to use gulp to do this (I couldn't find an ant target
for modifying the jsp
s appropriately). But how can I then have the subsequent ant task which comes after post-compile
, only be called upon completion of my gulp tasks (minifying, concatenating and modifying jsp
script tags)?
I added a target to my build.xml
which called gulp (this target " depends
" on the previous target in my build process (for netbeans found in build-impl.xml
)):
<target depends="-copy-webdir" name="-post-compile">
<exec vmlauncher="false" executable="gulp" dir="${basedir}"/>
</target>
This way I was able to integrate my gulpfile.js into the build process that netbeans generates.
Any suggestions, improvements or comments are still welcome.
Based on @theyuv answer, I updated build.xml in my project as
<exec executable="gulp" osfamily="unix" dir="${component.source.dir}">
<arg line="@{gulpargs}"/>
</exec>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.