[jira] Created: (MNGECLIPSE-400) When project artifact contains extra classes not defined in the source, it is not added to the dependent project's classpath

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (MNGECLIPSE-400) When project artifact contains extra classes not defined in the source, it is not added to the dependent project's classpath

JIRA jira@codehaus.org
When project artifact contains extra classes not defined in the source, it is not added to the dependent project's classpath
----------------------------------------------------------------------------------------------------------------------------

                 Key: MNGECLIPSE-400
                 URL: http://jira.codehaus.org/browse/MNGECLIPSE-400
             Project: Maven Integration for Eclipse
          Issue Type: Bug
          Components: Dependency Resolver
         Environment: Windows XP, Eclipse
            Reporter: zalym


I have a core models project and then lots of implementation specific models.  The impl projects depends on the core models, with optional specified as true.  The implementation project contains the classes of the core as well.  The core is referred to only by the implementation, and all other projects depends on the impl project.

When I depend on the implementation project, m2eclipse doesn't recognize the additional classes from the model.  It recognises only those classes specified in the implementation.  So it shows compile errors in eclipse, but works from the command line.  

I think the reason is that the plugin resolves to the eclipse project and not the generated artifact.  Ideally it should mirror maven functionality which is the final artifact rather than the sources.

--
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 from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MNGECLIPSE-400) When project artifact contains extra classes not defined in the source, it is not added to the dependent project's classpath

JIRA jira@codehaus.org

    [ http://jira.codehaus.org/browse/MNGECLIPSE-400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_108078 ]

Eugene Kuleshov commented on MNGECLIPSE-400:
--------------------------------------------

Please attach example project that would allow to reproduce this issue. Also specify what plugin version and Eclipse version you are running. See the following page for some hints that could help us to reproduce and resolve your issue. Thanks. http://docs.codehaus.org/display/M2ECLIPSE/How+To+Report+Issues

> When project artifact contains extra classes not defined in the source, it is not added to the dependent project's classpath
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MNGECLIPSE-400
>                 URL: http://jira.codehaus.org/browse/MNGECLIPSE-400
>             Project: Maven Integration for Eclipse
>          Issue Type: Bug
>          Components: Dependency Resolver
>         Environment: Windows XP, Eclipse
>            Reporter: zalym
>
> I have a core models project and then lots of implementation specific models.  The impl projects depends on the core models, with optional specified as true.  The implementation project contains the classes of the core as well.  The core is referred to only by the implementation, and all other projects depends on the impl project.
> When I depend on the implementation project, m2eclipse doesn't recognize the additional classes from the model.  It recognises only those classes specified in the implementation.  So it shows compile errors in eclipse, but works from the command line.  
> I think the reason is that the plugin resolves to the eclipse project and not the generated artifact.  Ideally it should mirror maven functionality which is the final artifact rather than the sources.

--
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 from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (MNGECLIPSE-400) When project artifact contains extra classes not defined in the source, it is not added to the dependent project's classpath

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

     [ http://jira.codehaus.org/browse/MNGECLIPSE-400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

zalym updated MNGECLIPSE-400:
-----------------------------

    Attachment: MNGECLIPSE-400-projects.zip

Sorry for the delay.  Was caught up wiht work.  

I have attached 3 projects.  

1.  One is the core project
2.  then the impl project which unpacks everything from the core, and adds it to the impl,
3.  and then the third project which depends on the impl project.  Here I am unable to access the CoreClass in the core project from eclipse, but I am able to run it from the command prompt.

In case you are wondering why I do the above, its because I use jibx on the classes, and hence we consolidate all the classes into one folder and then run jibx binding task on it.  this way all classes have the same JibxBindingFactory and jibx is happy.



> When project artifact contains extra classes not defined in the source, it is not added to the dependent project's classpath
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MNGECLIPSE-400
>                 URL: http://jira.codehaus.org/browse/MNGECLIPSE-400
>             Project: Maven Integration for Eclipse
>          Issue Type: Bug
>          Components: Dependency Resolver
>         Environment: Windows XP, Eclipse
>            Reporter: zalym
>         Attachments: MNGECLIPSE-400-projects.zip
>
>
> I have a core models project and then lots of implementation specific models.  The impl projects depends on the core models, with optional specified as true.  The implementation project contains the classes of the core as well.  The core is referred to only by the implementation, and all other projects depends on the impl project.
> When I depend on the implementation project, m2eclipse doesn't recognize the additional classes from the model.  It recognises only those classes specified in the implementation.  So it shows compile errors in eclipse, but works from the command line.  
> I think the reason is that the plugin resolves to the eclipse project and not the generated artifact.  Ideally it should mirror maven functionality which is the final artifact rather than the sources.

--
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 from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MNGECLIPSE-400) When project artifact contains extra classes not defined in the source, it is not added to the dependent project's classpath

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

    [ http://jira.codehaus.org/browse/MNGECLIPSE-400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_108595 ]

zalym commented on MNGECLIPSE-400:
----------------------------------

while i was working on the projects, I saw another issue.  very minor though.  When I tried to import the maven projects, the 'Select All' option did not work in the import wizard.  Let me know if you had the same problem.  Tried it twice, and it did not work.

I also noticed another thing.  After I imported the projects, the src/main/java folder was not added as a src directory in eclipse.  Is this normal?

> When project artifact contains extra classes not defined in the source, it is not added to the dependent project's classpath
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MNGECLIPSE-400
>                 URL: http://jira.codehaus.org/browse/MNGECLIPSE-400
>             Project: Maven Integration for Eclipse
>          Issue Type: Bug
>          Components: Dependency Resolver
>         Environment: Windows XP, Eclipse
>            Reporter: zalym
>         Attachments: MNGECLIPSE-400-projects.zip
>
>
> I have a core models project and then lots of implementation specific models.  The impl projects depends on the core models, with optional specified as true.  The implementation project contains the classes of the core as well.  The core is referred to only by the implementation, and all other projects depends on the impl project.
> When I depend on the implementation project, m2eclipse doesn't recognize the additional classes from the model.  It recognises only those classes specified in the implementation.  So it shows compile errors in eclipse, but works from the command line.  
> I think the reason is that the plugin resolves to the eclipse project and not the generated artifact.  Ideally it should mirror maven functionality which is the final artifact rather than the sources.

--
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 from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MNGECLIPSE-400) When project artifact contains extra classes not defined in the source, it is not added to the dependent project's classpath

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

    [ http://jira.codehaus.org/browse/MNGECLIPSE-400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_108944 ]

zalym commented on MNGECLIPSE-400:
----------------------------------

Is this issue accepted?  What's the status on it?

> When project artifact contains extra classes not defined in the source, it is not added to the dependent project's classpath
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MNGECLIPSE-400
>                 URL: http://jira.codehaus.org/browse/MNGECLIPSE-400
>             Project: Maven Integration for Eclipse
>          Issue Type: Bug
>          Components: Dependency Resolver
>         Environment: Windows XP, Eclipse
>            Reporter: zalym
>         Attachments: MNGECLIPSE-400-projects.zip
>
>
> I have a core models project and then lots of implementation specific models.  The impl projects depends on the core models, with optional specified as true.  The implementation project contains the classes of the core as well.  The core is referred to only by the implementation, and all other projects depends on the impl project.
> When I depend on the implementation project, m2eclipse doesn't recognize the additional classes from the model.  It recognises only those classes specified in the implementation.  So it shows compile errors in eclipse, but works from the command line.  
> I think the reason is that the plugin resolves to the eclipse project and not the generated artifact.  Ideally it should mirror maven functionality which is the final artifact rather than the sources.

--
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 from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MNGECLIPSE-400) When project artifact contains extra classes not defined in the source, it is not added to the dependent project's classpath

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

    [ http://jira.codehaus.org/browse/MNGECLIPSE-400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_108945 ]

Eugene Kuleshov commented on MNGECLIPSE-400:
--------------------------------------------

All issues are accepted (unless closed as incomplete). So, it is in the queue.
By the way, thanks for the test project.

> When project artifact contains extra classes not defined in the source, it is not added to the dependent project's classpath
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MNGECLIPSE-400
>                 URL: http://jira.codehaus.org/browse/MNGECLIPSE-400
>             Project: Maven Integration for Eclipse
>          Issue Type: Bug
>          Components: Dependency Resolver
>         Environment: Windows XP, Eclipse
>            Reporter: zalym
>         Attachments: MNGECLIPSE-400-projects.zip
>
>
> I have a core models project and then lots of implementation specific models.  The impl projects depends on the core models, with optional specified as true.  The implementation project contains the classes of the core as well.  The core is referred to only by the implementation, and all other projects depends on the impl project.
> When I depend on the implementation project, m2eclipse doesn't recognize the additional classes from the model.  It recognises only those classes specified in the implementation.  So it shows compile errors in eclipse, but works from the command line.  
> I think the reason is that the plugin resolves to the eclipse project and not the generated artifact.  Ideally it should mirror maven functionality which is the final artifact rather than the sources.

--
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 from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (MNGECLIPSE-400) When project artifact contains extra classes not defined in the source, it is not added to the dependent project's classpath

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

     [ http://jira.codehaus.org/browse/MNGECLIPSE-400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eugene Kuleshov updated MNGECLIPSE-400:
---------------------------------------

           Description:
I have a core models project and then lots of implementation specific models.  The impl projects depends on the core models, with optional specified as true.  The implementation project contains the classes of the core as well.  The core is referred to only by the implementation, and all other projects depends on the impl project.
When I depend on the implementation project, m2eclipse doesn't recognize the additional classes from the model.  It recognises only those classes specified in the implementation.  So it shows compile errors in eclipse, but works from the command line.  
I think the reason is that the plugin resolves to the eclipse project and not the generated artifact.  Ideally it should mirror maven functionality which is the final artifact rather than the sources.

  was:
I have a core models project and then lots of implementation specific models.  The impl projects depends on the core models, with optional specified as true.  The implementation project contains the classes of the core as well.  The core is referred to only by the implementation, and all other projects depends on the impl project.

When I depend on the implementation project, m2eclipse doesn't recognize the additional classes from the model.  It recognises only those classes specified in the implementation.  So it shows compile errors in eclipse, but works from the command line.  

I think the reason is that the plugin resolves to the eclipse project and not the generated artifact.  Ideally it should mirror maven functionality which is the final artifact rather than the sources.

    Remaining Estimate: 0 minutes
     Original Estimate: 0 minutes

I took a pick at this and it seems like it is rather twisted scenario. Basically you copy some classes from project A into the project B, then jar everything together and use it as a dependency in project C. Because this class copying is happening outside of Eclipse it don't see these classes and our workspace dependency resolution breaks. I see at least 3 possible workarounds.

1. Turn of workspace dependency resolution for project C. It can be done from "Maven Dependencies" classpath container configuration. See http://docs.codehaus.org/display/M2ECLIPSE/Dependency+Management
  The disadvantage is that you will have to deploy new jars and source bundles to the local maven repository when project A or B are changed. You can configure maven builder in project configuration to do that automatically for you
 
2. Manually tweak project B, to include class folder for those copied classes (for this purpose it is better to keep them separate from the project B own classes). You can do that from Project / Properties / Build Path / Libraries tab / Add Class Folder and then also on Order and Export tab mark that folder as exported.
  The disadvantage is that this configuration need to be done manually, but if you don't change project dependencies it is probably most convenient way.
  Potentially we could detect presence of the maven-dependency-plugin, interpret its settings and update project classpath configuration accordingly. Maybe there is something could be done in the plugin itself to make it easier for the external tool. Either way I consider this option very low priority, but if someone want to work on this, we will be glad to accept such contribution.

3. Finally you can rearrange your projects and I think it would be most beneficial option for you.
  The idea is to use regular transitive project dependencies A <- B <- C without weird class copying. Then for release you could use Maven assembly plugin to repackage classes into jars any way you want. The most beneficial part is that you can change any classes in dependent projects without copying things around which make things much easier to deal with.

> When project artifact contains extra classes not defined in the source, it is not added to the dependent project's classpath
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MNGECLIPSE-400
>                 URL: http://jira.codehaus.org/browse/MNGECLIPSE-400
>             Project: Maven Integration for Eclipse
>          Issue Type: Bug
>          Components: Dependency Resolver
>         Environment: Windows XP, Eclipse
>            Reporter: zalym
>         Attachments: MNGECLIPSE-400-projects.zip
>
>   Original Estimate: 0 minutes
>  Remaining Estimate: 0 minutes
>
> I have a core models project and then lots of implementation specific models.  The impl projects depends on the core models, with optional specified as true.  The implementation project contains the classes of the core as well.  The core is referred to only by the implementation, and all other projects depends on the impl project.
> When I depend on the implementation project, m2eclipse doesn't recognize the additional classes from the model.  It recognises only those classes specified in the implementation.  So it shows compile errors in eclipse, but works from the command line.  
> I think the reason is that the plugin resolves to the eclipse project and not the generated artifact.  Ideally it should mirror maven functionality which is the final artifact rather than the sources.

--
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 from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (MNGECLIPSE-400) When project artifact contains extra classes not defined in the source, it is not added to the dependent project's classpath

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

     [ http://jira.codehaus.org/browse/MNGECLIPSE-400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eugene Kuleshov closed MNGECLIPSE-400.
--------------------------------------

         Assignee: Eugene Kuleshov
       Resolution: Fixed
    Fix Version/s: 0.9.1

We now support resource filtering, that also allows to specify custom goals to be executed automatically on resource changes.

However as I mentioned in my last comment, this is pretty much against Maven philosophy and it is better to reorganize codebase to use Maven dependency management.

> When project artifact contains extra classes not defined in the source, it is not added to the dependent project's classpath
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MNGECLIPSE-400
>                 URL: http://jira.codehaus.org/browse/MNGECLIPSE-400
>             Project: Maven Integration for Eclipse
>          Issue Type: Bug
>          Components: Dependency Resolver
>         Environment: Windows XP, Eclipse
>            Reporter: zalym
>            Assignee: Eugene Kuleshov
>             Fix For: 0.9.1
>
>         Attachments: MNGECLIPSE-400-projects.zip
>
>   Original Estimate: 0 minutes
>  Remaining Estimate: 0 minutes
>
> I have a core models project and then lots of implementation specific models.  The impl projects depends on the core models, with optional specified as true.  The implementation project contains the classes of the core as well.  The core is referred to only by the implementation, and all other projects depends on the impl project.
> When I depend on the implementation project, m2eclipse doesn't recognize the additional classes from the model.  It recognises only those classes specified in the implementation.  So it shows compile errors in eclipse, but works from the command line.  
> I think the reason is that the plugin resolves to the eclipse project and not the generated artifact.  Ideally it should mirror maven functionality which is the final artifact rather than the sources.

--
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 from this list, please visit:

    http://xircles.codehaus.org/manage_email