You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Michal Stochmialek (JIRA)" <ji...@codehaus.org> on 2005/12/29 11:31:04 UTC

[jira] Created: (MNGECLIPSE-21) subprojects' jars inside the project are added to eclipse .classpath

subprojects' jars inside the project are added to eclipse .classpath
--------------------------------------------------------------------

         Key: MNGECLIPSE-21
         URL: http://jira.codehaus.org/browse/MNGECLIPSE-21
     Project: Maven 2.x Plug-in for Eclipse
        Type: Improvement

 Environment: windows xp, eclipse 3.1, maven 2.0.1, plugin 0.0.3
    Reporter: Michal Stochmialek


My project is a multiproject which produces an ear with ejb and war. It has several subprojects / modules. The project has normal hierachial maven structure. 

Whole project (all subprojects) are contained in a single eclipse project. It's a quite convinient to work if it like that.

I tried to use eclipse plugin with this project, but I following problem appeared. While building .classpath (Maven2 Dependencies container) plugin is also adding subproject jars. 

In this case this behaviour is incorrect, since:

1) the same classes are also compiled by eclipse (from source folders). In result we have classes compiled by eclipse in output folder and classes compiled by maven in jars in maven repository.

2) one of subprojects is packaged as a war. In result eclipse is refusing to use this kind of dependency and I'm getting following message: "Illegal type of archive for required library: '<CUT>\.m2\repository\foo2\foo-web\0.0.1-SNAPSHOT\foo-web-0.0.1-SNAPSHOT.war' in project foo2"


See included example projected.


I'm not aware of any case when adding subproject jars to eclipse .classpath would be appropiate. Maybe you can turn off this 'feature' by default?


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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNGECLIPSE-21) subprojects' jars inside the project are added to eclipse .classpath

Posted by "Michal Stochmialek (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNGECLIPSE-21?page=comments#action_56074 ] 

Michal Stochmialek commented on MNGECLIPSE-21:
----------------------------------------------

Upss... the issue is closed. I can't attach anything. I will send you the screenshot by mail.

> subprojects' jars inside the project are added to eclipse .classpath
> --------------------------------------------------------------------
>
>          Key: MNGECLIPSE-21
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-21
>      Project: Maven 2.x Plug-in for Eclipse
>         Type: Improvement

>     Versions: 0.0.3
>  Environment: windows xp, eclipse 3.1, maven 2.0.1, plugin 0.0.3
>     Reporter: Michal Stochmialek
>     Assignee: Eugene Kuleshov
>      Fix For: 0.0.4
>  Attachments: mvn-multiproject-2.zip
>
>
> My project is a multiproject which produces an ear with ejb and war. It has several subprojects / modules. The project has normal hierachial maven structure. 
> Whole project (all subprojects) are contained in a single eclipse project. It's a quite convinient to work if it like that.
> I tried to use eclipse plugin with this project, but I following problem appeared. While building .classpath (Maven2 Dependencies container) plugin is also adding subproject jars. 
> In this case this behaviour is incorrect, since:
> 1) the same classes are also compiled by eclipse (from source folders). In result we have classes compiled by eclipse in output folder and classes compiled by maven in jars in maven repository.
> 2) one of subprojects is packaged as a war. In result eclipse is refusing to use this kind of dependency and I'm getting following message: "Illegal type of archive for required library: '<CUT>\.m2\repository\foo2\foo-web\0.0.1-SNAPSHOT\foo-web-0.0.1-SNAPSHOT.war' in project foo2"
> See included example projected.
> I'm not aware of any case when adding subproject jars to eclipse .classpath would be appropiate. Maybe you can turn off this 'feature' by default?

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNGECLIPSE-21) subprojects' jars inside the project are added to eclipse .classpath

Posted by "Michal Stochmialek (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNGECLIPSE-21?page=comments#action_55984 ] 

Michal Stochmialek commented on MNGECLIPSE-21:
----------------------------------------------

The problem with war dependency is one thing. The another problem is when you include subproject jars into classpath, then you have duplicates in classpath. Classes from subprojects are added to target directory from source folders, and also they are in jars (which plugin adds to eclipse classpath). Duplicates in classpath are often a cause of difficult to find class loading problems...

> subprojects' jars inside the project are added to eclipse .classpath
> --------------------------------------------------------------------
>
>          Key: MNGECLIPSE-21
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-21
>      Project: Maven 2.x Plug-in for Eclipse
>         Type: Improvement

>     Versions: 0.0.3
>  Environment: windows xp, eclipse 3.1, maven 2.0.1, plugin 0.0.3
>     Reporter: Michal Stochmialek
>     Assignee: Eugene Kuleshov
>      Fix For: 0.0.4
>  Attachments: mvn-multiproject-2.zip
>
>
> My project is a multiproject which produces an ear with ejb and war. It has several subprojects / modules. The project has normal hierachial maven structure. 
> Whole project (all subprojects) are contained in a single eclipse project. It's a quite convinient to work if it like that.
> I tried to use eclipse plugin with this project, but I following problem appeared. While building .classpath (Maven2 Dependencies container) plugin is also adding subproject jars. 
> In this case this behaviour is incorrect, since:
> 1) the same classes are also compiled by eclipse (from source folders). In result we have classes compiled by eclipse in output folder and classes compiled by maven in jars in maven repository.
> 2) one of subprojects is packaged as a war. In result eclipse is refusing to use this kind of dependency and I'm getting following message: "Illegal type of archive for required library: '<CUT>\.m2\repository\foo2\foo-web\0.0.1-SNAPSHOT\foo-web-0.0.1-SNAPSHOT.war' in project foo2"
> See included example projected.
> I'm not aware of any case when adding subproject jars to eclipse .classpath would be appropiate. Maybe you can turn off this 'feature' by default?

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Closed: (MNGECLIPSE-21) subprojects' jars inside the project are added to eclipse .classpath

Posted by "Eugene Kuleshov (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNGECLIPSE-21?page=all ]
     
Eugene Kuleshov closed MNGECLIPSE-21:
-------------------------------------

    Resolution: Duplicate

I just tested this and it is definetely duplicate of MNGECLIPSE-4. We will make dependency resolver to ignore all artifacts that are not jar or zip types. Then source folders and dependencies will be resolved without errors.

> subprojects' jars inside the project are added to eclipse .classpath
> --------------------------------------------------------------------
>
>          Key: MNGECLIPSE-21
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-21
>      Project: Maven 2.x Plug-in for Eclipse
>         Type: Improvement

>     Versions: 0.0.3
>  Environment: windows xp, eclipse 3.1, maven 2.0.1, plugin 0.0.3
>     Reporter: Michal Stochmialek
>     Assignee: Eugene Kuleshov
>      Fix For: 0.0.4
>  Attachments: mvn-multiproject-2.zip
>
>
> My project is a multiproject which produces an ear with ejb and war. It has several subprojects / modules. The project has normal hierachial maven structure. 
> Whole project (all subprojects) are contained in a single eclipse project. It's a quite convinient to work if it like that.
> I tried to use eclipse plugin with this project, but I following problem appeared. While building .classpath (Maven2 Dependencies container) plugin is also adding subproject jars. 
> In this case this behaviour is incorrect, since:
> 1) the same classes are also compiled by eclipse (from source folders). In result we have classes compiled by eclipse in output folder and classes compiled by maven in jars in maven repository.
> 2) one of subprojects is packaged as a war. In result eclipse is refusing to use this kind of dependency and I'm getting following message: "Illegal type of archive for required library: '<CUT>\.m2\repository\foo2\foo-web\0.0.1-SNAPSHOT\foo-web-0.0.1-SNAPSHOT.war' in project foo2"
> See included example projected.
> I'm not aware of any case when adding subproject jars to eclipse .classpath would be appropiate. Maybe you can turn off this 'feature' by default?

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNGECLIPSE-21) subprojects' jars inside the project are added to eclipse .classpath

Posted by "Michal Stochmialek (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNGECLIPSE-21?page=comments#action_56073 ] 

Michal Stochmialek commented on MNGECLIPSE-21:
----------------------------------------------

I don't mean class duplication in the runtime, but in development in eclipse. I think the best way to explain this is a screenshot. I'm will attach one in a minute.



> subprojects' jars inside the project are added to eclipse .classpath
> --------------------------------------------------------------------
>
>          Key: MNGECLIPSE-21
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-21
>      Project: Maven 2.x Plug-in for Eclipse
>         Type: Improvement

>     Versions: 0.0.3
>  Environment: windows xp, eclipse 3.1, maven 2.0.1, plugin 0.0.3
>     Reporter: Michal Stochmialek
>     Assignee: Eugene Kuleshov
>      Fix For: 0.0.4
>  Attachments: mvn-multiproject-2.zip
>
>
> My project is a multiproject which produces an ear with ejb and war. It has several subprojects / modules. The project has normal hierachial maven structure. 
> Whole project (all subprojects) are contained in a single eclipse project. It's a quite convinient to work if it like that.
> I tried to use eclipse plugin with this project, but I following problem appeared. While building .classpath (Maven2 Dependencies container) plugin is also adding subproject jars. 
> In this case this behaviour is incorrect, since:
> 1) the same classes are also compiled by eclipse (from source folders). In result we have classes compiled by eclipse in output folder and classes compiled by maven in jars in maven repository.
> 2) one of subprojects is packaged as a war. In result eclipse is refusing to use this kind of dependency and I'm getting following message: "Illegal type of archive for required library: '<CUT>\.m2\repository\foo2\foo-web\0.0.1-SNAPSHOT\foo-web-0.0.1-SNAPSHOT.war' in project foo2"
> See included example projected.
> I'm not aware of any case when adding subproject jars to eclipse .classpath would be appropiate. Maybe you can turn off this 'feature' by default?

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNGECLIPSE-21) subprojects' jars inside the project are added to eclipse .classpath

Posted by "Eugene Kuleshov (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNGECLIPSE-21?page=all ]

Eugene Kuleshov updated MNGECLIPSE-21:
--------------------------------------

        Version: 0.0.4
    Fix Version: 0.0.5

Actually this feature added intentionally in order to transparently support projects with reactor. Obvious example is the Maven2 project itself - https://svn.apache.org/repos/asf/maven/components/trunk 

We will investigate your issues for the next release.

> subprojects' jars inside the project are added to eclipse .classpath
> --------------------------------------------------------------------
>
>          Key: MNGECLIPSE-21
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-21
>      Project: Maven 2.x Plug-in for Eclipse
>         Type: Improvement

>     Versions: 0.0.4
>  Environment: windows xp, eclipse 3.1, maven 2.0.1, plugin 0.0.3
>     Reporter: Michal Stochmialek
>     Assignee: Eugene Kuleshov
>      Fix For: 0.0.5
>  Attachments: mvn-multiproject-2.zip
>
>
> My project is a multiproject which produces an ear with ejb and war. It has several subprojects / modules. The project has normal hierachial maven structure. 
> Whole project (all subprojects) are contained in a single eclipse project. It's a quite convinient to work if it like that.
> I tried to use eclipse plugin with this project, but I following problem appeared. While building .classpath (Maven2 Dependencies container) plugin is also adding subproject jars. 
> In this case this behaviour is incorrect, since:
> 1) the same classes are also compiled by eclipse (from source folders). In result we have classes compiled by eclipse in output folder and classes compiled by maven in jars in maven repository.
> 2) one of subprojects is packaged as a war. In result eclipse is refusing to use this kind of dependency and I'm getting following message: "Illegal type of archive for required library: '<CUT>\.m2\repository\foo2\foo-web\0.0.1-SNAPSHOT\foo-web-0.0.1-SNAPSHOT.war' in project foo2"
> See included example projected.
> I'm not aware of any case when adding subproject jars to eclipse .classpath would be appropiate. Maybe you can turn off this 'feature' by default?

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNGECLIPSE-21) subprojects' jars inside the project are added to eclipse .classpath

Posted by "Michal Stochmialek (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNGECLIPSE-21?page=all ]

Michal Stochmialek updated MNGECLIPSE-21:
-----------------------------------------

    Attachment: mvn-multiproject-2.zip

> subprojects' jars inside the project are added to eclipse .classpath
> --------------------------------------------------------------------
>
>          Key: MNGECLIPSE-21
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-21
>      Project: Maven 2.x Plug-in for Eclipse
>         Type: Improvement

>  Environment: windows xp, eclipse 3.1, maven 2.0.1, plugin 0.0.3
>     Reporter: Michal Stochmialek
>  Attachments: mvn-multiproject-2.zip
>
>
> My project is a multiproject which produces an ear with ejb and war. It has several subprojects / modules. The project has normal hierachial maven structure. 
> Whole project (all subprojects) are contained in a single eclipse project. It's a quite convinient to work if it like that.
> I tried to use eclipse plugin with this project, but I following problem appeared. While building .classpath (Maven2 Dependencies container) plugin is also adding subproject jars. 
> In this case this behaviour is incorrect, since:
> 1) the same classes are also compiled by eclipse (from source folders). In result we have classes compiled by eclipse in output folder and classes compiled by maven in jars in maven repository.
> 2) one of subprojects is packaged as a war. In result eclipse is refusing to use this kind of dependency and I'm getting following message: "Illegal type of archive for required library: '<CUT>\.m2\repository\foo2\foo-web\0.0.1-SNAPSHOT\foo-web-0.0.1-SNAPSHOT.war' in project foo2"
> See included example projected.
> I'm not aware of any case when adding subproject jars to eclipse .classpath would be appropiate. Maybe you can turn off this 'feature' by default?

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNGECLIPSE-21) subprojects' jars inside the project are added to eclipse .classpath

Posted by "Eugene Kuleshov (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNGECLIPSE-21?page=comments#action_56001 ] 

Eugene Kuleshov commented on MNGECLIPSE-21:
-------------------------------------------

Michal, and why do you think there are duplicated classes? Unles those classes blong to completely independent jars and loaded by the different classloaders or applications in the runtime you going to have issues. Am I missing something?

> subprojects' jars inside the project are added to eclipse .classpath
> --------------------------------------------------------------------
>
>          Key: MNGECLIPSE-21
>          URL: http://jira.codehaus.org/browse/MNGECLIPSE-21
>      Project: Maven 2.x Plug-in for Eclipse
>         Type: Improvement

>     Versions: 0.0.3
>  Environment: windows xp, eclipse 3.1, maven 2.0.1, plugin 0.0.3
>     Reporter: Michal Stochmialek
>     Assignee: Eugene Kuleshov
>      Fix For: 0.0.4
>  Attachments: mvn-multiproject-2.zip
>
>
> My project is a multiproject which produces an ear with ejb and war. It has several subprojects / modules. The project has normal hierachial maven structure. 
> Whole project (all subprojects) are contained in a single eclipse project. It's a quite convinient to work if it like that.
> I tried to use eclipse plugin with this project, but I following problem appeared. While building .classpath (Maven2 Dependencies container) plugin is also adding subproject jars. 
> In this case this behaviour is incorrect, since:
> 1) the same classes are also compiled by eclipse (from source folders). In result we have classes compiled by eclipse in output folder and classes compiled by maven in jars in maven repository.
> 2) one of subprojects is packaged as a war. In result eclipse is refusing to use this kind of dependency and I'm getting following message: "Illegal type of archive for required library: '<CUT>\.m2\repository\foo2\foo-web\0.0.1-SNAPSHOT\foo-web-0.0.1-SNAPSHOT.war' in project foo2"
> See included example projected.
> I'm not aware of any case when adding subproject jars to eclipse .classpath would be appropiate. Maybe you can turn off this 'feature' by default?

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org