[fedora-java] Why no Class-Path manifest attribute?

Aleksandar Kurtakov akurtako at redhat.com
Thu Feb 6 11:34:40 UTC 2014


----- Original Message -----
> From: "Florian Weimer" <fweimer at redhat.com>
> To: "Andrew Haley" <aph at redhat.com>
> Cc: "java-devel" <java-devel at lists.fedoraproject.org>
> Sent: Thursday, February 6, 2014 1:19:22 PM
> Subject: Re: [fedora-java] Why no Class-Path manifest attribute?
> 
> On 05/29/2013 11:30 AM, Andrew Haley wrote:
> > On 05/29/13 10:13, Florian Weimer wrote:
> >> The existence of the Class-Path attribute is not widely known, and I was
> >> surprised to see it mentioned in the policy.
> >
> > Yes it is, it's very well-known, and is almost universally rejected.
> > It bakes hard paths into jarfiles and overrides -classpath.  In other
> > words, it has similar disadvantages to -RPATH.
> 
> I finally experimented with this:
> 
>    <https://github.com/fweimer/classpath-manifest-override>
> 
> The gist appears to be that overriding Class-Path entries is possible if
> the main class is not executed with the -jar option.  We generally don't
> do that in Fedora.  Does this mean Class-Path is still unacceptable?
> It's just that I found it extremely usable in the past.
> 
> What are the alternatives?
> 
> I built an application using Maven, and it uses the default
> <type>bundle</type> dependency, so Maven copies the class files of the
> dependencies into the application JAR.  As a result, the JAR just works,
> but this is like static linking, with all its problems.  Curiously, the
> Fedora packaging guidelines do not discuss this at all, as far as I can
> tell.
> 
> The spec file is here:
> 
>  
> <https://github.com/victims/victims-client-java/blob/master/victims-client-java.spec>
> 
> As you can see, I use the usual Maven packaging framework.

Bundling (and this is what your example is) is entirely forbidden - not just for Java but for everything.

https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries

Do we need to add special link to that page in java guidelines? I don't think that adding links to all the generic guidelines would make the java one better it would just make it bigger and harder to digest.

Alexander Kurtakov
Red Hat Eclipse team

> 
> --
> Florian Weimer / Red Hat Product Security Team
> --
> java-devel mailing list
> java-devel at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/java-devel


More information about the java-devel mailing list