Re: How can I let Maven run a class before packaging

2008-04-13 Thread Luke Daley


On 11/04/2008, at 3:15 PM, youhaodeyi wrote:

By default, Maven will package all the classes under target/classes  
directory
into a jar file. But some classes are not generated by compiling,  
by running

a Java application. How can I let Maven run a java application before
packaging?


You can use the ant exec task of the ant run plugin and bind it to  
the generate-sources phase…


http://maven.apache.org/plugins/maven-antrun-plugin/run-mojo.html

LD.



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



RE: How can I let Maven run a class before packaging

2008-04-11 Thread nicklist
You could bind a plugin to the process classes phase [1] which is a phase after 
compile but before packaging. If your class doesn't run as a plugin, you have a 
few options:

1) Make a plugin, which runs your class. [2] 
2) Use the antrun plugin to fire of your class [3]

Hth,

Nick S.

[1] http://cvs.peopleware.be/training/maven/maven2/buildLifecyclePhases.html
[2] http://maven.apache.org/guides/plugin/guide-java-plugin-development.html
[3] http://maven.apache.org/plugins/maven-antrun-plugin/

-Original Message-
From: youhaodeyi [mailto:[EMAIL PROTECTED]
Sent: Fri 4/11/2008 07:15
To: users@maven.apache.org
Subject: How can I let Maven run a class before packaging
 

By default, Maven will package all the classes under target/classes directory
into a jar file. But some classes are not generated by compiling, by running
a Java application. How can I let Maven run a java application before
packaging?
-- 
View this message in context: 
http://www.nabble.com/How-can-I-let-Maven-run-a-class-before-packaging-tp16625144s177p16625144.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]




RE: How can I let Maven run a class before packaging

2008-04-11 Thread youhaodeyi

Thanks. antrun plugin can solve my problem.


Nick Stolwijk wrote:
 
 You could bind a plugin to the process classes phase [1] which is a phase
 after compile but before packaging. If your class doesn't run as a plugin,
 you have a few options:
 
 1) Make a plugin, which runs your class. [2] 
 2) Use the antrun plugin to fire of your class [3]
 
 Hth,
 
 Nick S.
 
 [1]
 http://cvs.peopleware.be/training/maven/maven2/buildLifecyclePhases.html
 [2]
 http://maven.apache.org/guides/plugin/guide-java-plugin-development.html
 [3] http://maven.apache.org/plugins/maven-antrun-plugin/
 
 -Original Message-
 From: youhaodeyi [mailto:[EMAIL PROTECTED]
 Sent: Fri 4/11/2008 07:15
 To: users@maven.apache.org
 Subject: How can I let Maven run a class before packaging
  
 
 By default, Maven will package all the classes under target/classes
 directory
 into a jar file. But some classes are not generated by compiling, by
 running
 a Java application. How can I let Maven run a java application before
 packaging?
 -- 
 View this message in context:
 http://www.nabble.com/How-can-I-let-Maven-run-a-class-before-packaging-tp16625144s177p16625144.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]
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-can-I-let-Maven-run-a-class-before-packaging-tp16625144s177p16626580.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]



Re: How can I let Maven run a class before packaging

2008-04-11 Thread Dirk Olmes

[EMAIL PROTECTED] wrote:

You could bind a plugin to the process classes phase [1] which is a phase after 
compile but before packaging. If your class doesn't run as a plugin, you have a 
few options:

1) Make a plugin, which runs your class. [2] 
2) Use the antrun plugin to fire of your class [3]


3) use the maven-exec-plugin to run your class

-dirk

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



RE: How can I let Maven run a class before packaging

2008-04-11 Thread nicklist
I missed that one, and I think that is the best short term solution. Delicious 
tagged for future reference. ;)

With regards,

Nick S.


-Original Message-
From: Dirk Olmes [mailto:[EMAIL PROTECTED]
Sent: Fri 4/11/2008 10:03
To: Maven Users List
Subject: Re: How can I let Maven run a class before packaging
 
[EMAIL PROTECTED] wrote:
 You could bind a plugin to the process classes phase [1] which is a phase 
 after compile but before packaging. If your class doesn't run as a plugin, 
 you have a few options:
 
 1) Make a plugin, which runs your class. [2] 
 2) Use the antrun plugin to fire of your class [3]

3) use the maven-exec-plugin to run your class

-dirk

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




How can I let Maven run a class before packaging

2008-04-10 Thread youhaodeyi

By default, Maven will package all the classes under target/classes directory
into a jar file. But some classes are not generated by compiling, by running
a Java application. How can I let Maven run a java application before
packaging?
-- 
View this message in context: 
http://www.nabble.com/How-can-I-let-Maven-run-a-class-before-packaging-tp16625144s177p16625144.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]