Hi

OK, I've found the problem. Your ant plugin is defined in the
"PluginManagement" section and bound to a lifecycle phase. that means that
you have to call it also from a "plugins" section in order to take affect.
just move the definition of the plugin to a "plugins" section and it'll
work. a working pom attached.

Bye

On Thu, Nov 27, 2008 at 6:46 PM, Cristian3210 <[EMAIL PROTECTED]
> wrote:

>
> Hi Haim,
>
> I'm getting no error actually just the logs that the compilation was
> successfully:
>
>
> + Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO]
>
> ----------------------------------------------------------------------------
> [INFO] Building generatedWarFile
> [INFO]    task-segment: [compile]
> [INFO]
>
> ----------------------------------------------------------------------------
> [INFO] [resources:resources]
> [WARNING] File encoding has not been set, using platform encoding Cp1252,
> i.e. build is platform dependent!
> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> resources, i.e. build is platform dependent!
> [INFO] Copying 0 resource
> [INFO] [compiler:compile]
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 5 seconds
> [INFO] Finished at: Thu Nov 27 11:43:46 EST 2008
> [INFO] Final Memory: 5M/11M
> [INFO]
> ------------------------------------------------------------------------
>
> But I am expecting also the ant commands added to be invoked/displayed in
> logs:
> <echo message="==============" />
> <echo message="Test" />
> <echo message="==============" />
>
> Thanks,
> Cristian
>
>
> Haim Ashkenazi wrote:
> >
> > On Thu, Nov 27, 2008 at 6:27 PM, Cristian3210
> > <[EMAIL PROTECTED]
> >> wrote:
> >
> > When you've set the goal to be "run" and you run:
> > # mvn compile
> >
> > what's the error you get?
> >
> > Bye
> > --
> > Haim
> >
> >
>
> --
> View this message in context:
> http://n2.nabble.com/maven-antrun-plugin-tp1583057p1585867.html
> Sent from the maven users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Haim
<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>myMavenTest</groupId>
       <artifactId>generatedWarFile</artifactId>
       <packaging>war</packaging>
       <name>generatedWarFile</name>
       <version>1.0</version>
       <description />
- Hide quoted text -
       <url></url>
       <dependencies>
               <dependency>
                       <groupId>log4j</groupId>
                       <artifactId>log4j</artifactId>
                       <version>1.2.13</version>
               </dependency>
               <dependency>
                       <groupId>antlr</groupId>
                       <artifactId>antlr</artifactId>
                       <version>2.7.2</version>
               </dependency>
               <dependency>
                       <groupId>junit</groupId>
                       <artifactId>junit</artifactId>
                       <version>4.0</version>
                       <scope>test</scope>
               </dependency>
               <dependency>
                       <groupId>ant</groupId>
                       <artifactId>ant</artifactId>
                       <version>1.6.1</version>
               </dependency>
       </dependencies>
       <build>
           <plugins>
               <plugin>
                   <groupId>org.apache.maven.plugins</groupId>
                   <artifactId>maven-antrun-plugin</artifactId>
                   <executions>
                       <execution>
                           <id>compile</id>
                           <phase>compile</phase>
                           <configuration>
                               <tasks>
                                   <echo message="==============" />
                                   <echo message="Test" />
                                   <echo message="==============" />
                               </tasks>
                           </configuration>
                           <goals>
                               <goal>run</goal>
                           </goals>
                       </execution>
                   </executions>
                   <dependencies>
                       <dependency>
                           <groupId>commons-net</groupId>
                           <artifactId>commons-net</artifactId>
                           <version>1.4.1</version>
                       </dependency>
                       <dependency>
                           <groupId>ant</groupId>
                           <artifactId>ant-commons-net</artifactId>
                           <version>1.6.5</version>
                       </dependency>
                       <dependency>
                           <groupId>ant</groupId>
                           <artifactId>ant-nodeps</artifactId>
                           <version>1.6.5</version>
                       </dependency>
                   </dependencies>
               </plugin>

           </plugins>
           <pluginManagement>
                   <plugins>
                           <plugin>
                                   <artifactId>maven-compiler-plugin</artifactId>
                                   <configuration>
                                           <source>1.5</source>
                                           <target>1.5</target>
                                       </configuration>
                               </plugin>
                       </plugins>
               </pluginManagement>
               <resources>
                       <resource>
                               <directory>src/main/resources</directory>
                               <filtering>true</filtering>
                       </resource>
               </resources>
       </build>
<!--
       <repositories>
               <repository>
                       <id>internal</id>
                       <name>Local repository</name>
                       <url>http://my-local-repository:8080/maven2/internal</url>
               </repository>
       </repositories>
-->
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to