Search code examples
mavendspace

"Unknown lifecycle phase '.on=true'" when building DSpace 5.3 with Mirage 2 enabled on Windows Server 2012


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?


Solution

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

    mvn package '-Dmirage2.on=true'