Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How do I execute simple ant call through maven?
- C:project<project_name>ant -lib antlib -buildfile applications/<sub-project-path>/ant/build.xml deploy
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>1.2.1</version>
- <executions>
- <execution>
- <phase>process-resources</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <executable>ant</executable>
- <workingDirectory>${basedir}</workingDirectory>
- <arguments>
- <argument>'-lib ant/lib'</argument>
- <argument>'-buildfile $basedir/<project-path>/build.xml'</argument>
- <argument>deploy</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>1.2.1</version>
- <executions>
- ...
- </executions>
- <dependencies>
- <dependency>
- <groupId>ant-contrib</groupId>
- <artifactId>ant-contrib</artifactId>
- <version>${ant-contrib.version}</version>
- <exclusions>
- <exclusion>
- <groupId>ant</groupId>
- <artifactId>ant</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>jasper</artifactId>
- <version>${tomcat.compile.version}</version>
- </dependency>
- <dependency>
- <groupId>com.sun</groupId>
- <artifactId>tools</artifactId>
- <version>${java.version}.0</version>
- <scope>system</scope>
- <systemPath>${jdk.home}/tools.jar</systemPath>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.7</version>
- <executions>
- <execution>
- <id>ant</id>
- <phase>process-resources</phase>
- <configuration>
- <target>
- <ant antfile="${basedir}/<project-path>/build.xml">
- <target name="deploy"/>
- </ant>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
Add Comment
Please, Sign In to add comment