Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-1867

Maven build issues from [src]/dspace/ , error finding target/build.properties

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1
    • Component/s: None
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      3
    • Documentation Status:
      Complete or Committed

      Description

      Since the 4.0 release, there have been several reports of maven build errors like this one:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources (default-resources) on project xmlui: Error loading property file '[src]/dspace/modules/xmlui/../../../target/build.properties' -> [Help 1]

      For example, see this thread:
      http://dspace.2283337.n4.nabble.com/DSpace-4-0-upgrade-failure-td4669838.html

      Essentially, it looks as though there are scenarios where running 'mvn package' from [src]/dspace/ will fail to create or locate the necessary "target/build.properties" file.

      As the error refers to a missing "[src]/target/build.properties" file, it seems likely related to changes applied in DS-1528 to fix UTF-8 encoding issues in build.properties. The fix for DS-1528 was to copy the .properties file to [src]/target/ in order to encode it as UTF-8 *before filtering its values into dspace.cfg (and similar).

      I've not had time to do further investigation on what the exact issue is & how to reproduce this error. However, I wanted to note my suspicions that DS-1528 may have caused this problem. (NOTE: as you may see in the email thread above, I initially thought this was a documentation issue. But, I'm now suspecting that it's a bug in our Maven build process.)

      For the time being, anyone encountering this error can just run "mvn package" from the root directory ([src]) instead of the 'dspace' subdirectory ([src]/dspace). Running Maven from the root directory seems to always work.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tdonohue Tim Donohue
                Reporter:
                tdonohue Tim Donohue
                Reviewer:
                Ivan Masár
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: