Author: ltheussl
Date: Mon May 23 10:33:15 2011
New Revision: 1126420

URL: http://svn.apache.org/viewvc?rev=1126420&view=rev
Log:
adding an IT for an issue reported on the dev list

Added:
    maven/plugins/trunk/maven-site-plugin/src/it/interpolation/
    maven/plugins/trunk/maven-site-plugin/src/it/interpolation/goals.txt
    maven/plugins/trunk/maven-site-plugin/src/it/interpolation/parent/
    maven/plugins/trunk/maven-site-plugin/src/it/interpolation/parent/pom.xml
    maven/plugins/trunk/maven-site-plugin/src/it/interpolation/pom.xml
    maven/plugins/trunk/maven-site-plugin/src/it/interpolation/src/
    maven/plugins/trunk/maven-site-plugin/src/it/interpolation/src/site/
    maven/plugins/trunk/maven-site-plugin/src/it/interpolation/src/site/site.xml
    maven/plugins/trunk/maven-site-plugin/src/it/interpolation/src/site/xdoc/
    
maven/plugins/trunk/maven-site-plugin/src/it/interpolation/src/site/xdoc/index.xml
    maven/plugins/trunk/maven-site-plugin/src/it/interpolation/verify.bsh
Modified:
    maven/plugins/trunk/maven-site-plugin/pom.xml

Modified: maven/plugins/trunk/maven-site-plugin/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/pom.xml?rev=1126420&r1=1126419&r2=1126420&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-site-plugin/pom.xml Mon May 23 10:33:15 2011
@@ -402,6 +402,10 @@ under the License.
               <pomIncludes>
                 <pomInclude>*/pom.xml</pomInclude>
               </pomIncludes>
+              <!-- FIXME: remove! -->
+              <pomExcludes>
+                <pomInclude>interpolation/pom.xml</pomInclude>
+              </pomExcludes>
               <postBuildHookScript>verify</postBuildHookScript>
               
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
               <goals>

Added: maven/plugins/trunk/maven-site-plugin/src/it/interpolation/goals.txt
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/interpolation/goals.txt?rev=1126420&view=auto
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/interpolation/goals.txt (added)
+++ maven/plugins/trunk/maven-site-plugin/src/it/interpolation/goals.txt Mon 
May 23 10:33:15 2011
@@ -0,0 +1 @@
+clean site-deploy
\ No newline at end of file

Added: maven/plugins/trunk/maven-site-plugin/src/it/interpolation/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/interpolation/parent/pom.xml?rev=1126420&view=auto
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/interpolation/parent/pom.xml 
(added)
+++ maven/plugins/trunk/maven-site-plugin/src/it/interpolation/parent/pom.xml 
Mon May 23 10:33:15 2011
@@ -0,0 +1,43 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.site.its</groupId>
+  <artifactId>interpolation-parent</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <name>site-interpolation IT - parent</name>
+
+  <properties>
+    <interpolated>interpolation</interpolated>
+  </properties>
+
+  <distributionManagement>
+    <site>
+      <id>${site.server}</id>
+      <url>${site.repository}</url>
+    </site>
+  </distributionManagement>
+
+</project>

Added: maven/plugins/trunk/maven-site-plugin/src/it/interpolation/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/interpolation/pom.xml?rev=1126420&view=auto
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/interpolation/pom.xml (added)
+++ maven/plugins/trunk/maven-site-plugin/src/it/interpolation/pom.xml Mon May 
23 10:33:15 2011
@@ -0,0 +1,77 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.plugins.site.its</groupId>
+    <artifactId>interpolation-parent</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <relativePath>parent/</relativePath>
+  </parent>
+
+  <artifactId>interpolation</artifactId>
+  <packaging>pom</packaging>
+
+  <name>site-interpolation IT</name>
+
+  <properties>
+    <site.server>site-deploy</site.server>
+    
<site.repository>file://@project.build.directory@/it/${interpolated}/target/site-deployed/</site.repository>
+  </properties>
+
+<!-- FIXME: moving the distMngmnt section from parent to here makes it work!? 
-->
+<!--
+  <distributionManagement>
+    <site>
+      <id>${site.server}</id>
+      <url>${site.repository}</url>
+    </site>
+  </distributionManagement>
+-->
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-site-plugin</artifactId>
+        <version>@project.version@</version>
+      </plugin>
+    </plugins>
+  </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-project-info-reports-plugin</artifactId>
+        <version>2.4</version>
+        <reportSets>
+          <reportSet>
+            <reports>
+              <report>index</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+    </plugins>
+  </reporting>
+</project>

Added: 
maven/plugins/trunk/maven-site-plugin/src/it/interpolation/src/site/site.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/interpolation/src/site/site.xml?rev=1126420&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-site-plugin/src/it/interpolation/src/site/site.xml 
(added)
+++ 
maven/plugins/trunk/maven-site-plugin/src/it/interpolation/src/site/site.xml 
Mon May 23 10:33:15 2011
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project name="MSITE-265" xmlns="http://maven.apache.org/DECORATION/1.0.0";
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+    xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 
http://maven.apache.org/xsd/decoration-1.0.0.xsd";>
+
+  <body>
+    <menu name="Welcome">
+      <item name="Index" href="index.html"/>
+    </menu>
+    <menu ref="reports"/>
+  </body>
+</project>

Added: 
maven/plugins/trunk/maven-site-plugin/src/it/interpolation/src/site/xdoc/index.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/interpolation/src/site/xdoc/index.xml?rev=1126420&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-site-plugin/src/it/interpolation/src/site/xdoc/index.xml
 (added)
+++ 
maven/plugins/trunk/maven-site-plugin/src/it/interpolation/src/site/xdoc/index.xml
 Mon May 23 10:33:15 2011
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<document>
+  <body>
+    <section name="Overview">
+      <p>Welcome!</p>
+    </section>
+  </body>
+</document>
\ No newline at end of file

Added: maven/plugins/trunk/maven-site-plugin/src/it/interpolation/verify.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/interpolation/verify.bsh?rev=1126420&view=auto
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/interpolation/verify.bsh 
(added)
+++ maven/plugins/trunk/maven-site-plugin/src/it/interpolation/verify.bsh Mon 
May 23 10:33:15 2011
@@ -0,0 +1,56 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.*;
+import org.codehaus.plexus.util.*;
+
+boolean result = true;
+
+try
+{
+    File target = new File( basedir, "target" );
+    if ( !target.exists() || !target.isDirectory() )
+    {
+        System.err.println( "target file is missing or not a directory." );
+        result = false;
+    }
+
+    File siteDirectory = new File( target, "site-deployed" );
+    if ( !siteDirectory.exists() || !siteDirectory.isDirectory() )
+    {
+        System.err.println( "site file is missing or not a directory." );
+        System.err.println( siteDirectory.getAbsolutePath() );
+        result = false;
+    }
+
+    File index = new File( siteDirectory, "index.html" );
+    if ( !index.exists() || index.isDirectory() )
+    {
+        System.err.println( "index.html file is missing or a directory." );
+        result = false;
+    }
+}
+catch( IOException e )
+{
+    e.printStackTrace();
+    result = false;
+}
+
+return result;


Reply via email to