jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Maven 1.x Eclipse Plugin
  • Maven 1.x Eclipse Plugin
  • MPECLIPSE-119

plugin:test broken in 1.11

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.11
  • Fix Version/s: 1.12
  • Labels:
    None
  • Environment:
    m11b3
  • Number of attachments :
    0

Description

The test test-classpath-has-overridden-jar in src/plugin-test/maintest/maven.xml fails. For some reason, the string MAVEN_REPO/maven/jars/maven.jar is replaced by $MAVEN_HOME/lib/maven.jar. If this is intentional, the test should be rewritten.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Arnaud Heritier added a comment - 05/Jul/06 4:33 PM

This is because the maven.jar dependency is now overriden in all plugins (in plugins-parent) which was not the case before (only defined in some plugins)

Show
Arnaud Heritier added a comment - 05/Jul/06 4:33 PM This is because the maven.jar dependency is now overriden in all plugins (in plugins-parent) which was not the case before (only defined in some plugins)
Hide
Permalink
Stéphane Nicoll added a comment - 20/Aug/06 5:37 AM

Ouh ouh ; Classpath.jelly requests the cactus dependency of the maven plugin so it's really nasty to test on that (if you have another cactus plugin, it might break).

Show
Stéphane Nicoll added a comment - 20/Aug/06 5:37 AM Ouh ouh ; Classpath.jelly requests the cactus dependency of the maven plugin so it's really nasty to test on that (if you have another cactus plugin, it might break).
Hide
Permalink
Stéphane Nicoll added a comment - 20/Aug/06 5:55 AM

Lukas, can you help?

I've "fixed" the cactus dependency problem but we need to investigate. The current cactus dependency is 13-1.6.1 but the cactus plugin expected 13-1.7. I tried to retrieve the version from the plugin to automate this but it does not work so I changed it this way

<echo>Warning, expecting cactus version 13.1-7 from current cactus plugin</echo>
<x:set var="countCactus" select="count($classpathDoc/classpath/classpathentry[contains(@path,'MAVEN_REPO/cactus/jars/cactus-13-1.7.jar')])"/>

Further on, the plugin breaks and I think we have a bug

  <classpathentry excluding="" including="" kind="src" path="src/test">
  </classpathentry>
  <classpathentry output="target/test-classes" kind="src" path="src/test">
  </classpathentry>

To me, this entry is duplicated right?

Show
Stéphane Nicoll added a comment - 20/Aug/06 5:55 AM Lukas, can you help? I've "fixed" the cactus dependency problem but we need to investigate. The current cactus dependency is 13-1.6.1 but the cactus plugin expected 13-1.7. I tried to retrieve the version from the plugin to automate this but it does not work so I changed it this way <echo> Warning, expecting cactus version 13.1-7 from current cactus plugin </echo> <x:set var= "countCactus" select= "count($classpathDoc/classpath/classpathentry[contains(@path,'MAVEN_REPO/cactus/jars/cactus-13-1.7.jar')])" /> Further on, the plugin breaks and I think we have a bug <classpathentry excluding= "" including=" " kind=" src " path=" src/test"> </classpathentry> <classpathentry output= "target/test-classes" kind= "src" path= "src/test" > </classpathentry> To me, this entry is duplicated right?
Hide
Permalink
Stéphane Nicoll added a comment - 20/Aug/06 7:48 AM

The error is here

<!-- don't add duplicate directories -->
          <j:if
            test="${resourceDirectoryFile.exists() and !resourceDirectory.equals(srcDir) and (!resourceDirectory.equals(testSrcDir) or !unitTestSourcesPresent)}">
            <classpathentry kind="src" path="${resourceDirectory}" including="${includingAsString}"
              excluding="${excludingAsString}" />
          </j:if>
Show
Stéphane Nicoll added a comment - 20/Aug/06 7:48 AM The error is here <!-- don't add duplicate directories --> <j:if test= "${resourceDirectoryFile.exists() and !resourceDirectory.equals(srcDir) and (!resourceDirectory.equals(testSrcDir) or !unitTestSourcesPresent)}" > <classpathentry kind= "src" path= "${resourceDirectory}" including= "${includingAsString}" excluding= "${excludingAsString}" /> </j:if>
Hide
Permalink
Stéphane Nicoll added a comment - 20/Aug/06 8:02 AM

mmm weird. I think the jelly test is not working as expected:

    [echo] resourceDirectoryFile.exists(): true
    [echo] resourceDirectory.equals(srcdir): false
    [echo] resourceDirectory.equals(testSrcDir): false
    [echo] unitTestSourcesPresent: true
    [echo] Will add entry for src/test
    [echo] Contains JUnit tests
    [echo] Setting compile of src/test to target/test-classes

should be a 'and' I guess for the last test

Show
Stéphane Nicoll added a comment - 20/Aug/06 8:02 AM mmm weird. I think the jelly test is not working as expected: [echo] resourceDirectoryFile.exists(): true [echo] resourceDirectory.equals(srcdir): false [echo] resourceDirectory.equals(testSrcDir): false [echo] unitTestSourcesPresent: true [echo] Will add entry for src/test [echo] Contains JUnit tests [echo] Setting compile of src/test to target/test-classes should be a 'and' I guess for the last test
Hide
Permalink
Stéphane Nicoll added a comment - 20/Aug/06 8:12 AM

Ok found it, cactus was reseting the testSrcDir to a wrong value.

Show
Stéphane Nicoll added a comment - 20/Aug/06 8:12 AM Ok found it, cactus was reseting the testSrcDir to a wrong value.
Hide
Permalink
Stéphane Nicoll added a comment - 20/Aug/06 8:29 AM

This is fixed, execpt the cactus dependency thingy.

Show
Stéphane Nicoll added a comment - 20/Aug/06 8:29 AM This is fixed, execpt the cactus dependency thingy.
Hide
Permalink
Lukas Theussl added a comment - 20/Aug/06 4:57 PM

It's not fixed for me, plugin:test still fails for the same reason that I stated above. (I never noticed the cactus problem as I never used cactus and don't have it installed.) I can fix it easily but I don't know what is actually the expected entry in .classpath, is it

<classpathentry kind="lib" path="MAVEN_REPO/maven/jars/maven.jar"></classpathentry>

or is it

<classpathentry kind="lib" path="$

{MAVEN_HOME}

/lib/maven.jar"></classpathentry>
?

Show
Lukas Theussl added a comment - 20/Aug/06 4:57 PM It's not fixed for me, plugin:test still fails for the same reason that I stated above. (I never noticed the cactus problem as I never used cactus and don't have it installed.) I can fix it easily but I don't know what is actually the expected entry in .classpath, is it <classpathentry kind="lib" path="MAVEN_REPO/maven/jars/maven.jar"></classpathentry> or is it <classpathentry kind="lib" path="$ {MAVEN_HOME} /lib/maven.jar"></classpathentry> ?
Hide
Permalink
Stéphane Nicoll added a comment - 21/Aug/06 3:41 AM

Well. I did not have to change anything for me, it worked in a first place.

Expected entry is 'MAVEN_REPO/maven/jars/maven.jar'

Show
Stéphane Nicoll added a comment - 21/Aug/06 3:41 AM Well. I did not have to change anything for me, it worked in a first place. Expected entry is 'MAVEN_REPO/maven/jars/maven.jar'
Hide
Permalink
Lukas Theussl added a comment - 21/Aug/06 12:55 PM

Fixed. We now check for both classpathentries, at least one of them has to be present.

Show
Lukas Theussl added a comment - 21/Aug/06 12:55 PM Fixed. We now check for both classpathentries, at least one of them has to be present.

People

  • Assignee:
    Stéphane Nicoll
    Reporter:
    Lukas Theussl
Vote (0)
Watch (0)

Dates

  • Created:
    22/Jun/06 4:07 PM
    Updated:
    21/Aug/06 12:55 PM
    Resolved:
    21/Aug/06 12:55 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.