Uploaded image for project: 'Commons VFS'
  1. Commons VFS
  2. VFS-197

Maven2 Build Fails

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 2.0
    • Labels:
      None

      Description

      On my machine, the maven2 build fails with the following exception:

      -------------------------------------------------------------------------------
      Test set: org.apache.commons.vfs.test.FileSystemManagerFactoryTestCase
      -------------------------------------------------------------------------------
      Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.056 sec <<< FAILURE!
      testDefaultInstance(org.apache.commons.vfs.test.FileSystemManagerFactoryTestCase) Time elapsed: 0.018 sec <<< FAILURE!
      junit.framework.AssertionFailedError: Test file "C:\Users\jcarman\IdeaProjects\commons-vfs-clean\core\target\test-classes\test-data\test.jar" does not exist.
      at junit.framework.Assert.fail(Assert.java:47)
      at junit.framework.Assert.assertTrue(Assert.java:20)
      at org.apache.commons.AbstractVfsTestCase.getTestResource(AbstractVfsTestCase.java:85)
      at org.apache.commons.AbstractVfsTestCase.getTestResource(AbstractVfsTestCase.java:71)
      at org.apache.commons.vfs.test.FileSystemManagerFactoryTestCase.testDefaultInstance(FileSystemManagerFactoryTestCase.java:45)
      at org.apache.commons.vfs.test.FileSystemManagerFactoryTestCase.testDefaultInstance(FileSystemManagerFactoryTestCase.java:45)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
      at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
      at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
      at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
      at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)

      The problem is that the maven build isn't copying the test data over into the target folder. I can fix this, but it will mean moving the test data around a bit by putting it in the src/main/resources (the standard place for testing resources for m2). I'll attach a patch illustrating my changes.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jwcarman James Carman
                Reporter:
                jwcarman James Carman
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1h
                  1h
                  Remaining:
                  Remaining Estimate - 1h
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified