Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 28th, 2012  |  syntax: None  |  size: 0.61 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Read a file into a Maven property
  2. <plugin>
  3.   <groupId>org.codehaus.gmaven</groupId>
  4.   <artifactId>gmaven-plugin</artifactId>
  5.   <version>1.4</version>
  6.   <executions>
  7.     <execution>
  8.       <phase>generate-resources</phase>
  9.       <goals>
  10.         <goal>execute</goal>
  11.       </goals>
  12.       <configuration>
  13.         <properties>
  14.           <header_file>header.html</header_file>
  15.         </properties>
  16.         <source>
  17.           def file = new File(project.properties.header_file)
  18.           project.properties.header_content = file.getText()
  19.         </source>
  20.       </configuration>
  21.     </execution>
  22.   </executions>
  23. </plugin>