You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Olivier Lamy <ol...@accor.com> on 2005/12/02 10:43:54 UTC

RE : [m2] run target jar

Use plugin assembly
http://maven.apache.org/plugins/maven-assembly-plugin/

Note the manifest file with the main class can't be added to final jar.
Just run with : java -classpath fulljar mainclass.

- Olivier


-----Message d'origine-----
De : Yuriy Ivanov [mailto:ivanov@offshorecreations.com.ua] 
Envoyé : vendredi 2 décembre 2005 10:45
À : users@maven.apache.org
Objet : [m2] run target jar


Hello,

 

I have compiled jar, and dependencies in my pom.xml. How can I run my
jar? with classpath equals to all dependencies.

 

Best Regards,

Yuri Ivanov

E-Mail:  <ma...@offshorecreations.com.ua>
ivanov@offshorecreations.com.ua.

MSN:  <ma...@yahoo.com> yura_ivanov2000@yahoo.com

ICQ: 147038971




This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
--------------------------------------------------------------------------------------------------------------
Ce message électronique et tous les fichiers joints ainsi que  les informations contenues dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement à l'usage de la  personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci  de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées de ce message, sont interdites.
-------------------------------------------------------------------------------------------------------------


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


RE : RE : [m2] run target jar

Posted by Olivier Lamy <ol...@accor.com>.
Ok this works for generate a simple jar without the dependencies.

But it doesn't work if you want to generate a full jar (like the maven1
plugin javaapp)
Full jar (means to be executed standalone without included jar
dependencies in the classpath cli) included :
- current projet classes
- all dependencies unpacked in the generated full jar.

Look http://jira.codehaus.org/browse/MNG-1380.

I'm correct or there is an other configuration to add in assembly ?

- Olivier



-----Message d'origine-----
De : Allan Ramirez [mailto:aramirez@exist.com] 
Envoyé : vendredi 2 décembre 2005 11:17
À : Maven Users List
Objet : Re: RE : [m2] run target jar


Hi  Yuri,

You can add the main class in the manifest by configuring the 
maven-jar-plugin

see http://docs.codehaus.org/display/MAVENUSER/FAQs
and look for the question "How to add main class in the manifest of the 
generated jar?"

regards,
-allan


Olivier Lamy wrote:

>Use plugin assembly 
>http://maven.apache.org/plugins/maven-assembly-plugin/
>
>Note the manifest file with the main class can't be added to final jar.

>Just run with : java -classpath fulljar mainclass.
>
>- Olivier
>
>
>-----Message d'origine-----
>De : Yuriy Ivanov [mailto:ivanov@offshorecreations.com.ua]
>Envoyé : vendredi 2 décembre 2005 10:45
>À : users@maven.apache.org
>Objet : [m2] run target jar
>
>
>Hello,
>
> 
>
>I have compiled jar, and dependencies in my pom.xml. How can I run my 
>jar? with classpath equals to all dependencies.
>
> 
>
>Best Regards,
>
>Yuri Ivanov
>
>E-Mail:  <ma...@offshorecreations.com.ua>
>ivanov@offshorecreations.com.ua.
>
>MSN:  <ma...@yahoo.com> yura_ivanov2000@yahoo.com
>
>ICQ: 147038971
>
>
>
>
>This e-mail, any attachments and the information contained therein 
>("this message") are confidential and intended solely for the use of
the addressee(s). If you have received this message in error please send
it back to the sender and delete it. Unauthorized publication, use,
dissemination or disclosure of this message, either in whole or in part
is strictly prohibited.
>-----------------------------------------------------------------------
---------------------------------------
>Ce message électronique et tous les fichiers joints ainsi que  les
informations contenues dans ce message ( ci après "le message" ), sont
confidentiels et destinés exclusivement à l'usage de la  personne à
laquelle ils sont adressés. Si vous avez reçu ce message par erreur,
merci  de le renvoyer à son émetteur et de le détruire. Toutes
diffusion, publication, totale ou partielle ou divulgation sous quelque
forme que se soit non expressément autorisées de ce message, sont
interdites.
>-----------------------------------------------------------------------
--------------------------------------
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>  
>




This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
--------------------------------------------------------------------------------------------------------------
Ce message électronique et tous les fichiers joints ainsi que  les informations contenues dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement à l'usage de la  personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci  de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées de ce message, sont interdites.
-------------------------------------------------------------------------------------------------------------


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


Re: RE : [m2] run target jar

Posted by Allan Ramirez <ar...@exist.com>.
Hi  Yuri,

You can add the main class in the manifest by configuring the 
maven-jar-plugin

see http://docs.codehaus.org/display/MAVENUSER/FAQs
and look for the question "How to add main class in the manifest of the 
generated jar?"

regards,
-allan


Olivier Lamy wrote:

>Use plugin assembly
>http://maven.apache.org/plugins/maven-assembly-plugin/
>
>Note the manifest file with the main class can't be added to final jar.
>Just run with : java -classpath fulljar mainclass.
>
>- Olivier
>
>
>-----Message d'origine-----
>De : Yuriy Ivanov [mailto:ivanov@offshorecreations.com.ua] 
>Envoy� : vendredi 2 d�cembre 2005 10:45
>� : users@maven.apache.org
>Objet : [m2] run target jar
>
>
>Hello,
>
> 
>
>I have compiled jar, and dependencies in my pom.xml. How can I run my
>jar? with classpath equals to all dependencies.
>
> 
>
>Best Regards,
>
>Yuri Ivanov
>
>E-Mail:  <ma...@offshorecreations.com.ua>
>ivanov@offshorecreations.com.ua.
>
>MSN:  <ma...@yahoo.com> yura_ivanov2000@yahoo.com
>
>ICQ: 147038971
>
>
>
>
>This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
>--------------------------------------------------------------------------------------------------------------
>Ce message �lectronique et tous les fichiers joints ainsi que  les informations contenues dans ce message ( ci apr�s "le message" ), sont confidentiels et destin�s exclusivement � l'usage de la  personne � laquelle ils sont adress�s. Si vous avez re�u ce message par erreur, merci  de le renvoyer � son �metteur et de le d�truire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non express�ment autoris�es de ce message, sont interdites.
>-------------------------------------------------------------------------------------------------------------
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>  
>