2014-10-04 112 views
0

在插件POM,有如下定義的屬性:如何覆蓋pom的插件屬性?

<project 
    ... 
    <properties> 
     <jruby.version>1.6.8</jruby.version> 
    </properties> 

我想覆蓋在我的項目的POM,物業(定義爲「1.7.0」)。

一些額外的信息,可能是有用的:

這可能嗎?

謝謝。根據POM Reference, Plugins

回答

0

關於b):

<plugin> 
    ... 
    <executions> 
    <execution> 
     <id>...</id> 
     <goals> 
     <goal>...</goal> 
     </goals> 
     <phase>...</phase> 
     <configuration> 
     <properties> 
      <jruby.version>1.7.0</jruby.version> 
     </properties> 
     </configuration> 
    </execution> 
    </executions> 
    ... 
</plugin> 
+0

不,這是行不通的,因爲我需要改寫的屬性是用戶定義的屬性([鏈接] http://books.sonatype.com /mvnref-book/reference/resource-filtering-sect-properties.html#resource-filtering-sect-user-defined),你建議的方法是爲插件Mojo可能期望的屬性(這些是getter和setter在Java Mojo bean) – Mariana 2014-10-06 16:03:52