You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by JavierL <xl...@gmail.com> on 2007/04/17 11:56:16 UTC

How to add manifest to jar at maven package

Hi

I need to set Main-Class and Class-Path to my maven generated jar.

I ' ve created a resource/META-INF/MANIFEST.MF file in my project where I
placed needed info but when I do mvn package, generated jar comes with a
MANIFEST.MF without my data.

How could I do it ?

Thanks in advance

X

-- 
View this message in context: http://www.nabble.com/How-to-add-manifest-to-jar-at-maven-package-tf3589840s177.html#a10032445
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: How to add manifest to jar at maven package

Posted by JavierL <xl...@gmail.com>.
Thanks !



Antonio Petrelli-3 wrote:
> 
> 2007/4/17, JavierL <xl...@gmail.com>:
>>
>> Hi
>>
>> I need to set Main-Class and Class-Path to my maven generated jar.
>>
>> I ' ve created a resource/META-INF/MANIFEST.MF file in my project where I
>> placed needed info but when I do mvn package, generated jar comes with a
>> MANIFEST.MF without my data.
>>
>> How could I do it ?
> 
> http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html
> http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-file.html
> 
> HTH
> Antonio
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-add-manifest-to-jar-at-maven-package-tf3589840s177.html#a10032721
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: How to add manifest to jar at maven package

Posted by Manos Batsis <ma...@geekologue.com>.
Antonio Petrelli wrote:
> 2007/4/17, JavierL <xl...@gmail.com>:
>> Just one more thing.
>>
>> In my source code I've Hiberntae mappuings .xml files but I could not 
>> found
>> them inside generated jar. I can't see in docs how to force to add those
>> files to jar...
>>
>> Is this possible ?
> 
> It depends, resources (like xml files) must be put in a resources
> directory, the default is:
> <project_root>/src/main/resources
> I did not try it, but I think that if you put non-java files in
> "src/main/java", the files are ignored when packaging.

True. One can put the mappings in the src/main/resources or tell maven 
to pick them up from their directory e.g. if your mappings are in 
src/main/hbm:

<build>
  ...
  <resources>
   <resource>
    <directory>src/main/hbm</directory>
    <filtering>true</filtering>
   </resource>
  </resources>


hth,


Manos

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


Re: How to add manifest to jar at maven package

Posted by JavierL <xl...@gmail.com>.

Yes, I moved to resources and worked.

Thanks


Antonio Petrelli-3 wrote:
> 
> 2007/4/17, JavierL <xl...@gmail.com>:
>> Just one more thing.
>>
>> In my source code I've Hiberntae mappuings .xml files but I could not
>> found
>> them inside generated jar. I can't see in docs how to force to add those
>> files to jar...
>>
>> Is this possible ?
> 
> It depends, resources (like xml files) must be put in a resources
> directory, the default is:
> <project_root>/src/main/resources
> I did not try it, but I think that if you put non-java files in
> "src/main/java", the files are ignored when packaging.
> 
> Antonio
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-add-manifest-to-jar-at-maven-package-tf3589840s177.html#a10032992
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: How to Build Eclipse RCP Application using Maven

Posted by Barrie Treloar <ba...@gmail.com>.
On 4/18/07, Ramesh Babu Pokala - TLS, Chennai <PR...@hcl.in> wrote:
>
>
> Hi,
>
> The following authentication error is coming while trying to install
> your eclipse plugins. The following command deploying eclipse plugins to
> the NECLUES Repo/.
>
> How to install eclipse plugins in local repo (.m2 repo)?

You can't blindly follow the steps and expect things to work.

The steps shown are examples, you will need to customize it to suit
your environment.

e.g. NUCLEUS is referring to the machine where your internal
repository is located.

You will need to use the examples, think about your environment, and
decide whether these steps make sense in your environment and with
that knowledge alter the example commands to work in your environment
(or ignore the step completely if it is not appropriate)

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


RE: How to Build Eclipse RCP Application using Maven

Posted by "Ramesh Babu Pokala - TLS, Chennai" <PR...@hcl.in>.
 
Hi,

The following authentication error is coming while trying to install
your eclipse plugins. The following command deploying eclipse plugins to
the NECLUES Repo/.

How to install eclipse plugins in local repo (.m2 repo)?


C:\Documents and Settings\bpra\.m2\SampleProject1>mvn -e
eclipse:make-artifacts -DeclipseDir=D:\eclipse -DdeployTo=external_free:
:default::scp://NUCLEUS/usr/local/www/default/maven2_repositories/extern
al_free

+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'eclipse'.
[INFO]
------------------------------------------------------------------------
----
[INFO] Building Simple Demo
[INFO]    task-segment: [eclipse:make-artifacts] (aggregator-style)
[INFO]
------------------------------------------------------------------------
----
[INFO] [eclipse:make-artifacts]
[INFO] Will deploy artifacts to remote repository
external_free::default::scp://NUCLEUS/usr/local/www/default/maven2_repos
itories
/external_free
[INFO] Processing file
D:\eclipse\plugins\com.atlassw.tools.eclipse.checkstyle_4.3.0
[INFO] Building jar: C:\DOCUME~1\bpra\LOCALS~1\Temp\mvn-eclipse54161.tmp
[INFO] Missing version for artifact org.eclipse.core.resources, assuming
any version > 0
[INFO] Missing version for artifact org.eclipse.ui, assuming any version
> 0
[INFO] Missing version for artifact org.eclipse.jface.text, assuming any
version > 0
[INFO] Missing version for artifact org.eclipse.jdt.core, assuming any
version > 0
[INFO] Missing version for artifact org.eclipse.core.runtime, assuming
any version > 0
[INFO] Missing version for artifact org.eclipse.ui.ide, assuming any
version > 0
[INFO] Missing version for artifact org.eclipse.jdt.ui, assuming any
version > 0
[INFO] Missing version for artifact org.eclipse.ui.workbench.texteditor,
assuming any version > 0
[INFO] Missing version for artifact org.eclipse.ui.editors, assuming any
version > 0
[INFO] Missing version for artifact org.eclipse.team.cvs.core, assuming
any version > 0
[INFO] Missing version for artifact org.eclipse.team.core, assuming any
version > 0
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Unable to deploy artifact to repository.

Embedded error: Error deploying artifact: Authentication failed: Cannot
connect. Reason: java.net.UnknownHostException: NUCLEUS
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to deploy
artifact to repository.
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:564)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoa
l(DefaultLifecycleExecutor.java:493)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:463)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:311)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:224)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:143)
        at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to
deploy artifact to repository.
        at
org.apache.maven.plugin.eclipse.MakeArtifactsMojo.processSingleFile(Make
ArtifactsMojo.java:417)
        at
org.apache.maven.plugin.eclipse.MakeArtifactsMojo.execute(MakeArtifactsM
ojo.java:211)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:443)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:539)
        ... 16 more
Caused by:
org.apache.maven.artifact.deployer.ArtifactDeploymentException: Error
deploying artifact: Authentication failed: Canno
t connect. Reason: java.net.UnknownHostException: NUCLEUS
        at
org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(Defaul
tArtifactDeployer.java:94)
        at
org.apache.maven.plugin.eclipse.MakeArtifactsMojo.processSingleFile(Make
ArtifactsMojo.java:406)
        ... 19 more
Caused by: org.apache.maven.wagon.TransferFailedException:
Authentication failed: Cannot connect. Reason: java.net.UnknownHostExc
eption: NUCLEUS
        at
org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(Defa
ultWagonManager.java:268)
        at
org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(Defaul
tWagonManager.java:153)
        at
org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(Defaul
tArtifactDeployer.java:80)
        ... 20 more
Caused by:
org.apache.maven.wagon.authentication.AuthenticationException: Cannot
connect. Reason: java.net.UnknownHostException:
NUCLEUS
        at
org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon.openConnecti
on(AbstractJschWagon.java:186)
        at
org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:143)
        at
org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(Defa
ultWagonManager.java:235)
        ... 22 more
Caused by: com.jcraft.jsch.JSchException: java.net.UnknownHostException:
NUCLEUS
        at com.jcraft.jsch.Util.createSocket(Unknown Source)
        at com.jcraft.jsch.Session.connect(Unknown Source)
        at com.jcraft.jsch.Session.connect(Unknown Source)
        at
org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon.openConnecti
on(AbstractJschWagon.java:158)
        ... 24 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 14 seconds
[INFO] Finished at: Wed Apr 18 11:34:26 IST 2007
[INFO] Final Memory: 3M/7M
[INFO]
------------------------------------------------------------------------



Thanks & Regards 
Ramesh Babu.P 
  

-----Original Message-----
From: Barrie Treloar [mailto:baerrach@gmail.com] 
Sent: Wednesday, April 18, 2007 11:18 AM
To: Maven Users List
Subject: Re: How to Build Eclipse RCP Application using Maven

On 4/18/07, Ramesh Babu Pokala - TLS, Chennai <PR...@hcl.in>
wrote:
>
>
> I saw this site already but there is no step by step procedure to 
> build application.
>
> Do we need pde-maven-plugin to build RCP?
> Can u please give me a complete description about this?

Err, you go to the pde-maven-plugin site and follow the examples.

You also read the eclipse plugin link and install your eclipse plugins
into your local M2 repository.

It really is that simple.

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


DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have 
received this email in error please delete it and notify the sender immediately. Before opening any mail and 
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------

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


Re: How to Build Eclipse RCP Application using Maven

Posted by Barrie Treloar <ba...@gmail.com>.
On 4/18/07, Ramesh Babu Pokala - TLS, Chennai <PR...@hcl.in> wrote:
>
>
> I saw this site already but there is no step by step procedure to build
> application.
>
> Do we need pde-maven-plugin to build RCP?
> Can u please give me a complete description about this?

Err, you go to the pde-maven-plugin site and follow the examples.

You also read the eclipse plugin link and install your eclipse plugins
into your local M2 repository.

It really is that simple.

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


RE: How to Build Eclipse RCP Application using Maven

Posted by "Ramesh Babu Pokala - TLS, Chennai" <PR...@hcl.in>.
 
I saw this site already but there is no step by step procedure to build
application.

Do we need pde-maven-plugin to build RCP?
Can u please give me a complete description about this? 

Thanks & Regards 
Ramesh Babu.P 
  

-----Original Message-----
From: Barrie Treloar [mailto:baerrach@gmail.com] 
Sent: Wednesday, April 18, 2007 6:06 AM
To: Maven Users List
Subject: Re: How to Build Eclipse RCP Application using Maven

On 4/17/07, Ramesh Babu Pokala - TLS, Chennai <PR...@hcl.in>
wrote:
> Hi All,
>
>    How to build a Eclipse RCP Application using Maven?
>    What are the steps I need to follow for the same?

Besides searching the nabble archives for more on this, have a look at:

See "Building Eclipse RCP and RCP-based Applications "
http://docs.codehaus.org/display/MAVENUSER/Building+Eclipse+RCP+and+RCP-
based+Applications

which I wrote up.

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


DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and 
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------

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


Re: How to Build Eclipse RCP Application using Maven

Posted by Barrie Treloar <ba...@gmail.com>.
On 4/17/07, Ramesh Babu Pokala - TLS, Chennai <PR...@hcl.in> wrote:
> Hi All,
>
>    How to build a Eclipse RCP Application using Maven?
>    What are the steps I need to follow for the same?

Besides searching the nabble archives for more on this, have a look at:

See "Building Eclipse RCP and RCP-based Applications "
http://docs.codehaus.org/display/MAVENUSER/Building+Eclipse+RCP+and+RCP-based+Applications

which I wrote up.

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


How to Build Eclipse RCP Application using Maven

Posted by "Ramesh Babu Pokala - TLS, Chennai" <PR...@hcl.in>.
 

Hi All,

   How to build a Eclipse RCP Application using Maven?
   What are the steps I need to follow for the same?


Thanks & Regards 
Ramesh Babu.P 
  

DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and 
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------

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


Re: How to add manifest to jar at maven package

Posted by Antonio Petrelli <an...@gmail.com>.
2007/4/17, JavierL <xl...@gmail.com>:
> Just one more thing.
>
> In my source code I've Hiberntae mappuings .xml files but I could not found
> them inside generated jar. I can't see in docs how to force to add those
> files to jar...
>
> Is this possible ?

It depends, resources (like xml files) must be put in a resources
directory, the default is:
<project_root>/src/main/resources
I did not try it, but I think that if you put non-java files in
"src/main/java", the files are ignored when packaging.

Antonio

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


Re: How to add manifest to jar at maven package

Posted by JavierL <xl...@gmail.com>.

Antonio Petrelli-3 wrote:
> 
> 2007/4/17, JavierL <xl...@gmail.com>:
>>
>> Hi
>>
>> I need to set Main-Class and Class-Path to my maven generated jar.
>>
>> I ' ve created a resource/META-INF/MANIFEST.MF file in my project where I
>> placed needed info but when I do mvn package, generated jar comes with a
>> MANIFEST.MF without my data.
>>
>> How could I do it ?
> 
> http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html
> http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-file.html
> 
> 


Just one more thing.

In my source code I've Hiberntae mappuings .xml files but I could not found
them inside generated jar. I can't see in docs how to force to add those
files to jar...

Is this possible ?

Thanks in advance

J


-- 
View this message in context: http://www.nabble.com/How-to-add-manifest-to-jar-at-maven-package-tf3589840s177.html#a10032785
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: How to add manifest to jar at maven package

Posted by Antonio Petrelli <an...@gmail.com>.
2007/4/17, JavierL <xl...@gmail.com>:
>
> Hi
>
> I need to set Main-Class and Class-Path to my maven generated jar.
>
> I ' ve created a resource/META-INF/MANIFEST.MF file in my project where I
> placed needed info but when I do mvn package, generated jar comes with a
> MANIFEST.MF without my data.
>
> How could I do it ?

http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html
http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-file.html

HTH
Antonio

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