Author: rfscholte Date: Mon Dec 26 23:18:28 2011 New Revision: 1224834 URL: http://svn.apache.org/viewvc?rev=1224834&view=rev Log: Add IT for MSKINS-20
Added: maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/ maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/pom.xml maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/src/ maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/src/site/ maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/src/site/apt/ maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/src/site/apt/index.apt.vm maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/src/site/site.xml maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/verify.groovy Modified: maven/skins/trunk/maven-stylus-skin/src/main/resources/META-INF/maven/site.vm Added: maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/pom.xml URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/pom.xml?rev=1224834&view=auto ============================================================================== --- maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/pom.xml (added) +++ maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/pom.xml Mon Dec 26 23:18:28 2011 @@ -0,0 +1,65 @@ +<?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.skins.its</groupId> + <artifactId>mskins-20</artifactId> + <version>1.0-SNAPSHOT</version> + + <properties> + <skinName>@project.name@</skinName> + <skinDescription>@project.description@</skinDescription> + <skinGroupId>@project.groupId@</skinGroupId> + <skinArtifactId>@project.artifactId@</skinArtifactId> + <skinVersion>@project.version@</skinVersion> + </properties> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-site-plugin</artifactId> + <version>3.0</version> + </plugin> + </plugins> + </build> + + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-project-info-reports-plugin</artifactId> + <version>2.4</version> + <configuration> + <dependencyDetailsEnabled>false</dependencyDetailsEnabled> + <dependencyLocationsEnabled>false</dependencyLocationsEnabled> + </configuration> + <reportSets> + <reportSet> + <reports> + <report>index</report> + </reports> + </reportSet> + </reportSets> + </plugin> + </plugins> + </reporting> + +</project> \ No newline at end of file Added: maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/src/site/apt/index.apt.vm URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/src/site/apt/index.apt.vm?rev=1224834&view=auto ============================================================================== --- maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/src/site/apt/index.apt.vm (added) +++ maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/src/site/apt/index.apt.vm Mon Dec 26 23:18:28 2011 @@ -0,0 +1,16 @@ + ------ + ${project.name} + ------ + Robert Scholte + ------ + 2011-12-23 + ------ + +${project.name} + + This is a test for ${skinName} to verify the custom publish date. + ${skinDescription} + +* Actual configuration + +%{snippet|id=skin-custom-config|file=${project.basedir}/src/site/site.xml} Added: maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/src/site/site.xml URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/src/site/site.xml?rev=1224834&view=auto ============================================================================== --- maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/src/site/site.xml (added) +++ maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/src/site/site.xml Mon Dec 26 23:18:28 2011 @@ -0,0 +1,43 @@ +<?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/DECORATION/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd" + name="${skinName}"> + + <skin> + <groupId>${skinGroupId}</groupId> + <artifactId>${skinArtifactId}</artifactId> + <version>${skinVersion}</version> + </skin> + + <!-- START SNIPPET: skin-custom-config --> + <custom> + <publishDate>1970-01-01</publishDate> + </custom> + <!-- END SNIPPET: skin-custom-config --> + + <publishDate format="yyyy-MM-dd" position="right" /> + + <body/> +</project> \ No newline at end of file Added: maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/verify.groovy URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/verify.groovy?rev=1224834&view=auto ============================================================================== --- maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/verify.groovy (added) +++ maven/skins/trunk/maven-stylus-skin/src/it/mskins-20/verify.groovy Mon Dec 26 23:18:28 2011 @@ -0,0 +1,3 @@ +File index = new File( basedir, "target/site/index.html" ) +assert index.exists() +assert 1 == index.getText().count( 'Last Published: 1970-01-01' ) \ No newline at end of file Modified: maven/skins/trunk/maven-stylus-skin/src/main/resources/META-INF/maven/site.vm URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-stylus-skin/src/main/resources/META-INF/maven/site.vm?rev=1224834&r1=1224833&r2=1224834&view=diff ============================================================================== --- maven/skins/trunk/maven-stylus-skin/src/main/resources/META-INF/maven/site.vm (original) +++ maven/skins/trunk/maven-stylus-skin/src/main/resources/META-INF/maven/site.vm Mon Dec 26 23:18:28 2011 @@ -301,7 +301,7 @@ #if ( $publishDate ) #set ( $dateValue = $dateFormat.format( $publishDate ) ) #elseif ( $decoration.custom.getChild( 'publishDate' ) ) - #set ( $dateValue = $decoration.custom.getChild( 'publishDate' ) ) + #set ( $dateValue = $decoration.custom.getChild( 'publishDate' ).getValue() ) #else #set ( $dateValue = $dateFormat.format( $currentDate ) ) #end