2013-03-07 36 views
3

要列出一堆要包括在生成的features.xml束,文檔說:什麼是包屬性的格式karaf的功能,Maven的插件生成的功能的XML目標

bundles File  A properties file that contains a list of bundles that will be used to generate the features.xml file 

但它忽略了說這個文件應該是什麼格式的文檔給的例子:

 <execution> 
      <id>generate</id> 
      <phase>generate-resources</phase> 
      <goals> 
      <goal>generate-features-xml</goal> 
      </goals> 
      <configuration> 
      <bundles>src/main/resources/bundles.properties</bundles> 
      <outputFile>target/features.xml</outputFile> 
      </configuration> 
     </execution> 

任何人都知道這個文件應該是什麼樣的呢?

+2

你試過了嗎?groupId:artifactId:type [:classifier]:version'?該文件稱爲「下面的示例生成了一個安裝bundle'mvn:org.apache:bundle1:1.0'的功能。我認爲格式應該是一樣的。 – 2013-03-07 01:23:44

+0

@marathon - 找到答案的任何運氣? – CAB 2013-09-23 15:07:38

回答

3

的正確格式爲

groupId/artifactId/version/type 

例如:

org.apache/bundle1/1.0/bundle 

對於它的價值,我試圖得到的功能插件來爲我工作,但事與願違,因部分糟糕的文檔。我想動態構建一個features.xml,它將替換我的包和我的特性中的包的版本。使用Maven過濾來實現我的目標比較容易,所以這就是我所做的。