You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by pjungwir <ma...@9stmaryrd.com> on 2006/10/26 00:25:20 UTC

Re: Malformed manifest classpath entry

Hello,

Could you please post your MANIFEST.MF file so we can see what "royally
screwed up" means?

Thanks,
Paul


Alexander Sack-3 wrote:
> 
> Hi Everybody,
> 
> I did check the email archives on this one and I'm not sure what's what...
> 
> If I specify a manifest entry such as:
> 
> <archive>
>   <manifestEntries>
>      <Class-Path>lib/some1.jar lib/some2.jar lib/some3.jar lib/some4.jar
> lib/some5.jar</Class-Path>
>    </manifestEntries>
> </archive> -->
> 
> The actual manifest entry is royally screwed up in terms of formatting. 
> I'm
> porting projects so I realize I need to play around with dependencies so I
> can just use the addClassPath entry, but shouldn't this work regardless?
> 
> Also, can someone tell me the difference between compile, runtime, and
> provided with respect to the <addClassPath> tag? Its not very obvious from
> the doc (or I'm looking at the wrong doc).
> 
> Thanks!
> 
> -aps
> 
> -- 
> "What lies behind us and what lies in front of us is of little concern to
> what lies within us." -Ralph Waldo Emerson
> 
> 

-- 
View this message in context: http://www.nabble.com/Malformed-manifest-classpath-entry-tf2497595.html#a7001669
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: Malformed manifest classpath entry

Posted by Alexander Sack <pi...@gmail.com>.
Yeah, I did a lot of mail-archive.com searching and its a common issue.
Transitive dependency tracking can be fantastic (especially for Java
applications building), but for EARs its VERY dangerous since you are left
with runtime exceptions to debug (treaded cast class exceptions etc.)
instead of a compile time errors which defeats the whole purpose of Maven2!
:D

-aps

On 10/25/06, pjungwir <ma...@9stmaryrd.com> wrote:
>
>
> Yeah, I wish maven wouldn't wrap the Class-Path entry, too.
>
> I'm pretty new to maven myself, so I haven't tried out multi-module builds
> or J2EE builds. But I think you have the right idea. Marking things
> provided
> is the surest way I know to keep transitive dependencies out of your
> artifacts. There is also the <exclusions> tag, but then you have to catch
> every path from which the dependency is coming. A lot of people seem to
> get
> bit by your problem, so perhaps a flag to exclude transitive dependencies
> would be a good idea. You could override it on a per-dependency basis.
>
> Paul
>
> --
> View this message in context:
> http://www.nabble.com/Malformed-manifest-classpath-entry-tf2497595.html#a7002290
> 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
>
>


-- 
"What lies behind us and what lies in front of us is of little concern to
what lies within us." -Ralph Waldo Emerson

Re: Malformed manifest classpath entry

Posted by Alexander Sack <pi...@gmail.com>.
Wayne, that seems like a different error.  You shouldn't have Class-Path
entries in the EAR's manifest (including Java EE 1.4) These entries belong
in the modules within the ear, i.e. the EJB JAR's, etc.

Though Max is technically right, its still ugly!!!  :D!

Alex

On 10/25/06, Wayne Fay <wa...@gmail.com> wrote:
>
> Glassfish's application verifier (SJAS 9.1) actually complains about
> any Class-Path entry in your EAR MANIFEST... Apparently the most
> recent J2EE spec disallows this, haven't looked into it much myself,
> we're finally targeting JEE5 for our next release so I'm sure I'll
> learn a lot of new things.
>
> Test Name : tests.app.EARFileUsesClassPath
> Test Assertion : Manifest file of an EAR file should not contain
> Class-Path entries.
>
> Wayne
>
> On 10/25/06, Max Cooper <ma...@maxcooper.com> wrote:
> > I agree that it is ugly, but the Jar Specification requires the
> > wrapping, see "Line length" in this section:
> >
> >
> http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Notes%20on%20Manifest%20and%20Signature%20Files
> >
> > The plugin is doing the right thing.
> >
> > -Max
> >
> > pjungwir wrote:
> > > Yeah, I wish maven wouldn't wrap the Class-Path entry, too.
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
"What lies behind us and what lies in front of us is of little concern to
what lies within us." -Ralph Waldo Emerson

Re: Malformed manifest classpath entry

Posted by Wayne Fay <wa...@gmail.com>.
Glassfish's application verifier (SJAS 9.1) actually complains about
any Class-Path entry in your EAR MANIFEST... Apparently the most
recent J2EE spec disallows this, haven't looked into it much myself,
we're finally targeting JEE5 for our next release so I'm sure I'll
learn a lot of new things.

Test Name : tests.app.EARFileUsesClassPath
Test Assertion : Manifest file of an EAR file should not contain
Class-Path entries.

Wayne

On 10/25/06, Max Cooper <ma...@maxcooper.com> wrote:
> I agree that it is ugly, but the Jar Specification requires the
> wrapping, see "Line length" in this section:
>
> http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Notes%20on%20Manifest%20and%20Signature%20Files
>
> The plugin is doing the right thing.
>
> -Max
>
> pjungwir wrote:
> > Yeah, I wish maven wouldn't wrap the Class-Path entry, too.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: Malformed manifest classpath entry

Posted by Max Cooper <ma...@maxcooper.com>.
I agree that it is ugly, but the Jar Specification requires the 
wrapping, see "Line length" in this section:

http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Notes%20on%20Manifest%20and%20Signature%20Files

The plugin is doing the right thing.

-Max

pjungwir wrote:
> Yeah, I wish maven wouldn't wrap the Class-Path entry, too.
> 

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


Re: Malformed manifest classpath entry

Posted by pjungwir <ma...@9stmaryrd.com>.
Yeah, I wish maven wouldn't wrap the Class-Path entry, too.

I'm pretty new to maven myself, so I haven't tried out multi-module builds
or J2EE builds. But I think you have the right idea. Marking things provided
is the surest way I know to keep transitive dependencies out of your
artifacts. There is also the <exclusions> tag, but then you have to catch
every path from which the dependency is coming. A lot of people seem to get
bit by your problem, so perhaps a flag to exclude transitive dependencies
would be a good idea. You could override it on a per-dependency basis.

Paul

-- 
View this message in context: http://www.nabble.com/Malformed-manifest-classpath-entry-tf2497595.html#a7002290
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: Malformed manifest classpath entry

Posted by Alexander Sack <pi...@gmail.com>.
Hi Paul,

Sorry, yea, I've been a little frustrated dealing with manifest entries and
transitive dependencies (last post).  I've solved my problems for the most
part.

 For the below issue what was happening is Maven2 (Plexutils I think) is
generating the manifest file and not copying the EXACT string between my
tags.  It is formatting it which I found very odd, I would get:

Class-Path: lib/mylib1.jar ...... lib/mylib
  1.jar lib/mylib2.jar... lib/mylib3.
  jar

etc.  it actually works during runtime, its looks ugly as sin.

I'm using addClassPath now  so I don't have the generated manifest to post
(again sorry) which led me to my other post about transitive dependencies
and best practices (I now have a duplicate dependency entries in the parent
and transitive dependencies explicilty listed in order to give them a scope
of provided so they don't appear in my EAR).

FYI, I really think the transitive dependencies should be completely
optional.  In my case I had like 4-5 that crept in which would royally screw
up a JBoss deploy (like log4j, commons-logging,  xerces, etc.).

Thanks!

-aps

On 10/25/06, pjungwir <ma...@9stmaryrd.com> wrote:
>
>
> Hello,
>
> Could you please post your MANIFEST.MF file so we can see what "royally
> screwed up" means?
>
> Thanks,
> Paul
>
>
> Alexander Sack-3 wrote:
> >
> > Hi Everybody,
> >
> > I did check the email archives on this one and I'm not sure what's
> what...
> >
> > If I specify a manifest entry such as:
> >
> > <archive>
> >   <manifestEntries>
> >      <Class-Path>lib/some1.jar lib/some2.jar lib/some3.jar lib/some4.jar
> > lib/some5.jar</Class-Path>
> >    </manifestEntries>
> > </archive> -->
> >
> > The actual manifest entry is royally screwed up in terms of formatting.
> > I'm
> > porting projects so I realize I need to play around with dependencies so
> I
> > can just use the addClassPath entry, but shouldn't this work regardless?
> >
> > Also, can someone tell me the difference between compile, runtime, and
> > provided with respect to the <addClassPath> tag? Its not very obvious
> from
> > the doc (or I'm looking at the wrong doc).
> >
> > Thanks!
> >
> > -aps
> >
> > --
> > "What lies behind us and what lies in front of us is of little concern
> to
> > what lies within us." -Ralph Waldo Emerson
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Malformed-manifest-classpath-entry-tf2497595.html#a7001669
> 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
>
>


-- 
"What lies behind us and what lies in front of us is of little concern to
what lies within us." -Ralph Waldo Emerson