Issue Details (XML | Word | Printable)

Key: MPECLIPSE-119
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Stephane Nicoll
Reporter: Lukas Theussl
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven 1.x Eclipse Plugin

plugin:test broken in 1.11

Created: 22/Jun/06 04:07 PM   Updated: 21/Aug/06 12:55 PM
Component/s: None
Affects Version/s: 1.11
Fix Version/s: 1.12

Time Tracking:
Not Specified

Environment: m11b3


 Description  « Hide
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.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Arnaud Heritier added a comment - 05/Jul/06 04: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)

Stephane Nicoll added a comment - 20/Aug/06 05: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).

Stephane Nicoll added a comment - 20/Aug/06 05: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?


Stephane Nicoll added a comment - 20/Aug/06 07: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>

Stephane Nicoll added a comment - 20/Aug/06 08: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


Stephane Nicoll added a comment - 20/Aug/06 08:12 AM
Ok found it, cactus was reseting the testSrcDir to a wrong value.

Stephane Nicoll added a comment - 20/Aug/06 08:29 AM
This is fixed, execpt the cactus dependency thingy.

Lukas Theussl added a comment - 20/Aug/06 04: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>
?


Stephane Nicoll added a comment - 21/Aug/06 03: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'


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.