Manifest.txt in Maven project

22 views
Skip to first unread message

Rafał Laczek

unread,
Aug 10, 2012, 6:35:55 AM8/10/12
to jpassio...@googlegroups.com
I try to add manifest.txt to jar file in maven project.
In which place of my project I must have this file and what mvn commend to use to build jar
I tried a few ways but it is still a problem.

Thanks
Regards,
Rafal



Benoit Vandamme

unread,
Aug 10, 2012, 7:31:03 AM8/10/12
to rafal_...@wp.pl, jpassio...@googlegroups.com
I think you have to name the file: 'MANIFEST.MF'.

It is usually placed in the /META-INF directory.

mvn package

Gtz,

Benoit Vandamme

2012/8/10 Rafał Laczek <rafal_...@wp.pl>



--
You received this message because you are subscribed to the Google Groups "JPassion.com: Spring Framework Programming" group.
To post to this group, send email to jpassio...@googlegroups.com.
To unsubscribe from this group, send email to jpassion_spri...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jpassion_spring?hl=en.


Rafał Laczek

unread,
Aug 10, 2012, 8:54:03 AM8/10/12
to bnwo...@gmail.com, jpassio...@googlegroups.com

Ok thanks.

In other project I have also experienced as follow when I try to run the jar file.

Can you help maybe.

 

Exception in thread "main" java.lang.NoClassDefFoundError: no/mm/iam/service/Main

Caused by: java.lang.ClassNotFoundException: no.mm.iam.service.Main

        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Could not find the main class: no.freecode.iam.service.Main. Program will exit.

 

Dnia 10-08-2012 o godz. 13:31 Benoit Vandamme napisaďż˝(a):

I think you have to name the file: 'MANIFEST.MF'.

It is usually placed in the /META-INF directory.

mvn package

Gtz,

Benoit Vandamme

2012/8/10 Rafaďż˝ Laczek <rafal_...@wp.pl>

I try to add manifest.txt to jar file in maven project.
In which place of my project I must have this file and what mvn commend to use to build jar
I tried a few ways but it is still a problem.

Thanks
Regards,
Rafal



--
You received this message because you are subscribed to the Google Groups "JPassion.com: Spring Framework Programming" group.
To post to this group, send email to jpassio...@googlegroups.com.
To unsubscribe from this group, send email to jpassion_spri...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jpassion_spring?hl=en.

Rafał Laczek

unread,
Aug 10, 2012, 2:29:45 PM8/10/12
to RafaÂł Laczek, bnwo...@gmail.com, jpassio...@googlegroups.com

Problem is solved.

Small error.

 

Regards,

Rafal

 

Dnia 10-08-2012 o godz. 14:54 Rafaďż˝ Laczek napisaďż˝(a):

Reply all
Reply to author
Forward
0 new messages