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 186221 - Java EE API is packaged in EAR after creating EJB with remote interface in library
Summary: Java EE API is packaged in EAR after creating EJB with remote interface in li...
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: issues@javaee
URL:
Keywords:
Depends on: 207717
Blocks: 177214 185139
  Show dependency tree
 
Reported: 2010-05-16 20:01 UTC by Petr Jiricka
Modified: 2012-01-25 17:10 UTC (History)
1 user (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 Petr Jiricka 2010-05-16 20:01:37 UTC
1. Create a Maven enterprise application with web module and ejb module
2. Create a Maven library project (inside the enterprise application directory) and set its source level to 1.5
3. Create an EJB in the EJB module with remote interface in the library, and build the EAR with dependencies

You will see that javaee-api-6.0.jar will be packaged inside the ear. This is because the library declares dependency on this API (as is imports javax.ejb.Remote) as follows:

        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
            <version>6.0</version>
        </dependency>

The workaround is to add <scope>provided</scope> to the dependency declaration. That should also be the fix - the IDE must generated the dependency correctly.
Comment 1 David Konecny 2010-05-16 23:07:53 UTC
Sounds right.
Comment 2 Petr Jiricka 2010-05-19 09:25:23 UTC
Fixed: http://hg.netbeans.org/web-main/rev/9cbd59832985