Ich habe pom mit Ressourcen: copy-Ressourcen-Plugin:Linux: Maven Ressourcen: Copy-Ressourcen-Plugin. Parameter mit Leerzeichen
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>example</groupId>
<artifactId>preprocess</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>.</outputDirectory>
<resources>
<resource>
<directory>source</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Und ich versuche, dieses Plugin mit param auszuführen:
sudo bash mvnw.sh process-resources -DvalidationQuery="select 1 from sysibm.sysdummy1"
Fehler ist:
[ERROR] Unknown lifecycle phase "1". 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]
-DvalidationQuery="\"select 1 from sysibm.sysdummy1\""
-DvalidationQuery="""select 1 from sysibm.sysdummy1"""
"-DvalidationQuery=select 1 from sysibm.sysdummy1"
funktioniert nicht
sudo bash mvnw.sh process-resources -DvalidationQuery="blabla"
-
mit Windows-Betriebssystem funktioniert habe ich nicht ähnliches Problem.
Wie kann ich Param mit Platz verwenden?
zeigen Sie bitte die volle pom-Datei und den Inhalt von mvnw.sh? – khmarbaise
Pom hinzugefügt. mvnw.sh: https://github.com/takari/maven-wrapper/blob/master/mvnw Plugin funktioniert korrekt mit Parametern ohne Leerzeichen. – yazabara
Wenn dies die vollständige Pom-Datei ist, warum benötigen Sie die Systemeigenschaft? Ich sehe keinen Ort, wo es verwendet wird? Außerdem sieht es aus wie ein Problem mit 'mvnw.sh' script ... – khmarbaise