You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ulrich Wolf <m...@il.wolf-u.li> on 2008/11/09 20:14:01 UTC

Execution of the *.jar-File after successful building of package possible?

Hello,

when I build my project with the goal "package" I get a *.jar-File, which I
have to execute manually after the compilation & packaging. Is there any way
to automatically execute this file directly after maven has completed this
task? 

[INFO] BUILD SUCCESSFUL => java bla.jar

Thanks in advance!
Best Regards,
Uli


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


AW: Execution of the *.jar-File after successful building of package possible?

Posted by Ulrich Wolf <m...@il.wolf-u.li>.
This plugin did the trick, thank you very much. The documentation is really
strange, but I got it :)

For interested Readers:
<plugin>
	<groupId>org.codehaus.mojo</groupId>
	<artifactId>exec-maven-plugin</artifactId>
	<executions>
		<execution>
			<phase>package</phase>
			<goals>
				<goal>exec</goal>
			</goals>
		</execution>
	</executions>
	<configuration>
		<executable>java</executable>
		<arguments>
			<argument>-jar</argument>
			<argument>target/${name}.${packaging}</argument>
		</arguments>
	</configuration>
</plugin>

Thank you very much!

Regards,
Uli

-----Ursprüngliche Nachricht-----
Von: Christian Schulte [mailto:cs@schulte.it] 
Gesendet: Montag, 10. November 2008 00:37
An: Maven Users List
Betreff: Re: Execution of the *.jar-File after successful building of
package possible?

Ulrich Wolf wrote:
> Hello,
> 
> when I build my project with the goal "package" I get a *.jar-File, which
I
> have to execute manually after the compilation & packaging. Is there any
way
> to automatically execute this file directly after maven has completed this
> task? 

The exec-maven-plugin can do this, I think.

<http://mojo.codehaus.org/exec-maven-plugin/java-mojo.html>

-- 
Christian

---------------------------------------------------------------------
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


Re: Execution of the *.jar-File after successful building of package possible?

Posted by Christian Schulte <cs...@schulte.it>.
Ulrich Wolf wrote:
> Hello,
> 
> when I build my project with the goal "package" I get a *.jar-File, which I
> have to execute manually after the compilation & packaging. Is there any way
> to automatically execute this file directly after maven has completed this
> task? 

The exec-maven-plugin can do this, I think.

<http://mojo.codehaus.org/exec-maven-plugin/java-mojo.html>

-- 
Christian

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


Re: Execution of the *.jar-File after successful building of package possible?

Posted by Karsten Ohme <wi...@t-online.de>.
Ulrich Wolf schrieb:
> Hello,
> 
> when I build my project with the goal "package" I get a *.jar-File, which I
> have to execute manually after the compilation & packaging. Is there any way
> to automatically execute this file directly after maven has completed this
> task? 
> 
> [INFO] BUILD SUCCESSFUL => java bla.jar
> 
> Thanks in advance!
> Best Regards,
> Uli
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 
use a Maven ant task and run it.

Regards,
Karsten

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