DaveAKing / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Maven artifact com.google.guava:guava:14.0.1 has "type" being "bundle" when imported by m2e #1383

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I start a new project and want to add Guava to the Maven dependencies by 
using the m2e interface, I end up with the following:

    <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>14.0.1</version>
        <type>bundle</type>
    </dependency>

And right after that m2e is complaining that it cannot find the artifact named 
"com.google.guava:guava:bundle:14.0.1". I have to manually remove 
"<type>bundle</type>" from the pom.xml to import Guava successfully. This is 
the default choice when importing from m2e since version 14.0-rc2 (see picture 
attached). Given that my eclipse version hasn't changed in a while but Guava's 
versions did, I suppose the issue has more to do with Guava than it has with 
m2e.

To be honest, I don't know if the issue is in the way Guava is configured or if 
it's in m2e, so I try here first.

Original issue reported on code.google.com by ogregoire on 24 Apr 2013 at 3:30

Attachments:

GoogleCodeExporter commented 9 years ago
So, this is sort of an odd edge-case with maven and types and m2e and the fact 
that we made the guava artifact a bundle so the OSGI metadata would properly 
get in.  The issue is that the OSGI bundle type puts out a jar, but maven 
assumes that the type == the file extension, so there's a mismatched assumption 
there.  We did that because making guava a default jar type required some 
really flaky (and sometimes failing) steps to get the OSGI metadata merged in 
the manifest.

Given this, I"ll make it a point for 15 to find a better way to get the OSGI 
stuff in place without using a separate artifact type, or figure out what we 
can change otherwise to make this issue go away. 

Original comment by cgruber@google.com on 24 Apr 2013 at 4:11

GoogleCodeExporter commented 9 years ago
Any updates on this?

Original comment by cgdecker@google.com on 3 Jul 2013 at 5:58

GoogleCodeExporter commented 9 years ago
So after some digging, we're of the opinion that we need to mark this as 
will-not-fix.  The issue is that bundles output .jars, so the fact that M2E 
adds a <type>bundle<type> which looks for .bundle is an error in either M2E or 
the bundle type itself.  The workaround is trivial - remove <type>bundle<type> 
from your pom.xml.  We have changed how we package, but the way we are doing it 
isn't an error, the tools are simply not behaving reasonably. 

Original comment by cgruber@google.com on 29 Jul 2013 at 7:15

GoogleCodeExporter commented 9 years ago

Original comment by cgruber@google.com on 29 Jul 2013 at 7:15

GoogleCodeExporter commented 9 years ago
Ok. Thanks!

I've reported the issue to m2e. 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=414209

Original comment by ogregoire on 1 Aug 2013 at 2:58

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<issue id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:12

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:08