You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jorg Panzer <j-...@t-online.de> on 2006/03/13 09:45:55 UTC
HOWTO generate a JAR with manifest but without META-INF
hi,
i generate a jar include a manifest-file with:
[...]
<dependencies>
<dependency>
<groupId>com</groupId>
<artifactId>db4o</artifactId>
<version>5.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
[...]
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>org.fhh.admin.Start</mainClass>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
[...]
In the generated JAR-File is a META-INF including zu manifest.fm
(Main-Class and ClassPath is OK), all sources and 3rd party JARs,
like this:
my.jar
|
|---class1
|
|---class...n
|
|---jar1
|
|---jar...n
|
|---META-INF
|
|---manifest.mf
The problem is, the JAR isn't executable. The manifest.mf must placed
a level higher ...
What can i do to create a JAR in the following structure ?
my.jar
|
|---classe1
|
|---class...n
|
|---jar1
|
|---jar...n
|
|---manifest.mf
Thanks...
mbawa
Re: HOWTO generate a JAR with manifest but without META-INF
Posted by David Delbecq <de...@oma.be>.
Jorg Panzer a écrit :
>
> The problem is, the JAR isn't executable. The manifest.mf must placed
> a level higher ...
>
>
False, the manifest must be in META-INF/ according to jar specifications:
http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html
You problem is that your manifest is named 'manifest.mf' while it should
be named 'MANIFEST.MF', could it be you use a case insensitive
filesystem and there is already a manifest.mf (in which case when maven
tries to open MANIFEST.MF, filesystem opens manifest.mf)?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org