maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Le Du <leduy...@yahoo.com>
Subject RE: SV: [m2b3] antrun problems
Date Wed, 05 Oct 2005 14:53:23 GMT
Hmm, that's pretty strange, because, according to the Build Lifecycle, calling
compile should indeed call generate-sources. I tried it and it's working.

What is the type of your artifact, jar or other ? Can you send your whole POM ?

Just to be sure... :) did you try to replace your task by a simple
<echo message="Hello, world !"/>

Yann


--- Mattias Arbin <mattias.arbin@hiq.se> a écrit :

> Thanks Yann.
> I will try this.
> However, what I initially wanted to do was indeed to execute this ant task
> in the generate-source phase. (It is a java2wsdl task that generates java
> source)
> I thought that the configuration previously sent would automatically be
> executed before the compile phase.
> So, for instance, if I would type
> m2 compile
> the ant task would be executed. But nothing happens at all. Maven does not
> seem to enter the generate-sources phase. 
> Am I missing something?
> Thanks,
> Mattias
> 
> -----Ursprungligt meddelande-----
> Från: Yann Le Du [mailto:leduyann@yahoo.com] 
> Skickat: den 5 oktober 2005 16:17
> Till: Maven Users List
> Kopia: kai@mobilefactor.com
> Ämne: RE: [m2b3] antrun problems
> 
> Hi Mattias,
> 
> By <phase>generate-sources</phase> , you mean that your <configuration>
must
> only  be used in generate-sources phase (see [1] for details on phases).
> Calling m2 antrun:run doesn't go into this phase, so it's normal build.xml
> isn't called.
> 
> If you want your <configuration> be always used, put it direclty into
> <plugin>
> :
> 
> ~      <plugin>
> ~        <artifactId>maven-antrun-plugin</artifactId>
> ~        <configuration>
> ~          <tasks>
> ~            <ant antfile="build.xml"/>
> ~          </tasks>
> ~        </configuration>
> ~        <goals>
> ~          <goal>run</goal>
> ~        </goals>
> ~      </plugin>
> 
> Thinking of it, it's probably the same kind of problem that was reported
> here :
> http://marc.theaimsgroup.com/?l=turbine-maven-user&m=112835518711351&w=2
> 
> [1] http://maven.apache.org/maven2/lifecycle.html
> 
> Regards,
> Yann
> 
> 
> --- Mattias Arbin <mattias.arbin@hiq.se> a écrit :
> 
> > Could someone please tell what's wrong here:
> > 
> >  
> > 
> > I want to execute an ant build file. The filename is build.xml, which is
> > located in the same location as the pom.xml. It has a default target.
> > 
> >  
> > 
> > In pom.xml, I have:
> > 
> >  
> > 
> > .
> > 
> > <plugin>
> > 
> >    <artifactId>maven-antrun-plugin</artifactId>
> > 
> >    <executions>
> > 
> >       <execution>
> > 
> >          <phase>generate-sources</phase>
> > 
> >          <configuration>
> > 
> >             <tasks>
> > 
> >                <ant antfile="build.xml"/>
> > 
> >             </tasks>
> > 
> >          </configuration>
> > 
> >          <goals>
> > 
> >             <goal>run</goal>
> > 
> >          </goals>
> > 
> >       </execution>
> > 
> >    </executions>
> > 
> > </plugin>
> > 
> > .
> > 
> >  
> > 
> > When executing (see below) no ant tasks seem to be run. 
> > 
> > Any ideas?
> > 
> >  
> > 
> > /Mattias
> > 
> >  
> > 
> > C:\work\ratereview\clients\trunk>m2 -X antrun:run
> > 
> > + Error stacktraces are turned on.
> > 
> > [DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and
> > Settings\mattiasar\.m2\plugin-registry.xml'
> > 
> > [DEBUG] Building Maven global-level plugin registry from:
> > 'C:\java\MAVEN-~1.0-B\bin\..\conf\plugin-registry.xml'
> > 
> > [INFO] Searching repository for plugin with prefix: 'antrun'.
> > 
> > [DEBUG] maven-antrun-plugin: resolved to version 1.0-rc1 from repository
> > central
> > 
> > [INFO]
> >
> ----------------------------------------------------------------------------
> > 
> > [INFO] Building RateReview Clients
> > 
> > [INFO]    task-segment: [antrun:run]
> > 
> > [INFO]
> >
> ----------------------------------------------------------------------------
> > 
> > [DEBUG] eniro-ratereview:ratereview-clients:jar:1.0-SNAPSHOT (selected for
> > null)
> > 
> > [DEBUG]   axis:axis-wsdl4j:jar:1.5.1 (selected for compile)
> > 
> > [DEBUG]   axis:axis-jaxrpc:jar:1.2.1 (selected for compile)
> > 
> > [DEBUG]   axis:axis-saaj:jar:1.2.1 (selected for compile)
> > 
> > [DEBUG]   commons-discovery:commons-discovery:jar:0.2 (selected for
> compile)
> > 
> > [DEBUG]     junit:junit:jar:3.7 (selected for compile)
> > 
> > [DEBUG]     commons-logging:commons-logging:jar:1.0.3 (selected for
> compile)
> > 
> > [DEBUG]       junit:junit:jar:3.7 (removed - nearer found: 3.7)
> > 
> > [DEBUG]       junit:junit:jar:3.7 (selected for compile)
> > 
> > [DEBUG]       logkit:logkit:jar:1.0.1 (selected for compile)
> > 
> > [DEBUG]       log4j:log4j:jar:1.2.6 (selected for compile)
> > 
> > [DEBUG]   jgoodies:forms:jar:1.0.5 (selected for compile)
> > 
> > [DEBUG]   axis:axis-ant:jar:1.2.1 (selected for compile)
> > 
> > [DEBUG]   javax.mail:mail:jar:1.3.2 (selected for compile)
> > 
> > [DEBUG]     javax.activation:activation:jar:1.0.2 (selected for compile)
> > 
> > [DEBUG]   axis:axis:jar:1.2.1 (selected for compile)
> > 
> > [DEBUG]   javax.activation:activation:jar:1.0.2 (removed - nearer found:
> > 1.0.2)
> > 
> > [DEBUG]   javax.activation:activation:jar:1.0.2 (selected for compile)
> > 
> > [DEBUG] org.apache.maven.plugins:maven-antrun-plugin:maven-plugin:1.0-rc1
> > (selected for runtime)
> > 
> > [DEBUG]   ant:ant:jar:1.6.5 (selected for runtime)
> > 
> > [DEBUG]   ant:ant-launcher:jar:1.6.5 (selected for runtime)
> > 
> > [INFO] [antrun:run]
> > 
> > [INFO] Executing tasks
> > 
> > [INFO] Executed tasks
> > 
> > [INFO]
> >
> ----------------------------------------------------------------------------
> > 
> > [INFO] BUILD SUCCESSFUL
> > 
> > [INFO]
> >
> ----------------------------------------------------------------------------
> > 
> > [INFO] Total time: < 1 second
> > 
> > [INFO] Finished at: Wed Oct 05 14:50:21 CEST 2005
> > 
> > [INFO] Final Memory: 1M/4M
> > 
> > [INFO]
> >
> ----------------------------------------------------------------------------
> > 
> > 
> 
> 
> 
> 	
> 
> 	
> 		
> ___________________________________________________________________________ 
> Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
> Téléchargez cette version sur http://fr.messenger.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 



	

	
		
___________________________________________________________________________ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message