This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 211039 - unknown.binary in dependency in pom.xml
Summary: unknown.binary in dependency in pom.xml
Status: RESOLVED WORKSFORME
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: TomasKraus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-11 18:13 UTC by viggonavarsete
Modified: 2013-04-17 14:30 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description viggonavarsete 2012-04-11 18:13:54 UTC
I have generated a Maven Web application, and inside my pom.xml I can see that a lot of the dependencies have groupId set to unknown.binary. What is the reason for this? Is it a bug? Should it be this way, and if yes, why?
    <dependencies>
        <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>
            <version>3.2</version>
        </dependency>
        <dependency>
            <groupId>unknown.binary</groupId>
            <artifactId>org.eclipse.persistence.jpa.modelgen</artifactId>
            <version>SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>unknown.binary</groupId>
            <artifactId>org.eclipse.persistence.asm</artifactId>
            <version>SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>unknown.binary</groupId>
            <artifactId>org.eclipse.persistence.antlr</artifactId>
            <version>SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>unknown.binary</groupId>
            <artifactId>org.eclipse.persistence.jpa</artifactId>
            <version>SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>unknown.binary</groupId>
            <artifactId>org.eclipse.persistence.core</artifactId>
            <version>SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>unknown.binary</groupId>
            <artifactId>org.eclipse.persistence.oracle</artifactId>
            <version>SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>unknown.binary</groupId>
            <artifactId>org.eclipse.persistence.moxy</artifactId>
            <version>SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>unknown.binary</groupId>
            <artifactId>javax.persistence</artifactId>
            <version>SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-web-api</artifactId>
            <version>6.0</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>


According to Petr Jiricka this is an issue (regression since it used to work). I did *not* change the EclipseLink library in the library manager (Petr asked..).
Comment 1 Jesse Glick 2012-04-11 18:20:04 UTC
As described on NetCAT, it is the responsibility of whatever code is adding these libraries to the project to make sure there are reasonable corresponding Maven artifacts available.
Comment 2 viggonavarsete 2012-04-11 18:23:01 UTC
Could Netbeans provide some hints/tips in situations like this? I know the normal editor can provide tons of hints, but I think that what you've just described is something that Netbeans could try to help the user with in the pom. I'm a fairly experienced Maven user, and would probably sort out both groupId, artifactId and version myself if Netbeans couldn't help me, but for novice users I think Netbeans could provide some help:) (hint like "Try add repository, use http://jarfinder.com to figure out where the class is used, etc etc etc)
Comment 3 Jesse Glick 2012-04-11 18:38:17 UTC
Well the IDE is only adding this kind of dependency as a last resort, when there is no other known way to find the right artifacts.

From glancing at the list of JARs, it seems they have something to do JPA, but I am not clear on what specific IDE function triggered this change.
Comment 4 Sergey Petrov 2012-04-12 05:54:20 UTC
I'll add space in Eclipselink (JPA2.0) name so it will be first but Eclipselink from Gf should be created by plugin if I remeber right.
Is it important to not have 'unknown.binary'?
Comment 5 Petr Jiricka 2012-04-12 08:33:28 UTC
> I'll add space in Eclipselink (JPA2.0) name so it will be first

Sounds like a hack, we should have a more robust solution. Will this work in non-English locales? But as a quick fix it's ok. 

> Is it important to not have 'unknown.binary'?

Yes.
Comment 6 Vince Kraemer 2012-05-17 17:38:51 UTC
(In reply to comment #4)
> I'll add space in Eclipselink (JPA2.0) name so it will be first but Eclipselink
> from Gf should be created by plugin if I remeber right.

Can you describe the change that you are expecting the plugin to make in a bit more detail?
Comment 7 Sergey Petrov 2012-05-17 18:22:21 UTC
space is added already, gf issue is 'unknown.binary', can't say what should be done to avoid this case and if it's possible to avoid.
Comment 8 Petr Jiricka 2012-05-18 09:15:26 UTC
I think when GlassFish is creating the "EclipseLink from GlassFish" library, it needs to provide a "pom volume" which points to the corresponding pom files on the web. That should help.
Comment 9 TomasKraus 2012-05-23 08:35:47 UTC
Assigning to myself. Targeting after Tooling SDK will be finished.
Comment 10 TomasKraus 2012-11-22 10:37:27 UTC
Added to changeset for next release. We will use new library builder framework to generate EclipseLink library and add related maven information.
Comment 11 TomasKraus 2013-04-17 14:30:21 UTC
I just created new maven web project and added few classes with javax.persistence dependencies.

pom.xml contains

    <dependencies>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-web-api</artifactId>
            <version>6.0</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

For me it looks like this issue is resolved in 7.3.1.