You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Vlad Skarzhevskyy (JIRA)" <ji...@codehaus.org> on 2007/02/14 06:14:21 UTC

[jira] Created: (MECLIPSE-230) Classpath entries to be marked exported

Classpath entries to be marked exported
---------------------------------------

                 Key: MECLIPSE-230
                 URL: http://jira.codehaus.org/browse/MECLIPSE-230
             Project: Maven 2.x Eclipse Plugin
          Issue Type: Improvement
          Components: dependency resolution
    Affects Versions: 2.1
            Reporter: Vlad Skarzhevskyy
         Assigned To: fabrizio giustina
             Fix For: 2.3


Generated .classpath entries of kind "var" need to be marked exported by default so that referenced projects have visibility to them.  Or provide an option to specifiy that that entries should be exported.

Example: <classpathentry kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>

should me made...

<classpathentry exported="true" kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>

-- 
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-230) Classpath entries to be marked exported

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

Carlos Sanchez updated MECLIPSE-230:
------------------------------------

    Fix Version/s:     (was: 2.3)
                   2.4

> Classpath entries to be marked exported
> ---------------------------------------
>
>                 Key: MECLIPSE-230
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-230
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Improvement
>          Components: dependency resolution
>    Affects Versions: 2.1
>            Reporter: Vlad Skarzhevskyy
>         Assigned To: fabrizio giustina
>             Fix For: 2.4
>
>
> Generated .classpath entries of kind "var" need to be marked exported by default so that referenced projects have visibility to them.  Or provide an option to specifiy that that entries should be exported.
> Example: <classpathentry kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>
> should me made...
> <classpathentry exported="true" kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>

-- 
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-230) Classpath entries to be marked exported

Posted by "Henrik Larne (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MECLIPSE-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=158531#action_158531 ] 

Henrik Larne commented on MECLIPSE-230:
---------------------------------------

I am using Eclipse with the Mobile Tools for Java plugin and have the same problem with my compile scoped dependencies not beeing marked exported in the .classpath file. 

The philosophy of Maven is that the project should be completely described by the pom. The pom has full support for scoping a projects dependencies and I therefore think that the default behavior should be to add the exported="true" tag to the .classpath file for all dependencies with compile or runtime scope. If there are eclipse plugins that does not work well with this, they should probably be revised.

I have done a patch to the maven-eclipse-plugin version 2.5.1 and 2.6-SNAPSHOT that adds the exported tag to all the dependencies that have scope compile or runtime and are not referenced projects. Please consider adding this to the trunk of the plugin and possibly also the version 2.5.2. Both patches are attached to this issue.

> Classpath entries to be marked exported
> ---------------------------------------
>
>                 Key: MECLIPSE-230
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-230
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Improvement
>          Components: Core : Dependencies resolution and build path (.classpath)
>    Affects Versions: 2.1
>            Reporter: Vlad Skarzhevskyy
>            Assignee: fabrizio giustina
>
> Generated .classpath entries of kind "var" need to be marked exported by default so that referenced projects have visibility to them.  Or provide an option to specifiy that that entries should be exported.
> Example: <classpathentry kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>
> should me made...
> <classpathentry exported="true" kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>

-- 
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-230) Classpath entries to be marked exported

Posted by "Max Bowsher (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MECLIPSE-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_103201 ] 

Max Bowsher commented on MECLIPSE-230:
--------------------------------------

I do not know about J2ME, but for J2SE development, exporting seems to be unnecessary, and potentially even harmful:

If you have a group of interdependent projects, configured with the maven-eclipse-plugin, Maven will already have resolved the complete set of required dependencies and added them to each project's classpath - no exports needed. The potential for harm is: Maven may have resolved different versions of various dependencies in each project. Exports will thus result in multiple versions of the same jar being present on the classpath. 

> Classpath entries to be marked exported
> ---------------------------------------
>
>                 Key: MECLIPSE-230
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-230
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Improvement
>          Components: dependency resolution
>    Affects Versions: 2.1
>            Reporter: Vlad Skarzhevskyy
>            Assignee: fabrizio giustina
>             Fix For: 2.5
>
>
> Generated .classpath entries of kind "var" need to be marked exported by default so that referenced projects have visibility to them.  Or provide an option to specifiy that that entries should be exported.
> Example: <classpathentry kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>
> should me made...
> <classpathentry exported="true" kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>

-- 
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-230) Classpath entries to be marked exported

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

Henrik Larne updated MECLIPSE-230:
----------------------------------

    Attachment: exported_classpath_2.5.1.patch
                exported_classpath_trunk.patch

Patch that adds the exported="true" to the .classpath files for compile and runtime scoped dependencies that are not referenced projects for both trunk and 2.5.1

> Classpath entries to be marked exported
> ---------------------------------------
>
>                 Key: MECLIPSE-230
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-230
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Improvement
>          Components: Core : Dependencies resolution and build path (.classpath)
>    Affects Versions: 2.1
>            Reporter: Vlad Skarzhevskyy
>            Assignee: fabrizio giustina
>         Attachments: exported_classpath_2.5.1.patch, exported_classpath_trunk.patch
>
>
> Generated .classpath entries of kind "var" need to be marked exported by default so that referenced projects have visibility to them.  Or provide an option to specifiy that that entries should be exported.
> Example: <classpathentry kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>
> should me made...
> <classpathentry exported="true" kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>

-- 
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-230) Classpath entries to be marked exported

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

Brian Fox updated MECLIPSE-230:
-------------------------------

    Fix Version/s:     (was: 2.4)
                   2.5

> Classpath entries to be marked exported
> ---------------------------------------
>
>                 Key: MECLIPSE-230
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-230
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Improvement
>          Components: dependency resolution
>    Affects Versions: 2.1
>            Reporter: Vlad Skarzhevskyy
>            Assignee: fabrizio giustina
>             Fix For: 2.5
>
>
> Generated .classpath entries of kind "var" need to be marked exported by default so that referenced projects have visibility to them.  Or provide an option to specifiy that that entries should be exported.
> Example: <classpathentry kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>
> should me made...
> <classpathentry exported="true" kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>

-- 
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-230) Classpath entries to be marked exported

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

Arnaud Heritier updated MECLIPSE-230:
-------------------------------------

    Fix Version/s:     (was: 2.5)

> Classpath entries to be marked exported
> ---------------------------------------
>
>                 Key: MECLIPSE-230
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-230
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Improvement
>          Components: dependency resolution
>    Affects Versions: 2.1
>            Reporter: Vlad Skarzhevskyy
>            Assignee: fabrizio giustina
>
> Generated .classpath entries of kind "var" need to be marked exported by default so that referenced projects have visibility to them.  Or provide an option to specifiy that that entries should be exported.
> Example: <classpathentry kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>
> should me made...
> <classpathentry exported="true" kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>

-- 
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-230) Classpath entries to be marked exported

Posted by "Dzmitry Harachka (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MECLIPSE-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=234412#action_234412 ] 

Dzmitry Harachka commented on MECLIPSE-230:
-------------------------------------------

Hi, guys!

Seems to be the problem with exported="true" is till here.

I use maven eclipse plugin v.2.8.

I have the following environment and situation:
project A uses library X
project B uses project A and library X

as results I have the following classpath files:
project A:
	<classpathentry kind="var" path="M2_REPO/castor/castor.xml/1.1.2.1/castor.xml-1.1.2.1.jar"/>

project B:
  <classpathentry kind="src" path="/project A"/>

And I have compilation errors in eclipse for project B. 

When I changed classpath of project A manually
	<classpathentry exported="true" kind="var" path="M2_REPO/castor/castor.xml/1.1.2.1/castor.xml-1.1.2.1.jar"/>

all works nice.

Seems to be right approach is to have a setting inside pom dependency to say what are you going to export.

Please would you update me if this would be included into next releases or may be it is already included and I am not informed.

Anyway thanks for great plugin!

your Dzmitry 

> Classpath entries to be marked exported
> ---------------------------------------
>
>                 Key: MECLIPSE-230
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-230
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Improvement
>          Components: Core : Dependencies resolution and build path (.classpath)
>    Affects Versions: 2.1
>            Reporter: Vlad Skarzhevskyy
>            Assignee: fabrizio giustina
>         Attachments: exported_classpath_2.5.1.patch, exported_classpath_trunk.patch
>
>
> Generated .classpath entries of kind "var" need to be marked exported by default so that referenced projects have visibility to them.  Or provide an option to specifiy that that entries should be exported.
> Example: <classpathentry kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>
> should me made...
> <classpathentry exported="true" kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>

-- 
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-230) Classpath entries to be marked exported

Posted by "Silvano Maffeis (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MECLIPSE-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_124495 ] 

Silvano Maffeis commented on MECLIPSE-230:
------------------------------------------

Being able to control the "exported" attribute is important for deploying Java EE apps from Eclipse.
There are libraries which I need for the build, but which I don't want to be included in the EAR.
The "exported" attribute allows one to control that. (Now I have to manually tag
my exported libraries again after running the eclipse plugin).

> Classpath entries to be marked exported
> ---------------------------------------
>
>                 Key: MECLIPSE-230
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-230
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Improvement
>          Components: Core : Dependencies resolution and build path
>    Affects Versions: 2.1
>            Reporter: Vlad Skarzhevskyy
>            Assignee: fabrizio giustina
>
> Generated .classpath entries of kind "var" need to be marked exported by default so that referenced projects have visibility to them.  Or provide an option to specifiy that that entries should be exported.
> Example: <classpathentry kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>
> should me made...
> <classpathentry exported="true" kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>

-- 
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-230) Classpath entries to be marked exported

Posted by "Vlad Skarzhevskyy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MECLIPSE-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_87521 ] 

Vlad Skarzhevskyy commented on MECLIPSE-230:
--------------------------------------------

Tried to clone old problem did not work well sorry.   Original  MECLIPSE-95 Transitive classpath entries need to be marked exported

This is actual Request for feature.
To have in plugin configuration with new list:
<exported>
   <exported>artifact1</exported>
   <exported>artifact2</exported>
</exported>


The reason for this is creation EclipseME nature
Only the exported  artifacts would be added to  MIDlet Suite
http://eclipseme.org/docs/faq.html#addJar
or http://eclipseme.org/docs/advJarFiles.html



This is what I do now to create EclipseME:
            <!-- Add EclipseME nature to the generated project-->
            <!--
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-eclipse-plugin</artifactId>
                <configuration>
                    <buildcommands>
                        <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
                        <buildcommand>eclipseme.core.preverifier</buildcommand>
                    </buildcommands>
                    <projectnatures>
                        <projectnature>org.eclipse.jdt.core.javanature</projectnature>
                        <projectnature>eclipseme.core.nature</projectnature>
                    </projectnatures>
                    <classpathContainers>
                        <classpathContainer>J2MELIB</classpathContainer>
                        <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
                    </classpathContainers>
                </configuration>
            </plugin>
            -->

> Classpath entries to be marked exported
> ---------------------------------------
>
>                 Key: MECLIPSE-230
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-230
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Improvement
>          Components: dependency resolution
>    Affects Versions: 2.1
>            Reporter: Vlad Skarzhevskyy
>         Assigned To: fabrizio giustina
>             Fix For: 2.3
>
>
> Generated .classpath entries of kind "var" need to be marked exported by default so that referenced projects have visibility to them.  Or provide an option to specifiy that that entries should be exported.
> Example: <classpathentry kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>
> should me made...
> <classpathentry exported="true" kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>

-- 
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-230) Classpath entries to be marked exported

Posted by "Jacob Northey (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MECLIPSE-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=148652#action_148652 ] 

Jacob Northey commented on MECLIPSE-230:
----------------------------------------

This is important for PDE projects.  Is it possible to add a check if the pde is true to set exported?

The workaround right now is:

1. Run mvn eclipse:eclipse
2. Refresh eclipse project
3. Right-click Project select PDE Tools > Update Classpath
4. Re-add test dependencies to classpath

> Classpath entries to be marked exported
> ---------------------------------------
>
>                 Key: MECLIPSE-230
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-230
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Improvement
>          Components: Core : Dependencies resolution and build path
>    Affects Versions: 2.1
>            Reporter: Vlad Skarzhevskyy
>            Assignee: fabrizio giustina
>
> Generated .classpath entries of kind "var" need to be marked exported by default so that referenced projects have visibility to them.  Or provide an option to specifiy that that entries should be exported.
> Example: <classpathentry kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>
> should me made...
> <classpathentry exported="true" kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>

-- 
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-230) Classpath entries to be marked exported

Posted by "Dzmitry Harachka (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MECLIPSE-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=234413#action_234413 ] 

Dzmitry Harachka commented on MECLIPSE-230:
-------------------------------------------

I have some new update...

I just checked mvn eclipse:eclipse again and what I see is now it correctly generates dependencies for project B in the following way:

  <classpathentry kind="var" path="M2_REPO/castor/castor.anttasks/1.1.2.1/castor.anttasks-1.1.2.1.jar"/>
  <classpathentry kind="var" path="M2_REPO/castor/castor.codegen/1.1.2.1/castor.codegen-1.1.2.1.jar"/>
  <classpathentry kind="var" path="M2_REPO/castor/castor.xml/1.1.2.1/castor.xml-1.1.2.1.jar"/>

Now I can not understand why incorrect situation happened before. If I have new update - I would provide it.

Thanks.

> Classpath entries to be marked exported
> ---------------------------------------
>
>                 Key: MECLIPSE-230
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-230
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Improvement
>          Components: Core : Dependencies resolution and build path (.classpath)
>    Affects Versions: 2.1
>            Reporter: Vlad Skarzhevskyy
>            Assignee: fabrizio giustina
>         Attachments: exported_classpath_2.5.1.patch, exported_classpath_trunk.patch
>
>
> Generated .classpath entries of kind "var" need to be marked exported by default so that referenced projects have visibility to them.  Or provide an option to specifiy that that entries should be exported.
> Example: <classpathentry kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>
> should me made...
> <classpathentry exported="true" kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>

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