Documentation gets filterd now
authorKai Moritz <kai@coolibri.de>
Thu, 29 Nov 2012 12:03:07 +0000 (13:03 +0100)
committerKai Moritz <kai@coolibri.de>
Tue, 11 Dec 2012 20:56:35 +0000 (21:56 +0100)
That way, the project-version does not need to be hardcoded in the
documentation any more.

pom.xml
src/site/apt/examples.apt

diff --git a/pom.xml b/pom.xml
index 7bbb87b..19180c9 100644 (file)
--- a/pom.xml
+++ b/pom.xml
           <goals>install</goals>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>2.3</version>
+        <executions>
+          <execution>
+            <id>copy-resources</id>
+            <phase>pre-site</phase>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${project.build.directory}/filtered-site</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>src/site</directory>
+                  <filtering>true</filtering>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 
   <reporting>
     <plugins>
+      <plugin>
+        <artifactId>maven-site-plugin</artifactId>
+        <version>2.1</version>
+        <configuration>
+          <siteDirectory>${project.build.directory}/filtered-site</siteDirectory>
+        </configuration>
+      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-changes-plugin</artifactId>
index da04a25..1c28320 100644 (file)
@@ -30,7 +30,7 @@ Configuration through a hibernate.properties-File
 <plugin>
   <groupId>de.juplo</groupId>
   <artifactId>hibernate4-maven-plugin</artifactId>
-  <version>1.0-SNAPSHOT</version>
+  <version>${project.version}</version>
   <executions>
     <execution>
       <goals>
@@ -54,7 +54,7 @@ Configuration through a hibernate.properties-File
 <plugin>
   <groupId>de.juplo</groupId>
   <artifactId>hibernate4-maven-plugin</artifactId>
-  <version>1.0-SNAPSHOT</version>
+  <version>${project.version}</version>
   <executions>
     <execution>
       <goals>
@@ -119,7 +119,7 @@ Configuration through maven-properties
   <plugin>
     <groupId>de.juplo</groupId>
     <artifactId>hibernate4-maven-plugin</artifactId>
-    <version>1.0-SNAPSHOT</version>
+    <version>${project.version}</version>
     <executions>
       <execution>
         <goals>
@@ -157,7 +157,7 @@ Configuration through the plugin-configuration
 <plugin>
   <groupId>de.juplo</groupId>
   <artifactId>hibernate4-maven-plugin</artifactId>
-  <version>1.0-SNAPSHOT</version>
+  <version>${project.version}</version>
   <executions>
     <execution>
       <goals>
@@ -222,7 +222,7 @@ Configuration through the plugin-configuration
 <plugin>
   <groupId>de.juplo</groupId>
   <artifactId>hibernate4-maven-plugin</artifactId>
-  <version>1.0-SNAPSHOT</version>
+  <version>${project.version}</version>
   <executions>
     <execution>
       <goals>
@@ -299,7 +299,7 @@ Known Pitfalls
 <plugin>
   <groupId>de.juplo</groupId>
   <artifactId>hibernate4-maven-plugin</artifactId>
-  <version>1.0-SNAPSHOT</version>
+  <version>${project.version}</version>
   <executions>
     <execution>
       <goals>