Created
February 8, 2016 14:50
-
-
Save savelee/5d99a824d4df70c66fbe to your computer and use it in GitHub Desktop.
Ant Task runner, with the Maven maven-antrun-plugin
This file contains 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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.ladysign.MavenApp</groupId> | |
<artifactId>MavenApp</artifactId> | |
<packaging>war</packaging> | |
<version>1.0-SNAPSHOT</version> | |
<name>MavenApp Maven Webapp</name> | |
<url>http://maven.apache.org</url> | |
<developers> | |
<developer> | |
<id>lee.boonstra</id> | |
<name>Lee Boonstra</name> | |
<email>lee@sencha.com</email> | |
</developer> | |
</developers> | |
<properties> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
<!-- Default Sencha Cmd build environment --> | |
<sencha.env>testing</sencha.env> | |
</properties> | |
<profiles> | |
<!-- Development profile --> | |
<profile> | |
<id>development</id> | |
<activation> | |
<property> | |
<name>env</name> | |
<value>development</value> | |
</property> | |
</activation> | |
<properties> | |
<sencha.env>development</sencha.env> | |
</properties> | |
</profile> | |
<!-- Test profile --> | |
<profile> | |
<id>testing</id> | |
<activation> | |
<property> | |
<name>env</name> | |
<value>testing</value> | |
</property> | |
</activation> | |
<properties> | |
<sencha.env>testing</sencha.env> | |
</properties> | |
</profile> | |
<!-- Production profile --> | |
<profile> | |
<id>production</id> | |
<activation> | |
<property> | |
<name>env</name> | |
<value>production</value> | |
</property> | |
</activation> | |
<properties> | |
<sencha.env>production</sencha.env> | |
</properties> | |
</profile> | |
</profiles> | |
<dependencies> | |
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<version>3.8.1</version> | |
<scope>test</scope> | |
</dependency> | |
</dependencies> | |
<build> | |
<finalName>MavenApp</finalName> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-antrun-plugin</artifactId> | |
<executions> | |
<execution> | |
<phase>prepare-package</phase> | |
<configuration> | |
<target> | |
<!-- could be defined in properties section --> | |
<!-- ${user.home}\bin\Sencha\Cmd\4.0.2.67 The default path the Sencha Cmd is installed --> | |
<property name="cmd.dir" value="/Users/leeboonstra/bin/Sencha/Cmd/6.0.3.56"/> | |
<taskdef resource="com/sencha/ant/antlib.xml" classpath="${cmd.dir}/sencha.jar" loaderref="senchaloader" /> | |
<echo>Start Sencha Cmd build</echo> | |
<x-sencha-init/> | |
<x-sencha-command dir="${basedir}/src/main/webapp/build"> | |
app build | |
</x-sencha-command> | |
<echo>End build process</echo> | |
</target> | |
</configuration> | |
<goals> | |
<goal>run</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment