You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Elias Ross (JIRA)" <ji...@codehaus.org> on 2009/07/14 22:24:22 UTC

[jira] Created: (MEAR-106) Plugin includes ejb libraries twice, e.g. JBoss Seam

Plugin includes <type>ejb</type> libraries twice, e.g. JBoss Seam
-----------------------------------------------------------------

                 Key: MEAR-106
                 URL: http://jira.codehaus.org/browse/MEAR-106
             Project: Maven 2.x Ear Plugin
          Issue Type: Bug
            Reporter: Elias Ross


-- Problem --

Same EJB library appears multiple times, causing class loading issues, especially for JBoss Seam.

Contents of ear:

META-INF/
META-INF/MANIFEST.MF
lib/
jboss-seam-2.1.2.jar
...
lib/jboss-seam-2.1.2.jar

-- To reproduce --

Add a dependency to the pom.xml, including JBoss Seam as an ejb type.

        <dependency>
            <groupId>org.jboss.seam</groupId>
            <artifactId>jboss-seam</artifactId>
            <type>ejb</type>
        </dependency>

Also include it as part of the configuration:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ear-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <version>5</version>
                    <ejbVersion>3.0</ejbVersion>
                    <defaultLibBundleDir>lib</defaultLibBundleDir>
                    <jboss>
                        <version>4</version>
                        <loader-repository>com.parkme:loader=${ear.name}.ear</loader-repository>
                        <library-directory>lib</library-directory>
                        <finalName>${ear.name}</finalName>
                    </jboss>

                    <modules>
...
                        <ejbModule>
                            <groupId>org.jboss.seam</groupId>
                            <artifactId>jboss-seam</artifactId>
                        </ejbModule>
                    </modules>

                </configuration>

Note that Seam requires this module to be deployed as an EJB module, so exclusion does NOT work.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MEAR-106) Plugin includes ejb libraries twice, e.g. JBoss Seam

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MEAR-106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MEAR-106:
-----------------------------------

    Attachment: MEAR-106.zip

The attached demo project was created from your description but does not reproduce the issue.

It's possible that some other module of the EAR erroneously depends on the seam JAR with type=jar instead of type=ejb. You could run "mvn dependency:tree" on the EAR project and look out for multiple occurrences of "org.jboss.seam:jboss-seam".

> Plugin includes <type>ejb</type> libraries twice, e.g. JBoss Seam
> -----------------------------------------------------------------
>
>                 Key: MEAR-106
>                 URL: http://jira.codehaus.org/browse/MEAR-106
>             Project: Maven 2.x Ear Plugin
>          Issue Type: Bug
>            Reporter: Elias Ross
>         Attachments: MEAR-106.zip
>
>
> -- Problem --
> Same EJB library appears multiple times, causing class loading issues, especially for JBoss Seam.
> Contents of ear:
> META-INF/
> META-INF/MANIFEST.MF
> lib/
> jboss-seam-2.1.2.jar
> ...
> lib/jboss-seam-2.1.2.jar
> -- To reproduce --
> Add a dependency to the pom.xml, including JBoss Seam as an ejb type.
>         <dependency>
>             <groupId>org.jboss.seam</groupId>
>             <artifactId>jboss-seam</artifactId>
>             <type>ejb</type>
>         </dependency>
> Also include it as part of the configuration:
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-ear-plugin</artifactId>
>                 <version>2.3.2</version>
>                 <configuration>
>                     <version>5</version>
>                     <ejbVersion>3.0</ejbVersion>
>                     <defaultLibBundleDir>lib</defaultLibBundleDir>
>                     <jboss>
>                         <version>4</version>
>                         <loader-repository>com.parkme:loader=${ear.name}.ear</loader-repository>
>                         <library-directory>lib</library-directory>
>                         <finalName>${ear.name}</finalName>
>                     </jboss>
>                     <modules>
> ...
>                         <ejbModule>
>                             <groupId>org.jboss.seam</groupId>
>                             <artifactId>jboss-seam</artifactId>
>                         </ejbModule>
>                     </modules>
>                 </configuration>
> Note that Seam requires this module to be deployed as an EJB module, so exclusion does NOT work.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MEAR-106) Plugin includes ejb libraries twice, e.g. JBoss Seam

Posted by "Elias Ross (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MEAR-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183570#action_183570 ] 

Elias Ross commented on MEAR-106:
---------------------------------

Here's the dependency tree output: 

$ mvn dependency:tree | grep seam
[INFO] +- org.jboss.seam:jboss-seam:ejb:2.1.2:compile
[INFO] +- org.jboss.seam:jboss-seam-ui:jar:2.1.2:compile
[INFO] |  +- org.jboss.seam:jboss-seam-jul:jar:2.1.2:compile
[INFO] +- org.jboss.seam:jboss-seam-debug:jar:2.1.2:compile



> Plugin includes <type>ejb</type> libraries twice, e.g. JBoss Seam
> -----------------------------------------------------------------
>
>                 Key: MEAR-106
>                 URL: http://jira.codehaus.org/browse/MEAR-106
>             Project: Maven 2.x Ear Plugin
>          Issue Type: Bug
>            Reporter: Elias Ross
>         Attachments: MEAR-106.zip
>
>
> -- Problem --
> Same EJB library appears multiple times, causing class loading issues, especially for JBoss Seam.
> Contents of ear:
> META-INF/
> META-INF/MANIFEST.MF
> lib/
> jboss-seam-2.1.2.jar
> ...
> lib/jboss-seam-2.1.2.jar
> -- To reproduce --
> Add a dependency to the pom.xml, including JBoss Seam as an ejb type.
>         <dependency>
>             <groupId>org.jboss.seam</groupId>
>             <artifactId>jboss-seam</artifactId>
>             <type>ejb</type>
>         </dependency>
> Also include it as part of the configuration:
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-ear-plugin</artifactId>
>                 <version>2.3.2</version>
>                 <configuration>
>                     <version>5</version>
>                     <ejbVersion>3.0</ejbVersion>
>                     <defaultLibBundleDir>lib</defaultLibBundleDir>
>                     <jboss>
>                         <version>4</version>
>                         <loader-repository>com.parkme:loader=${ear.name}.ear</loader-repository>
>                         <library-directory>lib</library-directory>
>                         <finalName>${ear.name}</finalName>
>                     </jboss>
>                     <modules>
> ...
>                         <ejbModule>
>                             <groupId>org.jboss.seam</groupId>
>                             <artifactId>jboss-seam</artifactId>
>                         </ejbModule>
>                     </modules>
>                 </configuration>
> Note that Seam requires this module to be deployed as an EJB module, so exclusion does NOT work.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MEAR-106) Plugin includes ejb libraries twice, e.g. JBoss Seam

Posted by "Elias Ross (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MEAR-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183570#action_183570 ] 

Elias Ross edited comment on MEAR-106 at 7/14/09 4:12 PM:
----------------------------------------------------------

Here's the dependency tree output: 

$ mvn dependency:tree | grep seam
[INFO] +- org.jboss.seam:jboss-seam:ejb:2.1.2:compile
[INFO] +- org.jboss.seam:jboss-seam-ui:jar:2.1.2:compile
[INFO] |  +- org.jboss.seam:jboss-seam-jul:jar:2.1.2:compile
[INFO] +- org.jboss.seam:jboss-seam-debug:jar:2.1.2:compile

It could be a transient dependency as you suggest, that doesn't appear in the tree but somehow gets added anyway.

I'll poke around a bit more and see if this is the case. I wish I had a test case for you.

      was (Author: genman):
    Here's the dependency tree output: 

$ mvn dependency:tree | grep seam
[INFO] +- org.jboss.seam:jboss-seam:ejb:2.1.2:compile
[INFO] +- org.jboss.seam:jboss-seam-ui:jar:2.1.2:compile
[INFO] |  +- org.jboss.seam:jboss-seam-jul:jar:2.1.2:compile
[INFO] +- org.jboss.seam:jboss-seam-debug:jar:2.1.2:compile


  
> Plugin includes <type>ejb</type> libraries twice, e.g. JBoss Seam
> -----------------------------------------------------------------
>
>                 Key: MEAR-106
>                 URL: http://jira.codehaus.org/browse/MEAR-106
>             Project: Maven 2.x Ear Plugin
>          Issue Type: Bug
>            Reporter: Elias Ross
>         Attachments: MEAR-106.zip
>
>
> -- Problem --
> Same EJB library appears multiple times, causing class loading issues, especially for JBoss Seam.
> Contents of ear:
> META-INF/
> META-INF/MANIFEST.MF
> lib/
> jboss-seam-2.1.2.jar
> ...
> lib/jboss-seam-2.1.2.jar
> -- To reproduce --
> Add a dependency to the pom.xml, including JBoss Seam as an ejb type.
>         <dependency>
>             <groupId>org.jboss.seam</groupId>
>             <artifactId>jboss-seam</artifactId>
>             <type>ejb</type>
>         </dependency>
> Also include it as part of the configuration:
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-ear-plugin</artifactId>
>                 <version>2.3.2</version>
>                 <configuration>
>                     <version>5</version>
>                     <ejbVersion>3.0</ejbVersion>
>                     <defaultLibBundleDir>lib</defaultLibBundleDir>
>                     <jboss>
>                         <version>4</version>
>                         <loader-repository>com.parkme:loader=${ear.name}.ear</loader-repository>
>                         <library-directory>lib</library-directory>
>                         <finalName>${ear.name}</finalName>
>                     </jboss>
>                     <modules>
> ...
>                         <ejbModule>
>                             <groupId>org.jboss.seam</groupId>
>                             <artifactId>jboss-seam</artifactId>
>                         </ejbModule>
>                     </modules>
>                 </configuration>
> Note that Seam requires this module to be deployed as an EJB module, so exclusion does NOT work.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MEAR-106) Plugin includes ejb libraries twice, e.g. JBoss Seam

Posted by "Elias Ross (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MEAR-106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Elias Ross closed MEAR-106.
---------------------------

    Resolution: Not A Bug

Looks like the diagnostics of Benjamin Bentmann was right. Although "dependency:tree" did not mention this .jar, it was indeed a duplicate dependency and included correctly by the plugin. Seems maybe a bug in the dependency plugin then? ;-)

> Plugin includes <type>ejb</type> libraries twice, e.g. JBoss Seam
> -----------------------------------------------------------------
>
>                 Key: MEAR-106
>                 URL: http://jira.codehaus.org/browse/MEAR-106
>             Project: Maven 2.x Ear Plugin
>          Issue Type: Bug
>            Reporter: Elias Ross
>         Attachments: MEAR-106.zip
>
>
> -- Problem --
> Same EJB library appears multiple times, causing class loading issues, especially for JBoss Seam.
> Contents of ear:
> META-INF/
> META-INF/MANIFEST.MF
> lib/
> jboss-seam-2.1.2.jar
> ...
> lib/jboss-seam-2.1.2.jar
> -- To reproduce --
> Add a dependency to the pom.xml, including JBoss Seam as an ejb type.
>         <dependency>
>             <groupId>org.jboss.seam</groupId>
>             <artifactId>jboss-seam</artifactId>
>             <type>ejb</type>
>         </dependency>
> Also include it as part of the configuration:
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-ear-plugin</artifactId>
>                 <version>2.3.2</version>
>                 <configuration>
>                     <version>5</version>
>                     <ejbVersion>3.0</ejbVersion>
>                     <defaultLibBundleDir>lib</defaultLibBundleDir>
>                     <jboss>
>                         <version>4</version>
>                         <loader-repository>com.parkme:loader=${ear.name}.ear</loader-repository>
>                         <library-directory>lib</library-directory>
>                         <finalName>${ear.name}</finalName>
>                     </jboss>
>                     <modules>
> ...
>                         <ejbModule>
>                             <groupId>org.jboss.seam</groupId>
>                             <artifactId>jboss-seam</artifactId>
>                         </ejbModule>
>                     </modules>
>                 </configuration>
> Note that Seam requires this module to be deployed as an EJB module, so exclusion does NOT work.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira