Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.9.7
    • Fix Version/s: 0.9.8
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      This was working in 0.9.6 and is now failing in 0.9.7: when I modify a test resource file, it's not taken into account. For example when I run a unit tests using that resource file, I can see that Eclipse is still using the old version of the file and not the modifications I made to it.

        Activity

        Hide
        Richard Seddon added a comment -

        I'm not seeing this. I've created a properties file under src/test/resources t in a project, and created a test that reads it.

        Changes are being picked up when I use "Run/Run As.../Maven install", and also when I run the test class using Eclipse's test runner.

        I'm guessing that I'm missing something? Is there a simple way to reproduce this issue?

        Show
        Richard Seddon added a comment - I'm not seeing this. I've created a properties file under src/test/resources t in a project, and created a test that reads it. Changes are being picked up when I use "Run/Run As.../Maven install", and also when I run the test class using Eclipse's test runner. I'm guessing that I'm missing something? Is there a simple way to reproduce this issue?
        Hide
        Vincent Massol added a comment -

        Hi Rich,

        You could try this:

        • Create a new eclipse workspace
        • checkout http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-rendering/ locally (I do with my command line svn client)
        • in eclipse, import all modules under that directory
        • go in xwiki-rendering-tests/ and try running RenderingTests in the eclipse junit testrunner. It fails for me (it used to work). That's a first issue but different from this one maybe
        • if you get the 700+ tests to work fine then go in rendering-tests/src/test/resources and modify one of the *.test files and try running RenderingTests again. It should still work fine even if you made a breaking change

        Thanks for working on this. I've been struggling for hours since yesterday on trying to get an environment working again with m2eclipse. I tried the eclipse rollback feature and it didn't help. Not sure what's going on.

        Show
        Vincent Massol added a comment - Hi Rich, You could try this: Create a new eclipse workspace checkout http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-rendering/ locally (I do with my command line svn client) in eclipse, import all modules under that directory go in xwiki-rendering-tests/ and try running RenderingTests in the eclipse junit testrunner. It fails for me (it used to work). That's a first issue but different from this one maybe if you get the 700+ tests to work fine then go in rendering-tests/src/test/resources and modify one of the *.test files and try running RenderingTests again. It should still work fine even if you made a breaking change Thanks for working on this. I've been struggling for hours since yesterday on trying to get an environment working again with m2eclipse. I tried the eclipse rollback feature and it didn't help. Not sure what's going on.
        Hide
        Richard Seddon added a comment -

        I've set up my environment as described in http://dev.xwiki.org/xwiki/bin/view/Community/Building, but I'm not having much luck building this (unresolved artifact com.xpn.xwiki.platform:xwiki:pom:21-SNAPSHOT)

        I'll try again tomorrow when I have some more time.

        Show
        Richard Seddon added a comment - I've set up my environment as described in http://dev.xwiki.org/xwiki/bin/view/Community/Building , but I'm not having much luck building this (unresolved artifact com.xpn.xwiki.platform:xwiki:pom:21-SNAPSHOT) I'll try again tomorrow when I have some more time.
        Hide
        Vincent Massol added a comment -

        Rich, it may be that you had some bad luck since we've released 3 versions of XWiki yesterday and it's possible that with pom juggling our CI didn't have the time to upload some artifacts to our custom repo. You have added the xwiki remore repo to your settings right?

        I can see it's there:
        http://maven.xwiki.org/snapshots/com/xpn/xwiki/platform/xwiki/21-SNAPSHOT/

        I'm on skype (vmassol) or xwiki's irc (irc.freenode.net, #xwiki) if you need help.

        Thanks
        -Vincent

        Show
        Vincent Massol added a comment - Rich, it may be that you had some bad luck since we've released 3 versions of XWiki yesterday and it's possible that with pom juggling our CI didn't have the time to upload some artifacts to our custom repo. You have added the xwiki remore repo to your settings right? I can see it's there: http://maven.xwiki.org/snapshots/com/xpn/xwiki/platform/xwiki/21-SNAPSHOT/ I'm on skype (vmassol) or xwiki's irc (irc.freenode.net, #xwiki) if you need help. Thanks -Vincent
        Hide
        Eugene Kuleshov added a comment -

        Rich, this look like the same issue as MNGECLIPSE-823 and you need to talk to Igor about it.

        Show
        Eugene Kuleshov added a comment - Rich, this look like the same issue as MNGECLIPSE-823 and you need to talk to Igor about it.
        Hide
        Richard Seddon added a comment -

        OK, it builds today. I was able to reproduce your problem, and in fact I can now reproduce it by adding the following to a simple project (this is in your pom.xml):

        <build>
        <plugins>
        <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
        <execution>
        <goals>
        <goal>testResources</goal>
        </goals>
        </execution>
        </executions>
        </plugin>
        </plugins>
        </build>

        When this is present test resource changes are not picked up, when it is removed they are.

        What is the intent of this? There is no phase specified...

        Show
        Richard Seddon added a comment - OK, it builds today. I was able to reproduce your problem, and in fact I can now reproduce it by adding the following to a simple project (this is in your pom.xml): <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <executions> <execution> <goals> <goal>testResources</goal> </goals> </execution> </executions> </plugin> </plugins> </build> When this is present test resource changes are not picked up, when it is removed they are. What is the intent of this? There is no phase specified...
        Hide
        Vincent Massol added a comment - - edited

        Hi Rich,

        Cool to see you could reproduce it!

        This is used to copy test resources files (this is required since the packaging is pom and the pom lifecycle doesn't have the resource plugin mapped by default). There's no phase specified since I want to use the default phase specified in the TestResourcesMojo.java class (ie. process-test-resources). If you run it on the command line you'll see it says:

        [INFO] [resources:testResources {execution: default}]
        

        which shows it's executed.

        You can also try to comment out this plugin and you'll see the test resources are not copied anymore.

        Show
        Vincent Massol added a comment - - edited Hi Rich, Cool to see you could reproduce it! This is used to copy test resources files (this is required since the packaging is pom and the pom lifecycle doesn't have the resource plugin mapped by default). There's no phase specified since I want to use the default phase specified in the TestResourcesMojo.java class (ie. process-test-resources). If you run it on the command line you'll see it says: [INFO] [resources:testResources {execution: default}] which shows it's executed. You can also try to comment out this plugin and you'll see the test resources are not copied anymore.
        Hide
        Vincent Massol added a comment -

        I don't know how it's possible but reverting to 0.9.6 fails too. I'm pretty sure it used to work so I don't know what has changed. So I now have a non working m2eclipse and it's a big pain. Any workaround would be great. Removing the plugin doesn't help and I don't see how it would since the packaging being "pom" it would never copy test resources.

        Thanks

        Show
        Vincent Massol added a comment - I don't know how it's possible but reverting to 0.9.6 fails too. I'm pretty sure it used to work so I don't know what has changed. So I now have a non working m2eclipse and it's a big pain. Any workaround would be great. Removing the plugin doesn't help and I don't see how it would since the packaging being "pom" it would never copy test resources. Thanks

          People

          • Assignee:
            Rich Seddon
            Reporter:
            Vincent Massol
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: