You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Werner Schulz (JIRA)" <ji...@codehaus.org> on 2005/09/15 16:40:02 UTC

[jira] Created: (MPECLIPSE-103) Allow to skip dependencies from being included in .classpath file

Allow to skip dependencies from being included in .classpath file
-----------------------------------------------------------------

         Key: MPECLIPSE-103
         URL: http://jira.codehaus.org/browse/MPECLIPSE-103
     Project: maven-eclipse-plugin
        Type: New Feature
    Versions: 1.9    
 Reporter: Werner Schulz


Need a means to specify that some maven dependencies are NOT included in the generated .classpath file.

Reason: Maven builds a project. This may include generating source via castor, InjectJ, etc.
Once the source code is generated, the generated source may not depend on the various jars that helped generate it.
That means, the Eclipse project should not depend on these jars. Currently, it is not possible to exclude these jars.

Can you add an additional property, like <eclipse.classpath.include>no</eclipse.classpath.include>, which will
not add the dependency to the generated classpath file.

-- 
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: (MPECLIPSE-103) Allow to skip dependencies from being included in .classpath file

Posted by "Werner Schulz (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPECLIPSE-103?page=comments#action_46518 ] 

Werner Schulz commented on MPECLIPSE-103:
-----------------------------------------

Yes, the dependencies listed in the project are all included in the Eclipse classpath file.

>From the Maven Eclipse Plugin documentation (see http://maven.apache.org/reference/plugins/eclipse/goals.html):

Goal: eclipse:generate-classpath

Description: Generates a .classpath file for the eclipse project with classpath entries for
   1. the build source directory
   2. the build unit test source directory
   3. the JRE being used
   4. the appropriate version of JUnit
   5. each Maven project dependency
   6. an output directory for compiled code: target\classes
   7. any .zip source archives

The problem is item 5.

In my project, we generate some enumerations using Castor (using xerces-2.4). The generated
code is completely independent of XML or Castor.
The generated enumerations are needed in code that also accesses some proprietary stuff
which relies on an older version of xerces. Suddenly, Eclipse gets confused because the required
presence of castor and xerces dependencies in the project file (castor plugin doesn't seem to find
the necessary jars on its own!?) conflict with dependencies from other code bits.

This is an example where build and development dependency requirements are different but this
is not recognised by the eclipse plugin.

> Allow to skip dependencies from being included in .classpath file
> -----------------------------------------------------------------
>
>          Key: MPECLIPSE-103
>          URL: http://jira.codehaus.org/browse/MPECLIPSE-103
>      Project: maven-eclipse-plugin
>         Type: New Feature
>     Versions: 1.9
>     Reporter: Werner Schulz

>
>
> Need a means to specify that some maven dependencies are NOT included in the generated .classpath file.
> Reason: Maven builds a project. This may include generating source via castor, InjectJ, etc.
> Once the source code is generated, the generated source may not depend on the various jars that helped generate it.
> That means, the Eclipse project should not depend on these jars. Currently, it is not possible to exclude these jars.
> Can you add an additional property, like <eclipse.classpath.include>no</eclipse.classpath.include>, which will
> not add the dependency to the generated classpath file.

-- 
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: (MPECLIPSE-103) Allow to skip dependencies from being included in .classpath file

Posted by "Trygve Laugstol (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPECLIPSE-103?page=comments#action_46515 ] 

Trygve Laugstol commented on MPECLIPSE-103:
-------------------------------------------

I don't see how this can happen as the dependencies used to generate the source code will be dependencies of the plugin, not the project. Are you sure that this is what actually is happening?

> Allow to skip dependencies from being included in .classpath file
> -----------------------------------------------------------------
>
>          Key: MPECLIPSE-103
>          URL: http://jira.codehaus.org/browse/MPECLIPSE-103
>      Project: maven-eclipse-plugin
>         Type: New Feature
>     Versions: 1.9
>     Reporter: Werner Schulz

>
>
> Need a means to specify that some maven dependencies are NOT included in the generated .classpath file.
> Reason: Maven builds a project. This may include generating source via castor, InjectJ, etc.
> Once the source code is generated, the generated source may not depend on the various jars that helped generate it.
> That means, the Eclipse project should not depend on these jars. Currently, it is not possible to exclude these jars.
> Can you add an additional property, like <eclipse.classpath.include>no</eclipse.classpath.include>, which will
> not add the dependency to the generated classpath file.

-- 
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: (MPECLIPSE-103) Allow to skip dependencies from being included in .classpath file

Posted by "fabrizio giustina (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPECLIPSE-103?page=all ]
     
fabrizio giustina closed MPECLIPSE-103:
---------------------------------------

      Assign To: fabrizio giustina
     Resolution: Won't Fix
    Fix Version: 1.9

> In my project, we generate some enumerations using Castor (using xerces-2.4). The generated
> code is completely independent of XML or Castor.

If I understood correclty, you added the castor dependency in order to generate source code: the castor dependency, however, should not be a project dependency but a plugin dependency. For example this should work if you are using the maven castor plugin at http://maven.apache.org/maven-1.x/reference/plugins/castor/index.html (do you?).

If you are using a custom ant task you will need castor and xerces in the classpath, but this is not the recommended way.
First of all, castor will be in the classpath used by maven when executing tests, and this is the same situation you are seeing in eclipse (so, it SHOULD fail in eclipse if it fails with maven).

As a solution you should:
- use a plugin to generate sources and, if such plugin doesn't exist, extract your code from maven.xml and put it in a plugin (recommended) 
- manually modify the classpath before calling the ant task used to generate sources, removing the castor jar from project.xml





> Allow to skip dependencies from being included in .classpath file
> -----------------------------------------------------------------
>
>          Key: MPECLIPSE-103
>          URL: http://jira.codehaus.org/browse/MPECLIPSE-103
>      Project: maven-eclipse-plugin
>         Type: New Feature
>     Versions: 1.9
>     Reporter: Werner Schulz
>     Assignee: fabrizio giustina
>      Fix For: 1.9

>
>
> Need a means to specify that some maven dependencies are NOT included in the generated .classpath file.
> Reason: Maven builds a project. This may include generating source via castor, InjectJ, etc.
> Once the source code is generated, the generated source may not depend on the various jars that helped generate it.
> That means, the Eclipse project should not depend on these jars. Currently, it is not possible to exclude these jars.
> Can you add an additional property, like <eclipse.classpath.include>no</eclipse.classpath.include>, which will
> not add the dependency to the generated classpath file.

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