Author: frankbille Date: Tue Nov 14 00:47:06 2006 New Revision: 474699 URL: http://svn.apache.org/viewvc?view=rev&rev=474699 Log: Backported ApacheLicenseHeaderTestCase. Added LicenseHeaderTest for wicket and wicket-extensions.
Added: incubator/wicket/branches/wicket-1.x/wicket-extensions/src/test/java/wicket/util/ incubator/wicket/branches/wicket-1.x/wicket-extensions/src/test/java/wicket/util/license/ incubator/wicket/branches/wicket-1.x/wicket-extensions/src/test/java/wicket/util/license/ApacheLicenceHeaderTest.java incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/AbstractLicenseHeaderHandler.java (with props) incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/ApacheLicenseHeaderTestCase.java (with props) incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/CssLicenseHeaderHandler.java (with props) incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/HtmlLicenseHeaderHandler.java (with props) incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/ILicenseHeaderHandler.java (with props) incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/JavaLicenseHeaderHandler.java (with props) incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/JavaScriptLicenseHeaderHandler.java (with props) incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/PropertiesLicenseHeaderHandler.java (with props) incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/VelocityLicenseHeaderHandler.java (with props) incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/XmlLicenseHeaderHandler.java (with props) incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/cssLicense.txt (with props) incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/javaLicense.txt (with props) incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/javaScriptLicense.txt (with props) incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/propertiesLicense.txt (with props) incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/velocityLicense.txt (with props) incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/xmlLicense.txt (with props) incubator/wicket/branches/wicket-1.x/wicket/src/test/java/wicket/util/license/ incubator/wicket/branches/wicket-1.x/wicket/src/test/java/wicket/util/license/ApacheLicenceHeaderTest.java (with props) Added: incubator/wicket/branches/wicket-1.x/wicket-extensions/src/test/java/wicket/util/license/ApacheLicenceHeaderTest.java URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket-extensions/src/test/java/wicket/util/license/ApacheLicenceHeaderTest.java?view=auto&rev=474699 ============================================================================== --- incubator/wicket/branches/wicket-1.x/wicket-extensions/src/test/java/wicket/util/license/ApacheLicenceHeaderTest.java (added) +++ incubator/wicket/branches/wicket-1.x/wicket-extensions/src/test/java/wicket/util/license/ApacheLicenceHeaderTest.java Tue Nov 14 00:47:06 2006 @@ -0,0 +1,31 @@ +/* + * $Id: org.eclipse.jdt.ui.prefs 5004 2006-03-17 20:47:08 -0800 (Fri, 17 Mar 2006) eelco12 $ + * $Revision: 5004 $ + * $Date: 2006-03-17 20:47:08 -0800 (Fri, 17 Mar 2006) $ + * + * ============================================================================== + * Licensed 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. + */ +package wicket.util.license; + +/** + * Test that the license headers are in place in this project. The tests are run + * from [EMAIL PROTECTED] ApacheLicenseHeaderTestCase}, but you can add project specific + * tests here if needed. + * + * @author Frank Bille Jensen (frankbille) + */ +public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase +{ + +} Added: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/AbstractLicenseHeaderHandler.java URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/AbstractLicenseHeaderHandler.java?view=auto&rev=474699 ============================================================================== --- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/AbstractLicenseHeaderHandler.java (added) +++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/AbstractLicenseHeaderHandler.java Tue Nov 14 00:47:06 2006 @@ -0,0 +1,137 @@ +/* + * 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. + */ +package wicket.util.license; + +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.LineNumberReader; +import java.net.URI; +import java.net.URL; + +import wicket.util.string.Strings; + +import junit.framework.Assert; + + +abstract class AbstractLicenseHeaderHandler implements ILicenseHeaderHandler +{ + protected static final String LINE_ENDING = System.getProperty("line.separator"); + private String licenseHeader; + private String[] ignoreFiles; + + /** + * Construct. + * + * @param ignoreFiles + */ + public AbstractLicenseHeaderHandler(String[] ignoreFiles) + { + this.ignoreFiles = ignoreFiles; + } + + public String[] getIgnoreFiles() + { + return ignoreFiles; + } + + public boolean addLicenseHeader(File file) + { + System.out.println("Not supported yet."); + return false; + } + + protected abstract String getLicenseHeaderFilename(); + + protected String getLicenseHeader() + { + if (Strings.isEmpty(licenseHeader)) + { + try + { + URL url = ApacheLicenseHeaderTestCase.class.getResource(getLicenseHeaderFilename()); + licenseHeader = new wicket.util.file.File(new URI(url.toString())).readString(); + licenseHeader = licenseHeader.trim(); + } + catch (Exception e) + { + Assert.fail(e.getMessage()); + + } + } + + return licenseHeader; + } + + protected String extractLicenseHeader(File file, int start, int length) + { + String header = ""; + FileReader fileReader = null; + + try + { + fileReader = new FileReader(file); + LineNumberReader lineNumberReader = new LineNumberReader(fileReader); + + for (int i = start; i < length; i++) + { + header += lineNumberReader.readLine() + LINE_ENDING; + } + } + catch (Exception e) + { + Assert.fail(e.getMessage()); + } + finally + { + if (fileReader != null) + { + try + { + fileReader.close(); + } + catch (IOException e) + { + Assert.fail(e.getMessage()); + } + } + } + + return header.trim(); + } + + /** + * Add the license header to the start of the file without caring about + * existing license headers. + * + * @param file + * The file to add the license header to. + */ + protected void prependLicenseHeader(File file) + { + try + { + String content = new wicket.util.file.File(file).readString(); + content = getLicenseHeader() + LINE_ENDING + content; + new wicket.util.file.File(file).write(content); + } + catch (Exception e) + { + Assert.fail(e.getMessage()); + } + } +} Propchange: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/AbstractLicenseHeaderHandler.java ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/ApacheLicenseHeaderTestCase.java URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/ApacheLicenseHeaderTestCase.java?view=auto&rev=474699 ============================================================================== --- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/ApacheLicenseHeaderTestCase.java (added) +++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/ApacheLicenseHeaderTestCase.java Tue Nov 14 00:47:06 2006 @@ -0,0 +1,292 @@ +/* + * 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. + */ +package wicket.util.license; + +import java.io.File; +import java.io.FileFilter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import junit.framework.TestCase; +import wicket.util.string.Strings; + +/** + * Testcase used in the different wicket projects for testing for the correct + * ASL license headers. Doesn't really make sense outside wicket. + * + * @author Frank Bille Jensen (frankbille) + */ +public abstract class ApacheLicenseHeaderTestCase extends TestCase +{ + private static final String LINE_ENDING = System.getProperty("line.separator"); + + static interface FileVisitor + { + /** + * @param file + */ + void visitFile(File file); + } + + private class SuffixAndIgnoreFileFilter implements FileFilter + { + private String[] suffixes; + private String[] ignoreFiles; + + private SuffixAndIgnoreFileFilter(String[] suffixes) + { + this(suffixes, null); + } + + private SuffixAndIgnoreFileFilter(String[] suffixes, String[] ignoreFiles) + { + this.suffixes = suffixes; + this.ignoreFiles = ignoreFiles; + } + + public boolean accept(File pathname) + { + boolean accept = false; + + if (pathname.isFile()) + { + if (ignoreFile(pathname) == false) + { + for (int i = 0; i < suffixes.length; i++) + { + String suffix = suffixes[i]; + + if (pathname.getName().endsWith("." + suffix)) + { + accept = true; + break; + } + } + } + } + + return accept; + } + + private boolean ignoreFile(File pathname) + { + boolean ignore = false; + + if (ignoreFiles != null) + { + String relativePathname = pathname.getAbsolutePath(); + relativePathname = Strings.replaceAll(relativePathname, + baseDirectory.getAbsolutePath() + System.getProperty("file.separator"), "") + .toString(); + + for (int i = 0; i < ignoreFiles.length; i++) + { + String ignorePath = ignoreFiles[i]; + File ignoreFile = new File(baseDirectory, ignorePath); + + // Directory ignore + if (ignoreFile.isDirectory()) + { + if (pathname.getAbsolutePath().startsWith(ignoreFile.getAbsolutePath())) + { + ignore = true; + break; + } + } + + // Absolute file + if (ignoreFile.isFile()) + { + if (relativePathname.equals(ignorePath)) + { + ignore = true; + break; + } + } + } + } + + return ignore; + } + } + + private class DirectoryFileFilter implements FileFilter + { + private String[] ignoreDirectory = new String[] { ".svn", "target" }; + + public boolean accept(File pathname) + { + boolean accept = false; + + if (pathname.isDirectory()) + { + boolean found = false; + for (int i = 0; i < ignoreDirectory.length; i++) + { + String ignore = ignoreDirectory[i]; + if (pathname.getName().equals(ignore)) + { + found = true; + break; + } + } + if (found == false) + { + accept = true; + } + } + + return accept; + } + } + + private ILicenseHeaderHandler[] licenseHeaderHandlers; + + private File baseDirectory = new File("").getAbsoluteFile(); + + protected String[] javaIgnore; + protected String[] htmlIgnore; + protected String[] propertiesIgnore; + protected String[] xmlIgnore; + protected String[] cssIgnore; + protected String[] velocityIgnore; + protected String[] javaScriptIgnore; + protected boolean addHeaders = false; + + /** + * Construct. + */ + public ApacheLicenseHeaderTestCase() + { + super("Test of the legal aspects of the Wicket source code is correct."); + } + + /** + * Test all the files in the project which has an associated + * [EMAIL PROTECTED] ILicenseHeaderHandler}. + */ + public void testLicenseHeaders() + { + licenseHeaderHandlers = new ILicenseHeaderHandler[] { + new JavaLicenseHeaderHandler(javaIgnore), + new JavaScriptLicenseHeaderHandler(javaScriptIgnore), + new XmlLicenseHeaderHandler(xmlIgnore), + new PropertiesLicenseHeaderHandler(propertiesIgnore), + new CssLicenseHeaderHandler(cssIgnore), new HtmlLicenseHeaderHandler(htmlIgnore), + new VelocityLicenseHeaderHandler(velocityIgnore) }; + + final Map/* <ILicenseHeaderHandler, List<File>> */badFiles = new HashMap/* + * <ILicenseHeaderHandler, + * List<File>> + */(); + + for (int i = 0; i < licenseHeaderHandlers.length; i++) + { + final ILicenseHeaderHandler licenseHeaderHandler = licenseHeaderHandlers[i]; + + visitFiles(licenseHeaderHandler.getSuffixes(), licenseHeaderHandler.getIgnoreFiles(), + new FileVisitor() + { + public void visitFile(File file) + { + if (licenseHeaderHandler.checkLicenseHeader(file) == false) + { + if (addHeaders == false + || licenseHeaderHandler.addLicenseHeader(file) == false) + { + List/* <File> */files = (List)badFiles.get(licenseHeaderHandler); + + if (files == null) + { + files = new ArrayList/* <File> */(); + badFiles.put(licenseHeaderHandler, files); + } + + files.add(file); + } + } + } + }); + } + + failIncorrectLicenceHeaders(badFiles); + } + + private void failIncorrectLicenceHeaders(Map/* <ILicenseHeaderHandler, List<File>> */files) + { + if (files.size() > 0) + { + StringBuffer failString = new StringBuffer(); + + for (Iterator iter = files.keySet().iterator(); iter.hasNext();) + { + ILicenseHeaderHandler licenseHeaderHandler = (ILicenseHeaderHandler)iter.next(); + + failString.append("\n"); + failString.append(licenseHeaderHandler.getClass().getName()); + failString.append(" failed. The following files("); + failString.append(((List)files.get(licenseHeaderHandler)).size()); + failString.append(") didn't have correct license header:\n"); + + List/* <File> */fileList = (List)files.get(licenseHeaderHandler); + for (Iterator iterator = fileList.iterator(); iterator.hasNext();) + { + File file = (File)iterator.next(); + failString.append(file.getAbsolutePath()).append(LINE_ENDING); + } + } + + System.out.println(failString); + fail(failString.toString()); + } + } + + private void visitFiles(String[] suffixes, String[] ignoreFiles, FileVisitor fileVisitor) + { + visitDirectory(suffixes, ignoreFiles, baseDirectory, fileVisitor); + } + + private void visitDirectory(String[] suffixes, String[] ignoreFiles, File directory, + FileVisitor fileVisitor) + { + File[] files = directory.listFiles(new SuffixAndIgnoreFileFilter(suffixes, ignoreFiles)); + + if (files != null) + { + for (int i = 0; i < files.length; i++) + { + File file = files[i]; + fileVisitor.visitFile(file); + } + } + + // Find the directories in this directory on traverse deeper + files = directory.listFiles(new DirectoryFileFilter()); + + if (files != null) + { + for (int i = 0; i < files.length; i++) + { + File childDirectory = files[i]; + visitDirectory(suffixes, ignoreFiles, childDirectory, fileVisitor); + } + } + } +} Propchange: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/ApacheLicenseHeaderTestCase.java ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/CssLicenseHeaderHandler.java URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/CssLicenseHeaderHandler.java?view=auto&rev=474699 ============================================================================== --- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/CssLicenseHeaderHandler.java (added) +++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/CssLicenseHeaderHandler.java Tue Nov 14 00:47:06 2006 @@ -0,0 +1,73 @@ +/* + * 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. + */ +package wicket.util.license; + +import java.io.File; + +import junit.framework.Assert; +import wicket.util.diff.Diff; +import wicket.util.diff.Revision; + +class CssLicenseHeaderHandler extends AbstractLicenseHeaderHandler +{ + + /** + * Construct. + * + * @param ignoreFiles + */ + public CssLicenseHeaderHandler(String[] ignoreFiles) + { + super(ignoreFiles); + } + + protected String getLicenseHeaderFilename() + { + return "cssLicense.txt"; + } + + public boolean checkLicenseHeader(File file) + { + Revision revision = null; + + try + { + String header = extractLicenseHeader(file, 0, 16); + + revision = Diff.diff(getLicenseHeader().split(LINE_ENDING), header.split(LINE_ENDING)); + } + catch (Exception e) + { + Assert.fail(e.getMessage()); + } + + return revision.size() == 0; + } + + public String[] getSuffixes() + { + return new String[] { "css" }; + } + + public boolean addLicenseHeader(File file) + { + prependLicenseHeader(file); + + return true; + } + +} Propchange: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/CssLicenseHeaderHandler.java ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/HtmlLicenseHeaderHandler.java URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/HtmlLicenseHeaderHandler.java?view=auto&rev=474699 ============================================================================== --- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/HtmlLicenseHeaderHandler.java (added) +++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/HtmlLicenseHeaderHandler.java Tue Nov 14 00:47:06 2006 @@ -0,0 +1,35 @@ +/* + * 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. + */ +package wicket.util.license; + +class HtmlLicenseHeaderHandler extends XmlLicenseHeaderHandler +{ + /** + * Construct. + * + * @param ignoreFiles + */ + public HtmlLicenseHeaderHandler(String[] ignoreFiles) + { + super(ignoreFiles); + } + + public String[] getSuffixes() + { + return new String[] { "html" }; + } +} Propchange: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/HtmlLicenseHeaderHandler.java ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/ILicenseHeaderHandler.java URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/ILicenseHeaderHandler.java?view=auto&rev=474699 ============================================================================== --- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/ILicenseHeaderHandler.java (added) +++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/ILicenseHeaderHandler.java Tue Nov 14 00:47:06 2006 @@ -0,0 +1,45 @@ +/* + * 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. + */ +package wicket.util.license; + +import java.io.File; + +interface ILicenseHeaderHandler +{ + /** + * @return The suffixes that matches the files that it handles. + */ + String[] getSuffixes(); + + /** + * @return The files to ignore. + */ + String[] getIgnoreFiles(); + + /** + * @param file Add a license header to the file. + * @return True if the license were added. False if not. + */ + boolean addLicenseHeader(File file); + + /** + * @param file The file to check for a correct license header. + * @return True if the file has a correct license header. False if not. + */ + boolean checkLicenseHeader(File file); + +} Propchange: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/ILicenseHeaderHandler.java ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/JavaLicenseHeaderHandler.java URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/JavaLicenseHeaderHandler.java?view=auto&rev=474699 ============================================================================== --- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/JavaLicenseHeaderHandler.java (added) +++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/JavaLicenseHeaderHandler.java Tue Nov 14 00:47:06 2006 @@ -0,0 +1,94 @@ +/* + * 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. + */ +package wicket.util.license; + +import java.io.File; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import wicket.util.string.Strings; + +import junit.framework.Assert; + +class JavaLicenseHeaderHandler extends AbstractLicenseHeaderHandler +{ + private Pattern javaHeaderPattern = Pattern.compile("^(.*?)package.*$", Pattern.MULTILINE + | Pattern.DOTALL); + + /** + * Construct. + * + * @param ignoreFiles + */ + public JavaLicenseHeaderHandler(String[] ignoreFiles) + { + super(ignoreFiles); + } + + public boolean addLicenseHeader(File file) + { + boolean added = false; + + try + { + String fileContent = new wicket.util.file.File(file).readString(); + + Matcher mat = javaHeaderPattern.matcher(fileContent); + if (mat.matches()) + { + String header = mat.group(1); + if (header.equals(getLicenseHeader()) == false) + { + String newContent = Strings.replaceAll(fileContent, header, "").toString(); + newContent = getLicenseHeader().trim() + LINE_ENDING + newContent; + new wicket.util.file.File(file).write(newContent); + + added = true; + } + } + else + { + Assert.fail(); + } + } + catch (Exception e) + { + e.printStackTrace(); + Assert.fail(e.getMessage()); + } + + return added; + } + + public boolean checkLicenseHeader(File file) + { + String header = extractLicenseHeader(file, 0, 16); + + return getLicenseHeader().equals(header); + } + + public String[] getSuffixes() + { + return new String[] { "java" }; + } + + protected String getLicenseHeaderFilename() + { + return "javaLicense.txt"; + } + +} Propchange: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/JavaLicenseHeaderHandler.java ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/JavaScriptLicenseHeaderHandler.java URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/JavaScriptLicenseHeaderHandler.java?view=auto&rev=474699 ============================================================================== --- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/JavaScriptLicenseHeaderHandler.java (added) +++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/JavaScriptLicenseHeaderHandler.java Tue Nov 14 00:47:06 2006 @@ -0,0 +1,57 @@ +/* + * 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. + */ +package wicket.util.license; + +import java.io.File; + +class JavaScriptLicenseHeaderHandler extends AbstractLicenseHeaderHandler +{ + + /** + * Construct. + * @param ignoreFiles + */ + public JavaScriptLicenseHeaderHandler(String[] ignoreFiles) + { + super(ignoreFiles); + } + + protected String getLicenseHeaderFilename() + { + return "javaScriptLicense.txt"; + } + + public boolean checkLicenseHeader(File file) + { + String header = extractLicenseHeader(file, 0, 16); + + return getLicenseHeader().equals(header); + } + + public String[] getSuffixes() + { + return new String[]{"js"}; + } + + public boolean addLicenseHeader(File file) + { + prependLicenseHeader(file); + + return true; + } + +} Propchange: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/JavaScriptLicenseHeaderHandler.java ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/PropertiesLicenseHeaderHandler.java URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/PropertiesLicenseHeaderHandler.java?view=auto&rev=474699 ============================================================================== --- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/PropertiesLicenseHeaderHandler.java (added) +++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/PropertiesLicenseHeaderHandler.java Tue Nov 14 00:47:06 2006 @@ -0,0 +1,72 @@ +/* + * 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. + */ +package wicket.util.license; + +import java.io.File; + +import junit.framework.Assert; +import wicket.util.diff.Diff; +import wicket.util.diff.Revision; + +class PropertiesLicenseHeaderHandler extends AbstractLicenseHeaderHandler +{ + /** + * Construct. + * + * @param ignoreFiles + */ + public PropertiesLicenseHeaderHandler(String[] ignoreFiles) + { + super(ignoreFiles); + } + + protected String getLicenseHeaderFilename() + { + return "propertiesLicense.txt"; + } + + public boolean checkLicenseHeader(File file) + { + Revision revision = null; + + try + { + String header = extractLicenseHeader(file, 0, 14); + + revision = Diff.diff(getLicenseHeader().split(LINE_ENDING), header.split(LINE_ENDING)); + } + catch (Exception e) + { + Assert.fail(e.getMessage()); + } + + return revision.size() == 0; + } + + public String[] getSuffixes() + { + return new String[] { "properties" }; + } + + public boolean addLicenseHeader(File file) + { + prependLicenseHeader(file); + + return true; + } + +} Propchange: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/PropertiesLicenseHeaderHandler.java ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/VelocityLicenseHeaderHandler.java URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/VelocityLicenseHeaderHandler.java?view=auto&rev=474699 ============================================================================== --- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/VelocityLicenseHeaderHandler.java (added) +++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/VelocityLicenseHeaderHandler.java Tue Nov 14 00:47:06 2006 @@ -0,0 +1,72 @@ +/* + * 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. + */ +package wicket.util.license; + +import java.io.File; + +import junit.framework.Assert; +import wicket.util.diff.Diff; +import wicket.util.diff.Revision; + +class VelocityLicenseHeaderHandler extends AbstractLicenseHeaderHandler +{ + /** + * Construct. + * + * @param ignoreFiles + */ + public VelocityLicenseHeaderHandler(String[] ignoreFiles) + { + super(ignoreFiles); + } + + protected String getLicenseHeaderFilename() + { + return "velocityLicense.txt"; + } + + public boolean checkLicenseHeader(File file) + { + Revision revision = null; + + try + { + String header = extractLicenseHeader(file, 0, 16); + + revision = Diff.diff(getLicenseHeader().split(LINE_ENDING), header.split(LINE_ENDING)); + } + catch (Exception e) + { + Assert.fail(e.getMessage()); + } + + return revision.size() == 0; + } + + public String[] getSuffixes() + { + return new String[] { "vm" }; + } + + public boolean addLicenseHeader(File file) + { + prependLicenseHeader(file); + + return true; + } + +} Propchange: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/VelocityLicenseHeaderHandler.java ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/XmlLicenseHeaderHandler.java URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/XmlLicenseHeaderHandler.java?view=auto&rev=474699 ============================================================================== --- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/XmlLicenseHeaderHandler.java (added) +++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/XmlLicenseHeaderHandler.java Tue Nov 14 00:47:06 2006 @@ -0,0 +1,127 @@ +/* + * 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. + */ +package wicket.util.license; + +import java.io.File; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import junit.framework.Assert; +import wicket.util.diff.Diff; +import wicket.util.diff.Revision; +import wicket.util.string.Strings; + +class XmlLicenseHeaderHandler extends AbstractLicenseHeaderHandler +{ + private Pattern xmlHeader = Pattern.compile("^(\\<\\?xml[^"+LINE_ENDING+"]+?)"+LINE_ENDING+"(.*)$", Pattern.DOTALL | Pattern.MULTILINE); + + /** + * Construct. + * + * @param ignoreFiles + */ + public XmlLicenseHeaderHandler(String[] ignoreFiles) + { + super(ignoreFiles); + } + + protected String getLicenseHeaderFilename() + { + return "xmlLicense.txt"; + } + + public boolean checkLicenseHeader(File file) + { + Revision revision = null; + + try + { + String header = extractLicenseHeader(file, 0, 17); + + if (header.startsWith("<?xml")) + { + header = header.substring(header.indexOf(LINE_ENDING) + 1); + } + else + { + // Then only take the first 16 lines + String[] headers = header.split(LINE_ENDING); + header = ""; + for (int i = 0; i < 16 && i < headers.length; i++) + { + if (header.length() > 0) + { + header += LINE_ENDING; + } + header += headers[i]; + } + } + + revision = Diff.diff(getLicenseHeader().split(LINE_ENDING), header.split(LINE_ENDING)); + } + catch (Exception e) + { + e.printStackTrace(); + Assert.fail(e.getMessage()); + } + + return revision.size() == 0; + } + + public String[] getSuffixes() + { + return new String[] { "xml", "fml" }; + } + + public boolean addLicenseHeader(File file) + { + boolean added = false; + + try + { + String content = new wicket.util.file.File(file).readString(); + String xml = ""; + StringBuffer newContent = new StringBuffer(); + + Matcher mat = xmlHeader.matcher(content); + if (mat.matches()) + { + xml = mat.group(1); + content = mat.group(2); + } + + if (Strings.isEmpty(xml) == false) + { + newContent.append(xml).append(LINE_ENDING); + } + + newContent.append(getLicenseHeader()).append(LINE_ENDING); + newContent.append(content); + + new wicket.util.file.File(file).write(newContent.toString()); + added = true; + } + catch (Exception e) + { + Assert.fail(e.getMessage()); + } + + return added; + } + + +} Propchange: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/XmlLicenseHeaderHandler.java ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/cssLicense.txt URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/cssLicense.txt?view=auto&rev=474699 ============================================================================== --- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/cssLicense.txt (added) +++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/cssLicense.txt Tue Nov 14 00:47:06 2006 @@ -0,0 +1,16 @@ +/* + * 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. + */ \ No newline at end of file Propchange: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/cssLicense.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/javaLicense.txt URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/javaLicense.txt?view=auto&rev=474699 ============================================================================== --- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/javaLicense.txt (added) +++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/javaLicense.txt Tue Nov 14 00:47:06 2006 @@ -0,0 +1,16 @@ +/* + * 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. + */ \ No newline at end of file Propchange: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/javaLicense.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/javaScriptLicense.txt URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/javaScriptLicense.txt?view=auto&rev=474699 ============================================================================== --- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/javaScriptLicense.txt (added) +++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/javaScriptLicense.txt Tue Nov 14 00:47:06 2006 @@ -0,0 +1,16 @@ +/* + * 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. + */ \ No newline at end of file Propchange: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/javaScriptLicense.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/propertiesLicense.txt URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/propertiesLicense.txt?view=auto&rev=474699 ============================================================================== --- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/propertiesLicense.txt (added) +++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/propertiesLicense.txt Tue Nov 14 00:47:06 2006 @@ -0,0 +1,14 @@ +# 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. \ No newline at end of file Propchange: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/propertiesLicense.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/velocityLicense.txt URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/velocityLicense.txt?view=auto&rev=474699 ============================================================================== --- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/velocityLicense.txt (added) +++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/velocityLicense.txt Tue Nov 14 00:47:06 2006 @@ -0,0 +1,16 @@ +#* + * 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. + *# \ No newline at end of file Propchange: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/velocityLicense.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/xmlLicense.txt URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/xmlLicense.txt?view=auto&rev=474699 ============================================================================== --- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/xmlLicense.txt (added) +++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/xmlLicense.txt Tue Nov 14 00:47:06 2006 @@ -0,0 +1,16 @@ +<!-- + 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. +--> \ No newline at end of file Propchange: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/license/xmlLicense.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/wicket/branches/wicket-1.x/wicket/src/test/java/wicket/util/license/ApacheLicenceHeaderTest.java URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/test/java/wicket/util/license/ApacheLicenceHeaderTest.java?view=auto&rev=474699 ============================================================================== --- incubator/wicket/branches/wicket-1.x/wicket/src/test/java/wicket/util/license/ApacheLicenceHeaderTest.java (added) +++ incubator/wicket/branches/wicket-1.x/wicket/src/test/java/wicket/util/license/ApacheLicenceHeaderTest.java Tue Nov 14 00:47:06 2006 @@ -0,0 +1,31 @@ +/* + * $Id: org.eclipse.jdt.ui.prefs 5004 2006-03-17 20:47:08 -0800 (Fri, 17 Mar 2006) eelco12 $ + * $Revision: 5004 $ + * $Date: 2006-03-17 20:47:08 -0800 (Fri, 17 Mar 2006) $ + * + * ============================================================================== + * Licensed 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. + */ +package wicket.util.license; + +/** + * Test that the license headers are in place in this project. The tests are run + * from [EMAIL PROTECTED] ApacheLicenseHeaderTestCase}, but you can add project specific + * tests here if needed. + * + * @author Frank Bille Jensen (frankbille) + */ +public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase +{ + +} Propchange: incubator/wicket/branches/wicket-1.x/wicket/src/test/java/wicket/util/license/ApacheLicenceHeaderTest.java ------------------------------------------------------------------------------ svn:eol-style = native