Showing posts with label ant. Show all posts
Showing posts with label ant. Show all posts

Monday, February 22, 2016

maven run ant command only

Here is how to run only the ant command in maven:

mvn antrun:run compile

Assuming the pom.xml is like this:

<profiles>
  <profile>
    <id>x86-windows</id>
    <activation>
      <activeByDefault>true</activeByDefault>
    </activation>
    <build>
      <plugins>

        <plugin>
          <artifactId>maven-antrun-plugin</artifactId>
          <executions>
            <execution>
              <id>compile</id>
              <phase>compile</phase>
              <goals>
                <goal>run</goal>
              </goals>
              <configuration>
                <tasks>
                  <echo>It worked! only running this part!</echo>