You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Matthew Watson (JIRA)" <ji...@codehaus.org> on 2009/05/01 01:42:44 UTC

[jira] Created: (MECLIPSE-557) eclipse:to-maven produces unusable jars (jars containing jars)

eclipse:to-maven produces unusable jars (jars containing jars)
--------------------------------------------------------------

                 Key: MECLIPSE-557
                 URL: http://jira.codehaus.org/browse/MECLIPSE-557
             Project: Maven 2.x Eclipse Plugin
          Issue Type: Bug
          Components: Core : .project, OSGi, Manifest
    Affects Versions: 2.6
         Environment: Linux, Suse 10.x, maven 2.0.x. jdk 1.6.0_10, eclipse-jee-ganymede-SR2-linux-gtk (3.4.2)
            Reporter: Matthew Watson


The eclipse install contains plugins that are actually directories, which contain the plugin.xml etc and a jar file (for example: org.hibernate.eclipse_3.2.3.GA, org.junit4_4.3.1) or more than one jar file (e.g. org.eclipse.emf.teneo.hibernate_1.0.1.v200809211527)

eclipse:to-maven simply jars up the directory when it puts it in the repository, which means all the classes in the jar(s) inside are unreachable.

I am not sure what a suitable behaviour is - I have expanded the jars in org.eclipse.emf.teneo.hibernate_1.0.1.v200809211527 and re-jarred it and it then works fine in maven, so this may be a (optional) solution.

-- 
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: (MECLIPSE-557) eclipse:to-maven produces unusable jars (jars containing jars)

Posted by "Matthew Watson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MECLIPSE-557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=175010#action_175010 ] 

Matthew Watson edited comment on MECLIPSE-557 at 5/3/09 9:38 PM:
-----------------------------------------------------------------

This patch (patch3) creates another plugin and model for each contained jar and adds them as a dependency on the containing model.

This works around the jar signing issues by leaving the jars alone.

Each sub-jar is given the group id of the parent with the artifact id appended (with a ".") and their own artifact id is the name of the jar.

For junit, this produces (along with appropriate poms:
org/junit/3.8.2/junit.jar (which is simply a zip of the eclipse plugin directory)
org/junit/junit/3.8.2/junit.jar (which is the contained jar itself)

for org.eclipse.emf.teneo.hibernate we get:
org/eclipse/emf/teneo/hibernate/1.0.1/hibernate-1.0.1.jar: the zipped plugin directory
org/eclipse/emf/teneo/hibernate/org.eclipse.emf.teneo.hibernate/1.0.1/org.eclipse.emf.teneo.hibernate-1.0.1.jar
org/eclipse/emf/teneo/hibernate/org.eclipse.emf.teneo.hibernate.extra/1.0.1/org.eclipse.emf.teneo.hibernate.extra-1.0.1.jar

The idea is that no-one should depend on the sub-jar poms directly, only transitively via the containing pom.
This works for all my usage cases.

      was (Author: mattw_watson):
    This patch creates another plugin and model for each contained jar and adds them as a dependency on the containing model.

This works around the jar signing issues by leaving the jars alone.

Each sub-jar is given the group id of the parent with the artifact id appended (with a ".") and their own artifact id is the name of the jar.

For junit, this produces (along with appropriate poms:
org/junit/3.8.2/junit.jar (which is simply a zip of the eclipse plugin directory)
org/junit/junit/3.8.2/junit.jar (which is the contained jar itself)

for org.eclipse.emf.teneo.hibernate we get:
org/eclipse/emf/teneo/hibernate/1.0.1/hibernate-1.0.1.jar: the zipped plugin directory
org/eclipse/emf/teneo/hibernate/org.eclipse.emf.teneo.hibernate/1.0.1/org.eclipse.emf.teneo.hibernate-1.0.1.jar
org/eclipse/emf/teneo/hibernate/org.eclipse.emf.teneo.hibernate.extra/1.0.1/org.eclipse.emf.teneo.hibernate.extra-1.0.1.jar

The idea is that no-one should depend on the sub-jar poms directly, only transitively via the containing pom.
This works for all my usage cases.
  
> eclipse:to-maven produces unusable jars (jars containing jars)
> --------------------------------------------------------------
>
>                 Key: MECLIPSE-557
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-557
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: Core : .project, OSGi, Manifest
>    Affects Versions: 2.6
>         Environment: Linux, Suse 10.x, maven 2.0.x. jdk 1.6.0_10, eclipse-jee-ganymede-SR2-linux-gtk (3.4.2)
>            Reporter: Matthew Watson
>         Attachments: patch, patch2, patch3
>
>
> The eclipse install contains plugins that are actually directories, which contain the plugin.xml etc and a jar file (for example: org.hibernate.eclipse_3.2.3.GA, org.junit4_4.3.1) or more than one jar file (e.g. org.eclipse.emf.teneo.hibernate_1.0.1.v200809211527)
> eclipse:to-maven simply jars up the directory when it puts it in the repository, which means all the classes in the jar(s) inside are unreachable.
> I am not sure what a suitable behaviour is - I have expanded the jars in org.eclipse.emf.teneo.hibernate_1.0.1.v200809211527 and re-jarred it and it then works fine in maven, so this may be a (optional) solution.

-- 
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: (MECLIPSE-557) eclipse:to-maven produces unusable jars (jars containing jars)

Posted by "Matthew Watson (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MECLIPSE-557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew Watson updated MECLIPSE-557:
------------------------------------

    Attachment: patch3

This patch creates another plugin and model for each contained jar and adds them as a dependency on the containing model.

This works around the jar signing issues by leaving the jars alone.

Each sub-jar is given the group id of the parent with the artifact id appended (with a ".") and their own artifact id is the name of the jar.

For junit, this produces (along with appropriate poms:
org/junit/3.8.2/junit.jar (which is simply a zip of the eclipse plugin directory)
org/junit/junit/3.8.2/junit.jar (which is the contained jar itself)

for org.eclipse.emf.teneo.hibernate we get:
org/eclipse/emf/teneo/hibernate/1.0.1/hibernate-1.0.1.jar: the zipped plugin directory
org/eclipse/emf/teneo/hibernate/org.eclipse.emf.teneo.hibernate/1.0.1/org.eclipse.emf.teneo.hibernate-1.0.1.jar
org/eclipse/emf/teneo/hibernate/org.eclipse.emf.teneo.hibernate.extra/1.0.1/org.eclipse.emf.teneo.hibernate.extra-1.0.1.jar

The idea is that no-one should depend on the sub-jar poms directly, only transitively via the containing pom.
This works for all my usage cases.

> eclipse:to-maven produces unusable jars (jars containing jars)
> --------------------------------------------------------------
>
>                 Key: MECLIPSE-557
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-557
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: Core : .project, OSGi, Manifest
>    Affects Versions: 2.6
>         Environment: Linux, Suse 10.x, maven 2.0.x. jdk 1.6.0_10, eclipse-jee-ganymede-SR2-linux-gtk (3.4.2)
>            Reporter: Matthew Watson
>         Attachments: patch, patch2, patch3
>
>
> The eclipse install contains plugins that are actually directories, which contain the plugin.xml etc and a jar file (for example: org.hibernate.eclipse_3.2.3.GA, org.junit4_4.3.1) or more than one jar file (e.g. org.eclipse.emf.teneo.hibernate_1.0.1.v200809211527)
> eclipse:to-maven simply jars up the directory when it puts it in the repository, which means all the classes in the jar(s) inside are unreachable.
> I am not sure what a suitable behaviour is - I have expanded the jars in org.eclipse.emf.teneo.hibernate_1.0.1.v200809211527 and re-jarred it and it then works fine in maven, so this may be a (optional) solution.

-- 
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: (MECLIPSE-557) eclipse:to-maven produces unusable jars (jars containing jars)

Posted by "Matthew Watson (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MECLIPSE-557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew Watson updated MECLIPSE-557:
------------------------------------

    Attachment: patch

Here is a patch to ExplodedPlugin.java I wrote to fix the problem.

Note, I'm not sure, but the problem may also occur in non-directory plugins, but I haven't hit one yet.

> eclipse:to-maven produces unusable jars (jars containing jars)
> --------------------------------------------------------------
>
>                 Key: MECLIPSE-557
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-557
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: Core : .project, OSGi, Manifest
>    Affects Versions: 2.6
>         Environment: Linux, Suse 10.x, maven 2.0.x. jdk 1.6.0_10, eclipse-jee-ganymede-SR2-linux-gtk (3.4.2)
>            Reporter: Matthew Watson
>         Attachments: patch
>
>
> The eclipse install contains plugins that are actually directories, which contain the plugin.xml etc and a jar file (for example: org.hibernate.eclipse_3.2.3.GA, org.junit4_4.3.1) or more than one jar file (e.g. org.eclipse.emf.teneo.hibernate_1.0.1.v200809211527)
> eclipse:to-maven simply jars up the directory when it puts it in the repository, which means all the classes in the jar(s) inside are unreachable.
> I am not sure what a suitable behaviour is - I have expanded the jars in org.eclipse.emf.teneo.hibernate_1.0.1.v200809211527 and re-jarred it and it then works fine in maven, so this may be a (optional) solution.

-- 
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: (MECLIPSE-557) eclipse:to-maven produces unusable jars (jars containing jars)

Posted by "Matthew Watson (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MECLIPSE-557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew Watson updated MECLIPSE-557:
------------------------------------

    Attachment: patch2

This patch is slightly more correct

> eclipse:to-maven produces unusable jars (jars containing jars)
> --------------------------------------------------------------
>
>                 Key: MECLIPSE-557
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-557
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: Core : .project, OSGi, Manifest
>    Affects Versions: 2.6
>         Environment: Linux, Suse 10.x, maven 2.0.x. jdk 1.6.0_10, eclipse-jee-ganymede-SR2-linux-gtk (3.4.2)
>            Reporter: Matthew Watson
>         Attachments: patch, patch2
>
>
> The eclipse install contains plugins that are actually directories, which contain the plugin.xml etc and a jar file (for example: org.hibernate.eclipse_3.2.3.GA, org.junit4_4.3.1) or more than one jar file (e.g. org.eclipse.emf.teneo.hibernate_1.0.1.v200809211527)
> eclipse:to-maven simply jars up the directory when it puts it in the repository, which means all the classes in the jar(s) inside are unreachable.
> I am not sure what a suitable behaviour is - I have expanded the jars in org.eclipse.emf.teneo.hibernate_1.0.1.v200809211527 and re-jarred it and it then works fine in maven, so this may be a (optional) solution.

-- 
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: (MECLIPSE-557) eclipse:to-maven produces unusable jars (jars containing jars)

Posted by "Matthew Watson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MECLIPSE-557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=175007#action_175007 ] 

Matthew Watson commented on MECLIPSE-557:
-----------------------------------------

The fix doesn't work for signed jars.
I think this may be the wrong approach.
Probably need to create a separate pom for the nested jars and depend on it.

> eclipse:to-maven produces unusable jars (jars containing jars)
> --------------------------------------------------------------
>
>                 Key: MECLIPSE-557
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-557
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: Core : .project, OSGi, Manifest
>    Affects Versions: 2.6
>         Environment: Linux, Suse 10.x, maven 2.0.x. jdk 1.6.0_10, eclipse-jee-ganymede-SR2-linux-gtk (3.4.2)
>            Reporter: Matthew Watson
>         Attachments: patch, patch2
>
>
> The eclipse install contains plugins that are actually directories, which contain the plugin.xml etc and a jar file (for example: org.hibernate.eclipse_3.2.3.GA, org.junit4_4.3.1) or more than one jar file (e.g. org.eclipse.emf.teneo.hibernate_1.0.1.v200809211527)
> eclipse:to-maven simply jars up the directory when it puts it in the repository, which means all the classes in the jar(s) inside are unreachable.
> I am not sure what a suitable behaviour is - I have expanded the jars in org.eclipse.emf.teneo.hibernate_1.0.1.v200809211527 and re-jarred it and it then works fine in maven, so this may be a (optional) solution.

-- 
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: (MECLIPSE-557) eclipse:to-maven produces unusable jars (jars containing jars)

Posted by "Matthew Watson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MECLIPSE-557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=174832#action_174832 ] 

Matthew Watson commented on MECLIPSE-557:
-----------------------------------------

The plugins with a jar in them have a:

{noformat}Bundle-ClassPath: junit.jar{noformat}

or

{noformat}Bundle-ClassPath: .,org.eclipse.emf.teneo.hibernate.extra.jar,org.ecli
 pse.emf.teneo.hibernate.jar{noformat}

In their META-INF/MANIFEST.MF.
Other "normal" plugins don't seem to have this.

> eclipse:to-maven produces unusable jars (jars containing jars)
> --------------------------------------------------------------
>
>                 Key: MECLIPSE-557
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-557
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: Core : .project, OSGi, Manifest
>    Affects Versions: 2.6
>         Environment: Linux, Suse 10.x, maven 2.0.x. jdk 1.6.0_10, eclipse-jee-ganymede-SR2-linux-gtk (3.4.2)
>            Reporter: Matthew Watson
>
> The eclipse install contains plugins that are actually directories, which contain the plugin.xml etc and a jar file (for example: org.hibernate.eclipse_3.2.3.GA, org.junit4_4.3.1) or more than one jar file (e.g. org.eclipse.emf.teneo.hibernate_1.0.1.v200809211527)
> eclipse:to-maven simply jars up the directory when it puts it in the repository, which means all the classes in the jar(s) inside are unreachable.
> I am not sure what a suitable behaviour is - I have expanded the jars in org.eclipse.emf.teneo.hibernate_1.0.1.v200809211527 and re-jarred it and it then works fine in maven, so this may be a (optional) solution.

-- 
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