Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/AddDependencySetsTaskTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/AddDependencySetsTaskTest.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/AddDependencySetsTaskTest.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/AddDependencySetsTaskTest.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.archive.task; +/* + * 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 org.apache.maven.artifact.Artifact; import org.apache.maven.model.Model; import org.apache.maven.plugin.assembly.InvalidAssemblerConfigurationException;
Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/AddDirectoryTaskTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/AddDirectoryTaskTest.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/AddDirectoryTaskTest.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/AddDirectoryTaskTest.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.archive.task; +/* + * 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.File; import java.io.IOException; import java.util.Collections; Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/AddFileSetsTaskTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/AddFileSetsTaskTest.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/AddFileSetsTaskTest.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/AddFileSetsTaskTest.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.archive.task; +/* + * 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 org.apache.maven.model.Model; import org.apache.maven.plugin.assembly.archive.ArchiveCreationException; import org.apache.maven.plugin.assembly.archive.task.testutils.MockAndControlForAddFileSetsTask; Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/ArtifactMock.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/ArtifactMock.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/ArtifactMock.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/ArtifactMock.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.archive.task.testutils; +/* + * 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 org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.plugin.assembly.testutils.MockManager; Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/MockAndControlForAddArtifactTask.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/MockAndControlForAddArtifactTask.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/MockAndControlForAddArtifactTask.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/MockAndControlForAddArtifactTask.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.archive.task.testutils; +/* + * 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 org.apache.maven.plugin.assembly.AssemblerConfigurationSource; import org.apache.maven.plugin.assembly.testutils.MockManager; import org.apache.maven.project.MavenProject; Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/MockAndControlForAddDependencySetsTask.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/MockAndControlForAddDependencySetsTask.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/MockAndControlForAddDependencySetsTask.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/MockAndControlForAddDependencySetsTask.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.archive.task.testutils; +/* + * 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 org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.ArtifactNotFoundException; import org.apache.maven.artifact.resolver.ArtifactResolutionException; Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/MockAndControlForAddFileSetsTask.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/MockAndControlForAddFileSetsTask.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/MockAndControlForAddFileSetsTask.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/MockAndControlForAddFileSetsTask.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.archive.task.testutils; +/* + * 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 org.apache.maven.plugin.assembly.AssemblerConfigurationSource; import org.apache.maven.plugin.assembly.testutils.MockManager; import org.apache.maven.plugin.assembly.testutils.TestFileManager; Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/MockAndControlForArtifact.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/MockAndControlForArtifact.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/MockAndControlForArtifact.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/MockAndControlForArtifact.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.archive.task.testutils; +/* + * 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 org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.plugin.assembly.testutils.MockManager; Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/filter/ComponentsXmlArchiverFileFilterTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/filter/ComponentsXmlArchiverFileFilterTest.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/filter/ComponentsXmlArchiverFileFilterTest.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/filter/ComponentsXmlArchiverFileFilterTest.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.filter; +/* + * 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.File; import java.io.FileOutputStream; import java.io.IOException; Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/format/FileFormatterTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/format/FileFormatterTest.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/format/FileFormatterTest.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/format/FileFormatterTest.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.format; +/* + * 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.File; import java.io.IOException; import java.util.ArrayList; @@ -52,7 +71,7 @@ File tempRoot = new File(basedir, "tempdir"); configSource.getTemporaryRootDirectory(); configSourceControl.setReturnValue( tempRoot ); - + File file = fileManager.createFile( basedir, "one.txt", "This is a\ntest." ); mockManager.replayAll(); @@ -60,11 +79,11 @@ File result = new FileFormatter( configSource, logger ).format( file, false, "dos" ); assertTrue( !file.equals(result) ); - - mockManager.verifyAll(); + + mockManager.verifyAll(); } - + public void testShouldNotTransformOneFile() throws IOException, AssemblyFormattingException { @@ -77,9 +96,9 @@ // model.setArtifactId( "artifact" ); // model.setGroupId( "group" ); // model.setVersion( "version" ); - // + // // MavenProject project = new MavenProject( model ); - // + // // configSource.getProject(); // configSourceControl.setReturnValue( project ); Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/format/FileSetFormatterTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/format/FileSetFormatterTest.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/format/FileSetFormatterTest.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/format/FileSetFormatterTest.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.format; +/* + * 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 junit.framework.TestCase; import org.apache.maven.model.Model; import org.apache.maven.plugin.assembly.AssemblerConfigurationSource; Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolatorTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolatorTest.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolatorTest.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolatorTest.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.interpolation; +/* + * 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 org.apache.maven.model.Model; import org.apache.maven.plugin.assembly.model.Assembly; import org.apache.maven.plugin.assembly.model.DependencySet; Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/io/DefaultAssemblyReaderTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/io/DefaultAssemblyReaderTest.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/io/DefaultAssemblyReaderTest.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/io/DefaultAssemblyReaderTest.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.io; +/* + * 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 org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.model.Model; Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/MockManager.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/MockManager.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/MockManager.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/MockManager.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.testutils; +/* + * 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.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -8,35 +27,35 @@ public class MockManager { - + private List mockControls = new ArrayList(); - + public void add( MockControl control ) { mockControls.add( control ); } - + public void clear() { mockControls.clear(); } - + public void replayAll() { for ( Iterator it = mockControls.iterator(); it.hasNext(); ) { MockControl control = (MockControl) it.next(); - + control.replay(); } } - + public void verifyAll() { for ( Iterator it = mockControls.iterator(); it.hasNext(); ) { MockControl control = (MockControl) it.next(); - + control.verify(); } } Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/TestFileManager.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/TestFileManager.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/TestFileManager.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/TestFileManager.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.testutils; +/* + * 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 org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.IOUtil; Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/TestUtils.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/TestUtils.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/TestUtils.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/TestUtils.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.testutils; +/* + * 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.BufferedReader; import java.io.File; import java.io.FileReader; Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/AssemblyFileUtilsTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/AssemblyFileUtilsTest.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/AssemblyFileUtilsTest.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/AssemblyFileUtilsTest.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.utils; +/* + * 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.File; import java.io.FileReader; import java.io.IOException; Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtilsTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtilsTest.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtilsTest.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtilsTest.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.utils; +/* + * 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 org.apache.maven.model.Build; import org.apache.maven.model.Model; import org.apache.maven.plugin.assembly.AssemblerConfigurationSource; Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/FilterUtilsTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/FilterUtilsTest.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/FilterUtilsTest.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/FilterUtilsTest.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.utils; +/* + * 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 org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.resolver.filter.ArtifactFilter; import org.apache.maven.model.Model; @@ -37,48 +56,48 @@ logger = new ConsoleLogger( Logger.LEVEL_DEBUG, "test" ); } - + public void testFilterArtifacts_ShouldThrowExceptionUsingStrictModeWithUnmatchedInclude() { MockControl artifactCtl = MockControl.createControl( Artifact.class ); Artifact artifact = (Artifact) artifactCtl.getMock(); - + mockManager.add( artifactCtl ); - + artifact.getGroupId(); artifactCtl.setReturnValue( "group", MockControl.ONE_OR_MORE ); - + artifact.getArtifactId(); artifactCtl.setReturnValue( "artifact", MockControl.ONE_OR_MORE ); - + artifact.getId(); artifactCtl.setReturnValue( "group:artifact:type:version", MockControl.ONE_OR_MORE ); artifact.getDependencyConflictId(); artifactCtl.setReturnValue( "group:artifact:type", MockControl.ONE_OR_MORE ); - + List includes = new ArrayList(); - + includes.add( "other.group:other-artifact:type:version" ); - + List excludes = Collections.EMPTY_LIST; - + Set artifacts = new HashSet(); artifacts.add( artifact ); - + mockManager.replayAll(); - + try { FilterUtils.filterArtifacts( artifacts, includes, excludes, true, false, Collections.EMPTY_LIST, logger ); - + fail( "Should fail because of unmatched include." ); } catch ( InvalidAssemblerConfigurationException e ) { // expected. } - + mockManager.verifyAll(); } Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/ProjectUtilsTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/ProjectUtilsTest.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/ProjectUtilsTest.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/ProjectUtilsTest.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.utils; +/* + * 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.File; import java.io.IOException; import java.util.ArrayList; @@ -141,7 +160,7 @@ List verify = new ArrayList( projects ); verify.remove( master ); verify.remove( subModule ); - + verifyProjectsPresent( verify, result ); } Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/PropertiesInterpolationValueSourceTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/PropertiesInterpolationValueSourceTest.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/PropertiesInterpolationValueSourceTest.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/PropertiesInterpolationValueSourceTest.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.utils; +/* + * 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.util.Properties; import junit.framework.TestCase; @@ -8,27 +27,27 @@ public class PropertiesInterpolationValueSourceTest extends TestCase { - + public void testShouldRetrievePropertyValueForKey() { Properties props = new Properties(); props.setProperty( "key", "value" ); - + assertEquals( "value", new PropertiesInterpolationValueSource( props ).getValue( "key" ) ); } - + public void testShouldRetrievePropertyValueForKeyWithDot() { Properties props = new Properties(); props.setProperty( "key.with.dot", "value" ); - + assertEquals( "value", new PropertiesInterpolationValueSource( props ).getValue( "key.with.dot" ) ); } public void testShouldRetrieveNullValueForMissingKey() { Properties props = new Properties(); - + assertNull( new PropertiesInterpolationValueSource( props ).getValue( "key" ) ); } Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/PropertyUtilsTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/PropertyUtilsTest.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/PropertyUtilsTest.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/PropertyUtilsTest.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.utils; +/* + * 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 org.codehaus.plexus.util.IOUtil; import java.io.File; @@ -71,7 +90,7 @@ Properties props = new Properties(); props.setProperty( "key", "value" ); props.setProperty( "key2", "${user.name}" ); - + String userName = System.getProperty( "user.name" ); File propsFile = getTempFile(); @@ -89,7 +108,7 @@ Properties props = new Properties(); props.setProperty( "key", "value" ); props.setProperty( "key2", "${__properties.user.name}" ); - + String userName = System.getProperty( "user.name" ); File propsFile = getTempFile(); Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/TypeConversionUtilsTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/TypeConversionUtilsTest.java?rev=610981&r1=610980&r2=610981&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/TypeConversionUtilsTest.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/TypeConversionUtilsTest.java Thu Jan 10 15:10:00 2008 @@ -1,5 +1,24 @@ package org.apache.maven.plugin.assembly.utils; +/* + * 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 org.apache.maven.plugin.assembly.format.AssemblyFormattingException; import org.codehaus.plexus.logging.Logger; import org.codehaus.plexus.logging.console.ConsoleLogger; @@ -54,36 +73,36 @@ List messages = new ArrayList( 2 ); messages.add( "World has write access, but user does not." ); messages.add( "World has write access, but group does not." ); - + checkFileModeSanity( "002", false, messages ); } - + public void testVerifyModeSanity_WarnOnNonsensicalOctalValue_020() { List messages = new ArrayList( 1 ); messages.add( "Group has write access, but user does not." ); - + checkFileModeSanity( "020", false, messages ); } - + public void testVerifyModeSanity_ReturnTrueForValidOctalValue_775() { checkFileModeSanity( "775", true, Collections.EMPTY_LIST ); } - + private void checkFileModeSanity( String mode, boolean isSane, List messagesToCheckIfInsane ) { StringOutputStream sos = new StringOutputStream(); PrintStream ps = new PrintStream( sos ); - + PrintStream oldOut = System.out; PrintStream oldErr = System.err; - + try { System.setOut( ps ); System.setErr( ps ); - + assertEquals( "Mode sanity should be: " + isSane, isSane, TypeConversionUtils.verifyModeSanity( Integer.parseInt( mode, 8 ), new ConsoleLogger( Logger.LEVEL_WARN, "test" ) ) ); } finally @@ -91,15 +110,15 @@ System.setOut( oldOut ); System.setErr( oldErr ); } - + if ( !isSane && messagesToCheckIfInsane != null && !messagesToCheckIfInsane.isEmpty() ) { String message = sos.toString(); - + for ( Iterator it = messagesToCheckIfInsane.iterator(); it.hasNext(); ) { String checkMessage = (String) it.next(); - + assertTrue( "\'" + checkMessage + "\' is not present in output.", message.indexOf( checkMessage ) > -1 ); } }