Hi all,

I'm interested in running the maven-antrun-plugin by listing "antrun:run" as a default goal in a custom Profile, but this seems not to be working. Am I doing something wrong, or am I forced to bind the execution to a phase for antrun to actually execute its tasks?

###pom.xml###
<project>
 ...
 <profiles>
  <profile>
   <id>echo</id>
   <activation>
    <property>
     <name>command</name>
     <value>echo</value>
    </property>
   </activation>
   <build>
    <defaultGoal>antrun:run</defaultGoal>
    <plugins>
     <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-antrun-plugin</artifactId>
      <version>1.3</version>
      <executions>
       <execution>
        <configuration>
         <tasks>
          <echo message="Hello World" />
         </tasks>
        </configuration>
       </execution>
      </executions>
     </plugin>
    </plugins>
   </build>
  </profile>
 </profiles>
  ...
</project>
###pom.xml###

When I try to run Maven using this profile, the echo doesn't come through:

$ mvn -Dcommand=echo
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'antrun'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Example Project
[INFO]    task-segment: [antrun:run]
[INFO] ------------------------------------------------------------------------
[INFO] [antrun:run]
[INFO] Executing tasks
[INFO] Executed tasks
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Tue Oct 14 20:00:31 EDT 2008
[INFO] Final Memory: 3M/7M
[INFO] ------------------------------------------------------------------------

If I add to the profile above an explicit phase to the execution, the echo happens normally.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to