Author: rfscholte
Date: Sun Jan 17 19:51:45 2016
New Revision: 1725116
URL: http://svn.apache.org/viewvc?rev=1725116&view=rev
Log:
Original unittest for DOXIASITETOOLS-118
Added:
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-child-test/
(with props)
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-child-test/pom.xml
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-child-test/src/
(with props)
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-child-test/src/site/
(with props)
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-child-test/src/site/site.xml
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-parent-test/
(with props)
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-parent-test/pom.xml
Modified:
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/java/org/apache/maven/doxia/tools/SiteToolTest.java
Modified:
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/java/org/apache/maven/doxia/tools/SiteToolTest.java
URL:
http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/java/org/apache/maven/doxia/tools/SiteToolTest.java?rev=1725116&r1=1725115&r2=1725116&view=diff
==============================================================================
---
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/java/org/apache/maven/doxia/tools/SiteToolTest.java
(original)
+++
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/java/org/apache/maven/doxia/tools/SiteToolTest.java
Sun Jan 17 19:51:45 2016
@@ -22,6 +22,8 @@ package org.apache.maven.doxia.tools;
import java.io.File;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
@@ -38,8 +40,6 @@ import org.apache.maven.project.MavenPro
import org.codehaus.plexus.PlexusTestCase;
import org.codehaus.plexus.util.FileUtils;
-import edu.emory.mathcs.backport.java.util.Arrays;
-
/**
* @author <a href="mailto:[email protected]">Vincent Siveton</a>
* @version $Id$
@@ -336,4 +336,36 @@ public class SiteToolTest
assertFalse( siteDescriptorContent.contains( "${project.name}" ) );
assertTrue( siteDescriptorContent.contains( "Interpolatesite" ) );
}
+
+ // MSHARED-217 -> DOXIATOOLS-34 -> DOXIASITETOOLS-118
+ public void testMultiModuleInterpolation()
+ throws Exception
+ {
+ SiteTool tool = (SiteTool) lookup( SiteTool.ROLE );
+ assertNotNull( tool );
+
+ SiteToolMavenProjectStub parentProject = new SiteToolMavenProjectStub(
"interpolation-parent-test" );
+ parentProject.setGroupId( "org.apache.maven.shared.its" );
+ parentProject.setArtifactId( "mshared-217-parent" );
+ parentProject.setVersion( "1.0-SNAPSHOT" );
+ parentProject.setBasedir( null ); // get it from repo
+ parentProject.setName( "MSHARED-217 Parent" );
+ String siteDirectory = "src/site";
+
+ SiteToolMavenProjectStub childProject = new SiteToolMavenProjectStub(
"interpolation-child-test" );
+ childProject.setParent( parentProject );
+ childProject.setGroupId( "org.apache.maven.shared.its" );
+ childProject.setArtifactId( "mshared-217-child" );
+ childProject.setVersion( "1.0-SNAPSHOT" );
+ childProject.setBasedir( null ); // get it from repo
+ childProject.setName( "MSHARED-217 Child" );
+
+ List<MavenProject> reactorProjects =
Collections.<MavenProject>singletonList( parentProject );
+
+ DecorationModel model =
+ tool.getDecorationModel( new File( siteDirectory ),
Locale.getDefault(), childProject, reactorProjects,
+ getLocalRepo(),
childProject.getRemoteArtifactRepositories() );
+ assertNotNull( model );
+ assertEquals( "MSHARED-217 Child", model.getName() );
+ }
}
Propchange:
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-child-test/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Sun Jan 17 19:51:45 2016
@@ -0,0 +1 @@
+DOXIASITETOOLS-\d+
Propchange:
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-child-test/
------------------------------------------------------------------------------
bugtraq:url = http://jira.codehaus.org/browse/%BUGID%
Added:
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-child-test/pom.xml
URL:
http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-child-test/pom.xml?rev=1725116&view=auto
==============================================================================
---
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-child-test/pom.xml
(added)
+++
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-child-test/pom.xml
Sun Jan 17 19:51:45 2016
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.shared.its</groupId>
+ <artifactId>mshared-217-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+</project>
Propchange:
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-child-test/src/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Sun Jan 17 19:51:45 2016
@@ -0,0 +1 @@
+DOXIASITETOOLS-\d+
Propchange:
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-child-test/src/
------------------------------------------------------------------------------
bugtraq:url = http://jira.codehaus.org/browse/%BUGID%
Propchange:
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-child-test/src/site/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Sun Jan 17 19:51:45 2016
@@ -0,0 +1 @@
+DOXIASITETOOLS-\d+
Propchange:
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-child-test/src/site/
------------------------------------------------------------------------------
bugtraq:url = http://jira.codehaus.org/browse/%BUGID%
Added:
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-child-test/src/site/site.xml
URL:
http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-child-test/src/site/site.xml?rev=1725116&view=auto
==============================================================================
---
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-child-test/src/site/site.xml
(added)
+++
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-child-test/src/site/site.xml
Sun Jan 17 19:51:45 2016
@@ -0,0 +1,24 @@
+<?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="${project.name}"
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">
+</project>
\ No newline at end of file
Propchange:
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-parent-test/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Sun Jan 17 19:51:45 2016
@@ -0,0 +1 @@
+DOXIASITETOOLS-\d+
Propchange:
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-parent-test/
------------------------------------------------------------------------------
bugtraq:url = http://jira.codehaus.org/browse/%BUGID%
Added:
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-parent-test/pom.xml
URL:
http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-parent-test/pom.xml?rev=1725116&view=auto
==============================================================================
---
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-parent-test/pom.xml
(added)
+++
maven/doxia/doxia-sitetools/trunk/doxia-integration-tools/src/test/resources/unit/interpolation-parent-test/pom.xml
Sun Jan 17 19:51:45 2016
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.shared.its</groupId>
+ <artifactId>mshared-217-child</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+</project>