2

I'm installing DSpace 5.3 on a fresh instance of Windows Server 2012, with the most recent versions of Maven (3.3.3) and Ant (1.9.6). A stock mvn package installation from my [dspace-src] directory, with Mirage 1 as the default interface, compiles and runs on localhost without problems.

After this initial installation, I installed Git on the system and reran Maven to build DSpace with Mirage 2 enabled. (As per the instructions for a preliminary installation, I've installed Git but not the rest of the Mirage 2 dependencies):

mvn package -Dmirage2.on=true

This produces the following error (snipped what seem to be irrelevant details):

[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] DSpace Parent Project .............................. FAILURE [  0.079 s]
[INFO] DSpace Services Framework :: API and Implementation  SKIPPED
[INFO] DSpace Kernel :: API and Implementation ............ SKIPPED
[INFO] DSpace Addon Modules ............................... SKIPPED
[INFO] DSpace Kernel :: Additions and Local Customizations  SKIPPED

...

[ERROR] Unknown lifecycle phase ".on=true". You must specify a valid 
lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-
group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available 
lifecycle phases are: validate, initialize, generate-sources, process-
sources, generate-resources, process-resources, compile, process-classes, 
generate-test-sources, process-test-sources, generate-test-resources, 
process-test-resources, test-compile, process-test-classes, test, prepare-
package, package, pre-integration-test, integration-test, 
post-integration-test, verify, install, deploy, pre-clean, clean, 
post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]

What could be causing this error?

  • Please be aware that DSpace 5.3 doesn't build with Maven 3.3.x: https://jira.duraspace.org/browse/DS-2533 -- there is a patch linked to that Jira issue – schweerelos Oct 01 '15 at 20:14
  • Thanks for the notification. I did in fact encounter this error after a "successful" Maven 3.3.3 compilation using the solution below. Downgrading to Maven 3.2.5 solved the problem. – Nicholas Webb Oct 05 '15 at 20:03

1 Answers1

5

This looks like some sort of a problem with windows shell escaping, try:

mvn package '-Dmirage2.on=true'
František Hartman
  • 14,436
  • 2
  • 40
  • 60
  • thanks! added this to the list of common build issues at https://wiki.duraspace.org/display/DSDOC5x/Mirage+2+Configuration+and+Customization#Mirage2ConfigurationandCustomization-CommonBuildIssues – Bram Luyten Oct 01 '15 at 20:14
  • http://stackoverflow.com/questions/6347985/cannot-run-maven-using-mvn-d-argument-within-microsoft-powershell suggests that there may be additional difficulties if you're using Powershell – schweerelos Oct 01 '15 at 20:15
  • 1
    For the record, on Windows any Maven flags which require parameters need similar escaping (either with single quotes or double quotes). So, any usage of "-D" or "-P" or similar requires the entire argument be surrounded by single or double quotes. – Tim Donohue Oct 02 '15 at 13:53
  • Thanks! This solved the "unknown lifecycle phase" error. – Nicholas Webb Oct 05 '15 at 19:25
  • To clarify: as noted above, escaping the -D flag solved my initial problem and led to a "successful" build, but the resulting deployed app had the DS-2368/DS-2533 "Javascript is disabled" error. Downgrading to Maven 3.2.5 fixed this second error and allowed me to build a working Mirage 2 instance. – Nicholas Webb Oct 05 '15 at 20:06