]> source.dussan.org Git - archiva.git/commitdiff
check the release notes and site descriptor version during release until it can be...
authorBrett Porter <brett@apache.org>
Tue, 7 Oct 2008 11:40:56 +0000 (11:40 +0000)
committerBrett Porter <brett@apache.org>
Tue, 7 Oct 2008 11:40:56 +0000 (11:40 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@702438 13f79535-47bb-0310-9956-ffa450edef68

archiva-docs/pom.xml
pom.xml

index bd38f139e223dafd9b4f5921ed00522ad529c24c..dba5d0199cba30e51d6ca0cd46f04e13dac625cd 100644 (file)
               </execution>
             </executions>
           </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-enforcer-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>enforce-beanshell</id>
+                <goals>
+                  <goal>enforce</goal>
+                </goals>
+                <configuration>
+                  <rules>
+                    <evaluateBeanshell>
+                      <message>Site descriptor needs to be updated for the current release version</message>
+                      <condition>
+                        <![CDATA[
+                          javax.xml.xpath.XPath xpath = javax.xml.xpath.XPathFactory.newInstance().newXPath();
+                          org.xml.sax.InputSource is = new org.xml.sax.InputSource( new java.io.FileInputStream( "src/site/site.xml" ) );
+                          xpath.evaluate( "//project/body/breadcrumbs/item[@name='${project.version}']/@href", is ).equals( "/docs/${project.version}" )
+                        ]]>
+                      </condition>
+                    </evaluateBeanshell>
+                    <evaluateBeanshell>
+                      <message>Release notes need to be updated for the current release version</message>
+                      <condition>
+                        <![CDATA[
+                          org.codehaus.plexus.util.FileUtils.fileRead( "src/site/apt/release-notes.apt" ).indexOf( "Release Notes for Archiva ${project.version}" ) >= 0
+                        ]]>
+                      </condition>
+                    </evaluateBeanshell>
+                  </rules>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
         </plugins>
       </build>
     </profile>
   </profiles>
-
 </project>
diff --git a/pom.xml b/pom.xml
index bdffb05b23963970565400c38a834379faadf67a..b133740733adf638cd7c8c1f1cb735b435fbe420 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -64,7 +64,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-enforcer-plugin</artifactId>
-        <version>1.0-alpha-3</version>
+        <version>1.0-alpha-4</version>
         <executions>
           <execution>
             <goals>