You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by eppleton <na...@eppleton.de> on 2009/12/02 17:46:51 UTC

Maven Run & Manifest entries

Hi, 

I've created a Maven Project in NetBeans. It writes an entry into the JARs
manifest. That works fine. At runtime I'm reading that entry (which points
to a configuration file) and use it for configuration. That works fine as
well…

The problem is, that when running the project from the IDE instead of the
JAR, the class files in the target folder is used, so there's no manifest.
When I copy my manifest there, it works fine. What would be the best
approach to do that automatically?

Thanks

Toni 
-- 
View this message in context: http://old.nabble.com/Maven-Run---Manifest-entries-tp26612165p26612165.html
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: Maven Run & Manifest entries

Posted by Milos Kleint <mk...@gmail.com>.
not really within the exec plugin, not within netbeans.

I suggest you create a profile that will properly assemble the app
(including the ClassPath entry in manifest etc) and activate it when running
within IDE. Then you can map action in netbeans to exec:exec only..

Milos

On Wed, Dec 2, 2009 at 6:12 PM, eppleton <na...@eppleton.de> wrote:

>
> Thanks Milos, is there a variable for <jar name> like for className,
> packageClassName?
>
> Toni
>
> Bugzilla from mkleint@gmail.com wrote:
> >
> > I would say you need to change the Run project action mapping in the ide
> > not
> > to use mvn exec:exec to execute "java -cp <classpath>" but to execute
> > :java
> > -jar <jar name>"
> >
> > Regards
> >
> >
> > Milos Kleint
> >
> >
> >
> > On Wed, Dec 2, 2009 at 5:46 PM, eppleton <na...@eppleton.de> wrote:
> >
> >>
> >> Hi,
> >>
> >> I've created a Maven Project in NetBeans. It writes an entry into the
> >> JARs
> >> manifest. That works fine. At runtime I'm reading that entry (which
> >> points
> >> to a configuration file) and use it for configuration. That works fine
> as
> >> well…
> >>
> >> The problem is, that when running the project from the IDE instead of
> the
> >> JAR, the class files in the target folder is used, so there's no
> >> manifest.
> >> When I copy my manifest there, it works fine. What would be the best
> >> approach to do that automatically?
> >>
> >> Thanks
> >>
> >> Toni
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/Maven-Run---Manifest-entries-tp26612165p26612165.html
> >> 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
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Maven-Run---Manifest-entries-tp26612165p26612608.html
> 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: Maven Run & Manifest entries

Posted by eppleton <na...@eppleton.de>.
Thanks Milos, is there a variable for <jar name> like for className,
packageClassName?

Toni

Bugzilla from mkleint@gmail.com wrote:
> 
> I would say you need to change the Run project action mapping in the ide
> not
> to use mvn exec:exec to execute "java -cp <classpath>" but to execute
> :java
> -jar <jar name>"
> 
> Regards
> 
> 
> Milos Kleint
> 
> 
> 
> On Wed, Dec 2, 2009 at 5:46 PM, eppleton <na...@eppleton.de> wrote:
> 
>>
>> Hi,
>>
>> I've created a Maven Project in NetBeans. It writes an entry into the
>> JARs
>> manifest. That works fine. At runtime I'm reading that entry (which
>> points
>> to a configuration file) and use it for configuration. That works fine as
>> well…
>>
>> The problem is, that when running the project from the IDE instead of the
>> JAR, the class files in the target folder is used, so there's no
>> manifest.
>> When I copy my manifest there, it works fine. What would be the best
>> approach to do that automatically?
>>
>> Thanks
>>
>> Toni
>> --
>> View this message in context:
>> http://old.nabble.com/Maven-Run---Manifest-entries-tp26612165p26612165.html
>> 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
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/Maven-Run---Manifest-entries-tp26612165p26612608.html
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: Maven Run & Manifest entries

Posted by Milos Kleint <mk...@gmail.com>.
or somehow generate the manifest file in the target area.

Milos

On Wed, Dec 2, 2009 at 6:02 PM, Milos Kleint <mk...@gmail.com> wrote:

> I would say you need to change the Run project action mapping in the ide
> not to use mvn exec:exec to execute "java -cp <classpath>" but to execute
> :java -jar <jar name>"
>
> Regards
>
>
> Milos Kleint
>
>
> On Wed, Dec 2, 2009 at 5:46 PM, eppleton <na...@eppleton.de> wrote:
>
>>
>> Hi,
>>
>> I've created a Maven Project in NetBeans. It writes an entry into the JARs
>> manifest. That works fine. At runtime I'm reading that entry (which points
>> to a configuration file) and use it for configuration. That works fine as
>> well…
>>
>> The problem is, that when running the project from the IDE instead of the
>> JAR, the class files in the target folder is used, so there's no manifest.
>> When I copy my manifest there, it works fine. What would be the best
>> approach to do that automatically?
>>
>> Thanks
>>
>> Toni
>> --
>> View this message in context:
>> http://old.nabble.com/Maven-Run---Manifest-entries-tp26612165p26612165.html
>> 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: Maven Run & Manifest entries

Posted by Milos Kleint <mk...@gmail.com>.
I would say you need to change the Run project action mapping in the ide not
to use mvn exec:exec to execute "java -cp <classpath>" but to execute :java
-jar <jar name>"

Regards


Milos Kleint

On Wed, Dec 2, 2009 at 5:46 PM, eppleton <na...@eppleton.de> wrote:

>
> Hi,
>
> I've created a Maven Project in NetBeans. It writes an entry into the JARs
> manifest. That works fine. At runtime I'm reading that entry (which points
> to a configuration file) and use it for configuration. That works fine as
> well…
>
> The problem is, that when running the project from the IDE instead of the
> JAR, the class files in the target folder is used, so there's no manifest.
> When I copy my manifest there, it works fine. What would be the best
> approach to do that automatically?
>
> Thanks
>
> Toni
> --
> View this message in context:
> http://old.nabble.com/Maven-Run---Manifest-entries-tp26612165p26612165.html
> 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
>
>