Removing javax restriction from packaging #1

Merged
merged 1 commit into from Mar 21, 2012

Conversation

Projects
None yet
3 participants

jvanzyl commented Mar 19, 2012

... like javax.inject.**

in the context of Maven I don't believe we're ever going to give JarJar direct access to the JRE where
everything can be pulled in.

in my case here where i am making a self-contained JSR330-based server removing the javax restricted resulted
in a working uber jar.

Jason van Zyl o eliminating javax from the rule processing causes problems with thi…
…ngs like javax.inject.**

  in the context of Maven I don't believe we're ever going to give JarJar direct access to the JRE where
  everything can be pulled in.

  in my case here where i am making a self-contained JSR330-based server removing the javax restricted resulted
  in a working uber jar.
8e39d8a
Member

mcculls commented Mar 21, 2012

Sounds reasonable, I just need to double-check why this check was added in the first place...

Member

mcculls commented Mar 21, 2012

This rule has been in ever since the keep rule was added - AFAICT the idea is that you don't want to keep packages that ship with the JVM (mainly java, but also covers some javax packages). However there are also javax packages that don't ship with the JVM that you do want to keep.

One question - does the build work if you use the unpatched plugin and add an explicit rule for javax.inject?

jvanzyl commented Mar 21, 2012

Nope.

On Mar 21, 2012, at 10:27 AM, Stuart McCulloch wrote:

This rule has been in ever since the keep rule was added - AFAICT the idea is that you don't want to keep packages that ship with the JVM (mainly java, but also covers some javax packages). However there are also javax packages that don't ship with the JVM that you do want to keep.

One question - does the build work if you use the unpatched plugin and add an explicit rule for javax.inject?


Reply to this email directly or view it on GitHub:
#1 (comment)

Thanks,

Jason


Jason van Zyl
Founder, Apache Maven

http://twitter.com/jvanzyl

We know what we are, but know not what we may be.

-- Shakespeare

@mcculls mcculls added a commit that referenced this pull request Mar 21, 2012

@mcculls mcculls Merge pull request #1 from jvanzyl/master
Removing javax restriction from packaging
218fa49

@mcculls mcculls merged commit 218fa49 into sonatype:master Mar 21, 2012

mgenov commented Aug 28, 2012

Hello,

Is this fix still valid ?

I'm trying to include: javax.inject:javax.inject, and when jar is packaged I get java.lang.NoClassDefFoundError: javax/inject/Provider

Member

mcculls commented Aug 28, 2012

This has been fixed in trunk but has not yet been released - if you can confirm the fix works for you (by checking out the jarjar-maven-plugin, building it locally, then updating your project to use that 1.6-SNAPSHOT) then I can stage a release.

mgenov commented Aug 28, 2012

Works great.

I think that I found another packaging issue, but I will post it as issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment