Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8
    • Labels:
      None
    • Environment:
      any
    • Number of attachments :
      2

      Description

      While generating .classpath file maven-eclipse-plugin includes all artifacts defined in project.xml regardless of it's type. As a side effect it may be observed that even JSP's *.tld files are included as Eclipse variables.It leads to project compile problems. Actually such project won't compile at all.

      To avoid such behavior I propose a silly patch attached, which takes care of eclipseDependency property of artifacts. If it is set to 'false' the artifact will not be listed in .classpath.

      1. classpath.jelly.patch
        0.8 kB
        thierry lach
      2. classpath.jelly.patch
        0.4 kB
        Piotr Maj

        Activity

        Hide
        Piotr Maj added a comment -

        Attached file applies to todays CVS HEAD, not for beta-10. Sorry for confusion.

        Show
        Piotr Maj added a comment - Attached file applies to todays CVS HEAD, not for beta-10. Sorry for confusion.
        Hide
        Mark Wilkinson added a comment -

        A less silly patch might see whether lib.dependency.type == 'jar'

        Show
        Mark Wilkinson added a comment - A less silly patch might see whether lib.dependency.type == 'jar'
        Hide
        dion gillard added a comment -

        I'd much rather we used the isClasspath dependency method on Dependency.

        So I'm -1 to the patch.

        Show
        dion gillard added a comment - I'd much rather we used the isClasspath dependency method on Dependency. So I'm -1 to the patch.
        Hide
        Piotr Maj added a comment -

        I know it is not so important in most cases but I wonder if one should be able to exclude some jars from eclipse project. For example: my maven project uses xdoclet for Hibernate XML files generation. It has some dependencies which I do not need in my Eclipse project. This simple example shows that there are situations (and in the future there may be more of them) when the explicite exlusion may be required. That's why I suggested eclipseDependency="false".

        As I said: it isn't really importat, one can live with some unused entries on project's classpath.

        Show
        Piotr Maj added a comment - I know it is not so important in most cases but I wonder if one should be able to exclude some jars from eclipse project. For example: my maven project uses xdoclet for Hibernate XML files generation. It has some dependencies which I do not need in my Eclipse project. This simple example shows that there are situations (and in the future there may be more of them) when the explicite exlusion may be required. That's why I suggested eclipseDependency="false". As I said: it isn't really importat, one can live with some unused entries on project's classpath.
        Hide
        thierry lach added a comment -

        <eclipse.dependency>false</eclipse.dependency> could be useful to explicitly bypass specific jar files

        My specific situation is that I am building a war file to run against an app server which is running on jdk 1.3, while eclipse is running against jdk 1.4. Oracle requires two different jdbc driver jar files for jdk 1.3 and jdk 1.4. I would want to tag the oracle-jdk13 jar file as war.bundle/true and eclipse.classpath/false, while not marking the oracle-jdk14 jar so it becomes part of the classpath.

        I could use the same logic to address the jdk13/jdk14 xerces issues.

        Show
        thierry lach added a comment - <eclipse.dependency>false</eclipse.dependency> could be useful to explicitly bypass specific jar files My specific situation is that I am building a war file to run against an app server which is running on jdk 1.3, while eclipse is running against jdk 1.4. Oracle requires two different jdbc driver jar files for jdk 1.3 and jdk 1.4. I would want to tag the oracle-jdk13 jar file as war.bundle/true and eclipse.classpath/false, while not marking the oracle-jdk14 jar so it becomes part of the classpath. I could use the same logic to address the jdk13/jdk14 xerces issues.
        Hide
        thierry lach added a comment -

        Alternate patch.

        Show
        thierry lach added a comment - Alternate patch.
        Hide
        David Eric Pugh added a comment -

        Applied the <eclipse.dependency>false</eclipse.dependency> fix.

        Show
        David Eric Pugh added a comment - Applied the <eclipse.dependency>false</eclipse.dependency> fix.

          People

          • Assignee:
            David Eric Pugh
            Reporter:
            Piotr Maj
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: