maven没有阅读定义的属性

时间:2015-04-06 21:28:51

标签: maven

不知道为什么它不起作用。我在POM上有几个已定义的属性,我从它运行一个小脚本,它应该能够读取这些属性,但它没有发生。

这是POM:

<properties> <propery.one>SOMETHING</propery.one> <propery.two>SOMETHING</propery.two> <commandline.location>/SOME/PATH/</commandline.location> <commandline.executable>commandline-script.sh</commandline.executable> ...... </properties>

<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> <version>2.7</version> <configuration> <skip>true</skip> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.2.1</version> <executions> <execution> <id>export</id> <phase>deploy</phase> <goals> <goal>exec</goal> </goals> <configuration> <executable>${commandline.executable}</executable> <workingDirectory>${commandline.location}</workingDirectory> <arguments> <argument>${project.basedir}/scripts/myScript.sh</argument> </arguments> </configuration> </execution> </executions> </plugin> </plugins> </build>

我用这个命令调用Maven:mvn deploy(我想它。它是正确的) 所以,一旦它启动,我就会看到很多异常,因为脚本调用了这一行:&#34; $ {commandline.executable}&#34;不是从POM读取属性。

请帮助......

0 个答案:

没有答案