maven-war-plugin

Run an ant task in maven build phase before war is packaged?

放肆的年华 提交于 2019-11-27 18:22:42
问题 When deploying a webapp I need to update some variables in UI resources, unzip some assets and concat some files, currently this is achieved via an ant task. I'm trying to run this task in the maven build process using something like this... <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.6</version> <executions> <execution> <id>deploy-ui</id> <phase>prepare-package</phase> <inherited>false</inherited> <configuration> <target>

Files got overwritten in maven project when building a war

浪尽此生 提交于 2019-11-27 16:11:41
I'm building a web application project using maven, and packaging is set to "war". I also use YUI compressor plugin to compress javascript codes in the webapp directory. I've set up the YUI compressor like this: <plugin> <groupId>net.alchim31.maven</groupId> <artifactId>yuicompressor-maven-plugin</artifactId> <version>1.3.0</version> <executions> <execution> <phase>process-resources</phase> <goals> <goal>compress</goal> </goals> </execution> </executions> <configuration> <excludes> <exclude>**/ext-2.0/**/*.js</exclude> <exclude>**/lang/*.js</exclude> <exclude>**/javascripts/flot/*.js</exclude>

maven2: excluding directory from WAR

落爺英雄遲暮 提交于 2019-11-27 11:53:46
I tried this to exclude whole directory (${basedir}/src/main/webapp/webscripts) from my WAR file but it failed. What is wrong? this doesn't work: <configuration> <webResources> <resource> <directory>${basedir}/src/main/webapp/webscripts</directory> <excludes> <exclude>**/*.*</exclude> </excludes> </resource> </webResources> </configuration> this too: <configuration> <webResources> <resource> <directory>${basedir}/src/main/webapp</directory> <excludes> <exclude>**/webscripts</exclude> </excludes> </resource> </webResources> </configuration> Can anybody help? Both of your solutions wouldn't help

Files got overwritten in maven project when building a war

六眼飞鱼酱① 提交于 2019-11-26 17:25:20
问题 I'm building a web application project using maven, and packaging is set to "war". I also use YUI compressor plugin to compress javascript codes in the webapp directory. I've set up the YUI compressor like this: <plugin> <groupId>net.alchim31.maven</groupId> <artifactId>yuicompressor-maven-plugin</artifactId> <version>1.3.0</version> <executions> <execution> <phase>process-resources</phase> <goals> <goal>compress</goal> </goals> </execution> </executions> <configuration> <excludes> <exclude>*