Hi Hervé, I tried to fix the IT since Hudson was unhappy. I specified svn properties for UTF-16 file. Could you review?
Cheers, Vincent 2008/7/27 <[EMAIL PROTECTED]>: > Author: hboutemy > Date: Sun Jul 27 14:16:20 2008 > New Revision: 680188 > > URL: http://svn.apache.org/viewvc?rev=680188&view=rev > Log: > [MJAVADOC-206]: added an IT > > Added: > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/ > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/default/ > > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/default/pom.xml > (with props) > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/default/src/ > > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/default/src/main/ > > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/default/src/main/java/ > > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/default/src/main/java/Test.java > (with props) > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/encoding/ > > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/encoding/pom.xml > (with props) > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/encoding/src/ > > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/encoding/src/main/ > > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/encoding/src/main/java/ > > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/encoding/src/main/java/Test.java > (with props) > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/goals.txt > (with props) > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/pom.xml > (with props) > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/verify.bsh > Modified: > maven/plugins/trunk/maven-javadoc-plugin/pom.xml > > Modified: maven/plugins/trunk/maven-javadoc-plugin/pom.xml > URL: > http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/pom.xml?rev=680188&r1=680187&r2=680188&view=diff > ============================================================================== > --- maven/plugins/trunk/maven-javadoc-plugin/pom.xml (original) > +++ maven/plugins/trunk/maven-javadoc-plugin/pom.xml Sun Jul 27 14:16:20 2008 > @@ -269,6 +269,7 @@ > <pomInclude>**/MJAVADOC-172/pom.xml</pomInclude> > <pomInclude>**/MJAVADOC-180/pom.xml</pomInclude> > <pomInclude>**/MJAVADOC-194/pom.xml</pomInclude> > + <pomInclude>**/MJAVADOC-206/pom.xml</pomInclude> > </pomIncludes> > <postBuildHookScript>verify.bsh</postBuildHookScript> > > <localRepositoryPath>${basedir}/target/local-repo</localRepositoryPath> > > Added: > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/default/pom.xml > URL: > http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/default/pom.xml?rev=680188&view=auto > ============================================================================== > --- > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/default/pom.xml > (added) > +++ > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/default/pom.xml > Sun Jul 27 14:16:20 2008 > @@ -0,0 +1,32 @@ > +<!-- > + 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/maven-v4_0_0.xsd"> > + <modelVersion>4.0.0</modelVersion> > + <parent> > + <groupId>test</groupId> > + <artifactId>MJAVADOC-206</artifactId> > + <version>1.0-SNAPSHOT</version> > + </parent> > + <artifactId>default</artifactId> > + <packaging>jar</packaging> > + > + <name>Default encoding</name> > + <description>should be UTF-8</description> > +</project> > \ No newline at end of file > > Propchange: > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/default/pom.xml > ------------------------------------------------------------------------------ > svn:eol-style = native > > Added: > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/default/src/main/java/Test.java > URL: > http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/default/src/main/java/Test.java?rev=680188&view=auto > ============================================================================== > --- > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/default/src/main/java/Test.java > (added) > +++ > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/default/src/main/java/Test.java > Sun Jul 27 14:16:20 2008 > @@ -0,0 +1,28 @@ > +/* > + * 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. > + */ > + > +/** > + * Sample class with non-ascii characters: > + * {non-ascii chars delimiter}french: äëïöüà èìòù, greek: > αβγδεζηθ, japanese: 㠂㠄㠆㠈㠊{non-ascii chars delimiter} > + * > + * @author HervÃ(c) Boutemy > + */ > +public class Test > +{ > +} > > Propchange: > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/default/src/main/java/Test.java > ------------------------------------------------------------------------------ > svn:eol-style = native > > Added: > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/encoding/pom.xml > URL: > http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/encoding/pom.xml?rev=680188&view=auto > ============================================================================== > --- > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/encoding/pom.xml > (added) > +++ > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/encoding/pom.xml > Sun Jul 27 14:16:20 2008 > @@ -0,0 +1,36 @@ > +<!-- > + 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/maven-v4_0_0.xsd"> > + <modelVersion>4.0.0</modelVersion> > + <parent> > + <groupId>test</groupId> > + <artifactId>MJAVADOC-206</artifactId> > + <version>1.0-SNAPSHOT</version> > + </parent> > + <artifactId>encoding</artifactId> > + <packaging>jar</packaging> > + > + <name>encoding set</name> > + <description>project.reporting.outputEncoding should be used</description> > + > + <properties> > + > <project.reporting.outputEncoding>UTF-16</project.reporting.outputEncoding> > + </properties> > +</project> > \ No newline at end of file > > Propchange: > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/encoding/pom.xml > ------------------------------------------------------------------------------ > svn:eol-style = native > > Added: > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/encoding/src/main/java/Test.java > URL: > http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/encoding/src/main/java/Test.java?rev=680188&view=auto > ============================================================================== > --- > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/encoding/src/main/java/Test.java > (added) > +++ > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/encoding/src/main/java/Test.java > Sun Jul 27 14:16:20 2008 > @@ -0,0 +1,28 @@ > +/* > + * 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. > + */ > + > +/** > + * Sample class with non-ascii characters: > + * {non-ascii chars delimiter}french: äëïöüà èìòù, greek: > αβγδεζηθ, japanese: 㠂㠄㠆㠈㠊{non-ascii chars delimiter} > + * > + * @author HervÃ(c) Boutemy > + */ > +public class Test > +{ > +} > > Propchange: > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/encoding/src/main/java/Test.java > ------------------------------------------------------------------------------ > svn:eol-style = native > > Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/goals.txt > URL: > http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/goals.txt?rev=680188&view=auto > ============================================================================== > --- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/goals.txt > (added) > +++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/goals.txt > Sun Jul 27 14:16:20 2008 > @@ -0,0 +1 @@ > +javadoc:javadoc > \ No newline at end of file > > Propchange: > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/goals.txt > ------------------------------------------------------------------------------ > svn:eol-style = native > > Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/pom.xml > URL: > http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/pom.xml?rev=680188&view=auto > ============================================================================== > --- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/pom.xml > (added) > +++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/pom.xml Sun > Jul 27 14:16:20 2008 > @@ -0,0 +1,49 @@ > +<!-- > + 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/maven-v4_0_0.xsd"> > + <modelVersion>4.0.0</modelVersion> > + <groupId>test</groupId> > + <artifactId>MJAVADOC-206</artifactId> > + <packaging>pom</packaging> > + <version>1.0-SNAPSHOT</version> > + <name>Maven Javadoc output encoding Test</name> > + <modules> > + <module>default</module> > + <module>encoding</module> > + </modules> > + <build> > + <pluginManagement> > + <plugins> > + <plugin> > + <artifactId>maven-javadoc-plugin</artifactId> > + <version>@pom.version@</version> > + </plugin> > + <plugin> > + <artifactId>maven-site-plugin</artifactId> > + <version>2.0-beta-7</version> > + </plugin> > + </plugins> > + </pluginManagement> > + </build> > + > + <properties> > + <project.build.inputEncoding>UTF-8</project.build.inputEncoding> > + </properties> > +</project> > \ No newline at end of file > > Propchange: > maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/pom.xml > ------------------------------------------------------------------------------ > svn:eol-style = native > > Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/verify.bsh > URL: > http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/verify.bsh?rev=680188&view=auto > ============================================================================== > --- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/verify.bsh > (added) > +++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-206/verify.bsh > Sun Jul 27 14:16:20 2008 > @@ -0,0 +1,60 @@ > +/* > + * 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; > + > +boolean checkEncoding( String module, String encoding ) > +{ > + print( "module " + module + ", encoding " + encoding ); > + > + File source = new File( basedir, module + "/src/main/java/Test.java" ); > + File javadoc = new File( basedir, module + > "/target/site/apidocs/Test.html" ); > + > + String java = IOUtil.toString( new FileInputStream( source ), "UTF-8" > ); > + String html = IOUtil.toString( new FileInputStream( javadoc ), > encoding ); > + > + if ( html.indexOf( "text/html; charset=" + encoding ) < 0 ) > + { > + System.err.println( "charset not specified in content-type of " + > javadoc ); > + return false; > + } > + > + String javaChars = StringUtils.getNestedString( java, "{non-ascii chars > delimiter}" ); > + String htmlChars = StringUtils.getNestedString( html, "{non-ascii chars > delimiter}" ); > + > + print( "javaChars = " + javaChars ); > + print( "htmlChars = " + htmlChars ); > + > + return javaChars.equals( htmlChars ); > +} > + > +try > +{ > + result = checkEncoding( "default", "UTF-8") && checkEncoding( > "encoding", "UTF-16" ); > +} > +catch( IOException e ) > +{ > + e.printStackTrace(); > + result = false; > +} > + > +return result; > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]