Hello everyone,

As per the Maven best practices found at 
https://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html
 
<https://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html>,
 I am trying to group common dependencies in separate modules of a multi-module 
project. When running the project in Eclipse everything works fine but when I 
deploy the application the startup fails due to bad jar-files. 

I narrowed down the classpath entries causing the application to fail and 
discovered the cause. For some reason the *ClassPath.txt files generated by the 
wolifecycle plugin contain entries even for the pom type dependencies.

So if I have a dependency like this in my pom file

<dependency>
  <groupId>com.example</groupId>
  <artifactId>Dependencies</artifact>
  <version>1.0</version>
  <type>pom</pom>
</dependency>

I get an entry in my *ClassPath.txt files like this

APPROOT/Resources/Java/com/example/Dependencies/1.0/Dependencies-1.0.jar

Since the respective modules do not produce jar files due to their packaging 
type being 'pom', the built generates some dummy .jar files which seem to be 
broken. When I try to unzip such files from the command line, I get the error:

End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.


When I remove the faulty entries from the *ClassPath.txt files, the application 
starts successfully. Has anyone encountered this problem? Is there a good way 
to have the build process remove such entries automatically or maybe not 
generate them at all?

Thanks a lot for any suggestions!


With kind regards

-- 
Dennis Scheffer

Phone    +49-(0)941-69 84 84-25
den...@selbstdenker.ag

===================================

SELBSTDENKER AG - No Vision Too Far

Gesandtenstraße 10
93047 Regensburg
Phone  +49-(0)941-69 84 84-0
Fax       +49-(0)941-69 84 84-99

b...@selbstdenker.ag
http://www.selbstdenker.ag

Niederlassung: Regensburg
Handelsregister:  Regensburg HRB 7860
Vorstand/CEO:  Herr Stephan Fürnrohr
Vors. des Aufsichtsrates/Chairman of the board: 
Herr Dipl. Betriebswirt (FH) Richard Sibinger

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to