]> source.dussan.org Git - archiva.git/commitdiff
fail release if the release notes have not yet been updated
authorBrett Porter <brett@apache.org>
Tue, 7 Oct 2008 14:02:11 +0000 (14:02 +0000)
committerBrett Porter <brett@apache.org>
Tue, 7 Oct 2008 14:02:11 +0000 (14:02 +0000)
Merged from: r702438:702458 on trunk

git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-1.1.x@702487 13f79535-47bb-0310-9956-ffa450edef68

archiva-docs/pom.xml
archiva-jetty/pom.xml
pom.xml

index a7391932547f93e76edd04b77b60df9660dd4d8d..505fc1c58a8674a6f88dfefde06e3f3405438acc 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( "${basedir}/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( "${basedir}/src/site/apt/release-notes.apt" ).indexOf( "Release Notes for Archiva ${project.version}" ) >= 0
+                        ]]>
+                      </condition>
+                    </evaluateBeanshell>
+                  </rules>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
         </plugins>
       </build>
     </profile>
index f8863a8cf5a110ac018fcbdf6987a10187421cb7..50e05d055b91b4757567aecddd977ce329794619 100644 (file)
       </plugin>
     </plugins>
   </build>
-  <pluginRepositories>
-    <pluginRepository>
-      <id>codehaus.snapshots</id>
-      <url>http://snapshots.repository.codehaus.org/</url>
-    </pluginRepository>
-  </pluginRepositories>
 </project>
diff --git a/pom.xml b/pom.xml
index 2732c63d666b00d099feacddbd04e19f96666194..0bd6ad0be62a26c66c59b3fe571072b466451466 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>