This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-apache-resources.git
The following commit(s) were added to refs/heads/master by this push:
new 98344fb [MASFRES-63] upgrade parent to 40-SNAPSHOT
98344fb is described below
commit 98344fb84f88fad3d0daa0d2543030c069dfa054
Author: Hervé Boutemy <[email protected]>
AuthorDate: Sat Mar 11 17:01:52 2023 +0100
[MASFRES-63] upgrade parent to 40-SNAPSHOT
---
.../pom.xml | 8 +-
apache-jar-resource-bundle/pom.xml | 8 +-
apache-jar-txt-resource-bundle/pom.xml | 10 +-
apache-license-header-resource-bundle/pom.xml | 8 +-
apache-source-release-assembly-descriptor/pom.xml | 26 ++-
.../apache/its/IT_000_BasicArchiveCreation.java | 100 +++++-----
.../its/IT_001_ExcludeBuildOutputDirectory.java | 96 ++++++----
...IT_002_IncludeSrcDirWithBuildOutputDirName.java | 96 +++++-----
.../apache/its/IT_003_SharedResourceInclusion.java | 98 +++++-----
.../java/org/apache/its/IT_004_IdeExcludes.java | 118 ++++++------
.../apache/its/IT_005_MiscellaneousExcludes.java | 84 +++++----
.../its/IT_ExcludeSrcDirWithinBuildOutputDir.java | 108 ++++++-----
.../apache/its/IT_IncludeIdeFilesWithinSrcDir.java | 134 ++++++++------
.../java/org/apache/its/IT_ZipAndTarCreation.java | 102 ++++++-----
.../test/java/org/apache/its/util/TestUtils.java | 203 +++++++++------------
15 files changed, 647 insertions(+), 552 deletions(-)
diff --git a/apache-incubator-disclaimer-resource-bundle/pom.xml
b/apache-incubator-disclaimer-resource-bundle/pom.xml
index 36e9423..b6f055a 100644
--- a/apache-incubator-disclaimer-resource-bundle/pom.xml
+++ b/apache-incubator-disclaimer-resource-bundle/pom.xml
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
-
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
@@ -18,23 +17,20 @@
~ specific language governing permissions and limitations
~ under the License.
-->
-
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.apache.resources</groupId>
<artifactId>apache-resource-bundles</artifactId>
- <version>4</version>
+ <version>40-SNAPSHOT</version>
</parent>
<artifactId>apache-incubator-disclaimer-resource-bundle</artifactId>
<version>1.2-SNAPSHOT</version>
<name>Apache Incubator Disclaimer Resource Bundle</name>
- <description>
- An archive which contains the standard Apache Incubator disclaimer.
- </description>
+ <description>An archive which contains the standard Apache Incubator
disclaimer.</description>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/maven/resources/trunk/apache-incubator-disclaimer-resource-bundle</connection>
diff --git a/apache-jar-resource-bundle/pom.xml
b/apache-jar-resource-bundle/pom.xml
index 35d79f6..6438e71 100644
--- a/apache-jar-resource-bundle/pom.xml
+++ b/apache-jar-resource-bundle/pom.xml
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
-
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
@@ -18,23 +17,20 @@
~ specific language governing permissions and limitations
~ under the License.
-->
-
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.apache.resources</groupId>
<artifactId>apache-resource-bundles</artifactId>
- <version>4</version>
+ <version>40-SNAPSHOT</version>
</parent>
<artifactId>apache-jar-resource-bundle</artifactId>
<version>1.5-SNAPSHOT</version>
<name>Apache JAR Resource Bundle</name>
- <description>
- An archive which contains templates for generating the necessary license
files and notices for all Apache releases.
- </description>
+ <description>An archive which contains templates for generating the
necessary license files and notices for all Apache releases.</description>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/maven/resources/trunk/apache-jar-resource-bundle</connection>
diff --git a/apache-jar-txt-resource-bundle/pom.xml
b/apache-jar-txt-resource-bundle/pom.xml
index 779301b..70f81cf 100644
--- a/apache-jar-txt-resource-bundle/pom.xml
+++ b/apache-jar-txt-resource-bundle/pom.xml
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
-
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
@@ -18,24 +17,21 @@
~ specific language governing permissions and limitations
~ under the License.
-->
-
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.apache.resources</groupId>
<artifactId>apache-resource-bundles</artifactId>
- <version>4</version>
+ <version>40-SNAPSHOT</version>
</parent>
<artifactId>apache-jar-txt-resource-bundle</artifactId>
<version>1.5-SNAPSHOT</version>
<name>Apache JAR (.txt) Resource Bundle</name>
- <description>
- An archive which contains templates for generating the necessary license
files and notices for all Apache releases.
- Generated files use the .txt file extension as an alternative,
no-extension files found in apache-jar-resource-bundle.
- </description>
+ <description>An archive which contains templates for generating the
necessary license files and notices for all Apache releases.
+ Generated files use the .txt file extension as an alternative,
no-extension files found in apache-jar-resource-bundle.</description>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/maven/resources/trunk/apache-jar-txt-resource-bundle</connection>
diff --git a/apache-license-header-resource-bundle/pom.xml
b/apache-license-header-resource-bundle/pom.xml
index 2d16953..3a541b5 100644
--- a/apache-license-header-resource-bundle/pom.xml
+++ b/apache-license-header-resource-bundle/pom.xml
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
-
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
@@ -18,23 +17,20 @@
~ specific language governing permissions and limitations
~ under the License.
-->
-
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.apache.resources</groupId>
<artifactId>apache-resource-bundles</artifactId>
- <version>4</version>
+ <version>40-SNAPSHOT</version>
</parent>
<artifactId>apache-license-header-resource-bundle</artifactId>
<version>1.2-SNAPSHOT</version>
<name>Apache License Header Resource Bundle</name>
- <description>
- An archive which contains the license header template.
- </description>
+ <description>An archive which contains the license header
template.</description>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/maven/resources/trunk/apache-license-header-resource-bundle</connection>
diff --git a/apache-source-release-assembly-descriptor/pom.xml
b/apache-source-release-assembly-descriptor/pom.xml
index 18ef854..aaccc64 100644
--- a/apache-source-release-assembly-descriptor/pom.xml
+++ b/apache-source-release-assembly-descriptor/pom.xml
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
-
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -18,24 +17,21 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
-
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
-
+
<parent>
<groupId>org.apache.apache.resources</groupId>
<artifactId>apache-resource-bundles</artifactId>
- <version>5</version>
+ <version>40-SNAPSHOT</version>
</parent>
-
+
<artifactId>apache-source-release-assembly-descriptor</artifactId>
- <packaging>jar</packaging>
<version>1.0.7-SNAPSHOT</version>
-
+ <packaging>jar</packaging>
+
<name>Apache Source Release Assembly Descriptor</name>
- <description>
- This jar contains a customized source assembly descriptor to produce
Apache compliant source bundles.
- </description>
+ <description>This jar contains a customized source assembly descriptor to
produce Apache compliant source bundles.</description>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/maven/resources/trunk/apache-source-release-assembly-descriptor</connection>
@@ -44,7 +40,7 @@ under the License.
</scm>
<!-- NOTE: Configuration below this line is for integration tests. -->
-
+
<properties>
<!-- The original Maven distribution to test. -->
<mavenHome>${maven.home}</mavenHome>
@@ -84,11 +80,11 @@ under the License.
<build>
<testResources>
<testResource>
- <directory>src/test/resources</directory>
<filtering>true</filtering>
+ <directory>src/test/resources</directory>
</testResource>
</testResources>
-
+
<pluginManagement>
<plugins>
<plugin>
@@ -121,10 +117,10 @@ under the License.
<executions>
<execution>
<id>source-release-assembly</id>
- <phase>package</phase>
<goals>
<goal>single</goal>
</goals>
+ <phase>package</phase>
<configuration>
<runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
<descriptors>
@@ -184,10 +180,10 @@ under the License.
<executions>
<execution>
<id>install-descriptor</id>
- <phase>pre-integration-test</phase>
<goals>
<goal>install</goal>
</goals>
+ <phase>pre-integration-test</phase>
<configuration>
<localRepositoryPath>${project.build.directory}/it-repo</localRepositoryPath>
</configuration>
diff --git
a/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_000_BasicArchiveCreation.java
b/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_000_BasicArchiveCreation.java
index 156e8ba..9ba6d93 100644
---
a/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_000_BasicArchiveCreation.java
+++
b/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_000_BasicArchiveCreation.java
@@ -1,3 +1,21 @@
+/*
+ * 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 org.apache.its;
/*
@@ -19,15 +37,6 @@ package org.apache.its;
* under the License.
*/
-import static org.apache.its.util.TestUtils.archivePathFromChild;
-import static org.apache.its.util.TestUtils.archivePathFromProject;
-import static org.apache.its.util.TestUtils.assertZipContents;
-import static org.apache.its.util.TestUtils.getTestDir;
-
-import org.apache.maven.it.VerificationException;
-import org.apache.maven.it.Verifier;
-import org.junit.Test;
-
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
@@ -36,46 +45,53 @@ import java.util.HashSet;
import java.util.Set;
import junit.framework.Assert;
+import org.apache.maven.it.VerificationException;
+import org.apache.maven.it.Verifier;
+import org.junit.Test;
+
+import static org.apache.its.util.TestUtils.archivePathFromChild;
+import static org.apache.its.util.TestUtils.archivePathFromProject;
+import static org.apache.its.util.TestUtils.assertZipContents;
+import static org.apache.its.util.TestUtils.getTestDir;
+
+public class IT_000_BasicArchiveCreation {
-public class IT_000_BasicArchiveCreation
-{
-
private static final String BASENAME = "basics";
private static final String VERSION = "1";
-
+
@Test
- public void execute()
- throws VerificationException, IOException, URISyntaxException
- {
- File testDir = getTestDir( BASENAME );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-
- verifier.executeGoal( "package" );
-
+ public void execute() throws VerificationException, IOException,
URISyntaxException {
+ File testDir = getTestDir(BASENAME);
+
+ Verifier verifier = new Verifier(testDir.getAbsolutePath());
+
+ verifier.executeGoal("package");
+
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
- // make sure the tar did NOT get created by default
- File tarAssemblyFile = new File( testDir, "target/" + BASENAME + "-" +
VERSION + "-source-release.tar.gz" );
- Assert.assertFalse( "tar assembly should not have been created",
tarAssemblyFile.exists() );
-
- File assembly = new File( testDir, "target/" + BASENAME + "-" +
VERSION + "-source-release.zip" );
-
+
+ // make sure the tar did NOT get created by default
+ File tarAssemblyFile = new File(testDir, "target/" + BASENAME + "-" +
VERSION + "-source-release.tar.gz");
+ Assert.assertFalse("tar assembly should not have been created",
tarAssemblyFile.exists());
+
+ File assembly = new File(testDir, "target/" + BASENAME + "-" + VERSION
+ "-source-release.zip");
+
Set<String> required = new HashSet<String>();
-
- required.add( archivePathFromProject( BASENAME, VERSION, "/pom.xml" )
);
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"pom.xml" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/pom.xml" ) );
-
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/src/main/java/org/apache/assembly/it/App.java" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/src/main/resources/META-INF/plexus/components.xml" ) );
-
- required.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/src/main/java/org/apache/assembly/it/App.java" ) );
-
+
+ required.add(archivePathFromProject(BASENAME, VERSION, "/pom.xml"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child1",
"pom.xml"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child2",
"/pom.xml"));
+
+ required.add(
+ archivePathFromChild(BASENAME, VERSION, "child1",
"/src/main/java/org/apache/assembly/it/App.java"));
+ required.add(archivePathFromChild(
+ BASENAME, VERSION, "child1",
"/src/main/resources/META-INF/plexus/components.xml"));
+
+ required.add(
+ archivePathFromChild(BASENAME, VERSION, "child2",
"/src/main/java/org/apache/assembly/it/App.java"));
+
Set<String> banned = Collections.emptySet();
-
- assertZipContents( required, banned, assembly );
- }
+ assertZipContents(required, banned, assembly);
+ }
}
diff --git
a/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_001_ExcludeBuildOutputDirectory.java
b/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_001_ExcludeBuildOutputDirectory.java
index 149bd92..55fe078 100644
---
a/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_001_ExcludeBuildOutputDirectory.java
+++
b/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_001_ExcludeBuildOutputDirectory.java
@@ -1,3 +1,21 @@
+/*
+ * 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 org.apache.its;
/*
@@ -19,58 +37,56 @@ package org.apache.its;
* under the License.
*/
-import static org.apache.its.util.TestUtils.archivePathFromChild;
-import static org.apache.its.util.TestUtils.archivePathFromProject;
-import static org.apache.its.util.TestUtils.assertZipContents;
-import static org.apache.its.util.TestUtils.getTestDir;
-
-import org.apache.maven.it.VerificationException;
-import org.apache.maven.it.Verifier;
-import org.junit.Test;
-
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.HashSet;
import java.util.Set;
-public class IT_001_ExcludeBuildOutputDirectory
-{
-
+import org.apache.maven.it.VerificationException;
+import org.apache.maven.it.Verifier;
+import org.junit.Test;
+
+import static org.apache.its.util.TestUtils.archivePathFromChild;
+import static org.apache.its.util.TestUtils.archivePathFromProject;
+import static org.apache.its.util.TestUtils.assertZipContents;
+import static org.apache.its.util.TestUtils.getTestDir;
+
+public class IT_001_ExcludeBuildOutputDirectory {
+
private static final String BASENAME = "build-output-dir";
private static final String VERSION = "1";
-
+
@Test
- public void execute()
- throws VerificationException, IOException, URISyntaxException
- {
- File testDir = getTestDir( BASENAME );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-
- verifier.executeGoal( "package" );
-
+ public void execute() throws VerificationException, IOException,
URISyntaxException {
+ File testDir = getTestDir(BASENAME);
+
+ Verifier verifier = new Verifier(testDir.getAbsolutePath());
+
+ verifier.executeGoal("package");
+
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
- File assembly = new File( testDir, "target/" + BASENAME + "-" +
VERSION + "-source-release.zip" );
-
+
+ File assembly = new File(testDir, "target/" + BASENAME + "-" + VERSION
+ "-source-release.zip");
+
Set<String> required = new HashSet<String>();
-
- required.add( archivePathFromProject( BASENAME, VERSION, "/pom.xml" )
);
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"pom.xml" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/pom.xml" ) );
-
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/src/main/java/org/apache/assembly/it/App.java" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/src/main/java/org/apache/assembly/it/App.java" ) );
-
+
+ required.add(archivePathFromProject(BASENAME, VERSION, "/pom.xml"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child1",
"pom.xml"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child2",
"/pom.xml"));
+
+ required.add(
+ archivePathFromChild(BASENAME, VERSION, "child1",
"/src/main/java/org/apache/assembly/it/App.java"));
+ required.add(
+ archivePathFromChild(BASENAME, VERSION, "child2",
"/src/main/java/org/apache/assembly/it/App.java"));
+
Set<String> banned = new HashSet<String>();
-
- banned.add( archivePathFromProject( BASENAME, VERSION, "/target/" ) );
- banned.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/target/" ) );
- banned.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/target/" ) );
-
- assertZipContents( required, banned, assembly );
- }
+ banned.add(archivePathFromProject(BASENAME, VERSION, "/target/"));
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/target/"));
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child2",
"/target/"));
+
+ assertZipContents(required, banned, assembly);
+ }
}
diff --git
a/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_002_IncludeSrcDirWithBuildOutputDirName.java
b/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_002_IncludeSrcDirWithBuildOutputDirName.java
index 65ef328..0425f7e 100644
---
a/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_002_IncludeSrcDirWithBuildOutputDirName.java
+++
b/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_002_IncludeSrcDirWithBuildOutputDirName.java
@@ -1,3 +1,21 @@
+/*
+ * 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 org.apache.its;
/*
@@ -19,59 +37,55 @@ package org.apache.its;
* under the License.
*/
-import static org.apache.its.util.TestUtils.archivePathFromChild;
-import static org.apache.its.util.TestUtils.archivePathFromProject;
-import static org.apache.its.util.TestUtils.assertZipContents;
-import static org.apache.its.util.TestUtils.getTestDir;
-
-import org.apache.maven.it.VerificationException;
-import org.apache.maven.it.Verifier;
-import org.junit.Test;
-
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.HashSet;
import java.util.Set;
-public class IT_002_IncludeSrcDirWithBuildOutputDirName
-{
-
+import org.apache.maven.it.VerificationException;
+import org.apache.maven.it.Verifier;
+import org.junit.Test;
+
+import static org.apache.its.util.TestUtils.archivePathFromChild;
+import static org.apache.its.util.TestUtils.archivePathFromProject;
+import static org.apache.its.util.TestUtils.assertZipContents;
+import static org.apache.its.util.TestUtils.getTestDir;
+
+public class IT_002_IncludeSrcDirWithBuildOutputDirName {
+
private static final String BASENAME = "src-contains-output-dir-name";
private static final String VERSION = "1";
-
+
@Test
- public void execute()
- throws VerificationException, IOException, URISyntaxException
- {
- File testDir = getTestDir( BASENAME );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-
- verifier.executeGoal( "package" );
-
+ public void execute() throws VerificationException, IOException,
URISyntaxException {
+ File testDir = getTestDir(BASENAME);
+
+ Verifier verifier = new Verifier(testDir.getAbsolutePath());
+
+ verifier.executeGoal("package");
+
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
- File assembly = new File( testDir, "target/" + BASENAME + "-" +
VERSION + "-source-release.zip" );
-
+
+ File assembly = new File(testDir, "target/" + BASENAME + "-" + VERSION
+ "-source-release.zip");
+
Set<String> required = new HashSet<String>();
-
- required.add( archivePathFromProject( BASENAME, VERSION, "/pom.xml" )
);
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/pom.xml" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/pom.xml" ) );
-
- required.add( archivePathFromProject( BASENAME, VERSION,
"/src/main/resources/target/test.txt" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/src/main/java/target/App.java" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/src/main/java/target/App.java" ) );
-
+
+ required.add(archivePathFromProject(BASENAME, VERSION, "/pom.xml"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/pom.xml"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child2",
"/pom.xml"));
+
+ required.add(archivePathFromProject(BASENAME, VERSION,
"/src/main/resources/target/test.txt"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/src/main/java/target/App.java"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child2",
"/src/main/java/target/App.java"));
+
Set<String> banned = new HashSet<String>();
-
- banned.add( archivePathFromProject( BASENAME, VERSION, "/target/" ) );
- banned.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/target/" ) );
- banned.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/target/" ) );
-
- assertZipContents( required, banned, assembly );
- }
+ banned.add(archivePathFromProject(BASENAME, VERSION, "/target/"));
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/target/"));
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child2",
"/target/"));
+
+ assertZipContents(required, banned, assembly);
+ }
}
diff --git
a/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_003_SharedResourceInclusion.java
b/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_003_SharedResourceInclusion.java
index 2bded1c..112b56e 100644
---
a/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_003_SharedResourceInclusion.java
+++
b/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_003_SharedResourceInclusion.java
@@ -1,3 +1,21 @@
+/*
+ * 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 org.apache.its;
/*
@@ -19,60 +37,56 @@ package org.apache.its;
* under the License.
*/
-import static org.apache.its.util.TestUtils.archivePathFromChild;
-import static org.apache.its.util.TestUtils.archivePathFromProject;
-import static org.apache.its.util.TestUtils.assertZipContents;
-import static org.apache.its.util.TestUtils.getTestDir;
-
-import org.apache.maven.it.VerificationException;
-import org.apache.maven.it.Verifier;
-import org.junit.Test;
-
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.HashSet;
import java.util.Set;
-public class IT_003_SharedResourceInclusion
-{
-
+import org.apache.maven.it.VerificationException;
+import org.apache.maven.it.Verifier;
+import org.junit.Test;
+
+import static org.apache.its.util.TestUtils.archivePathFromChild;
+import static org.apache.its.util.TestUtils.archivePathFromProject;
+import static org.apache.its.util.TestUtils.assertZipContents;
+import static org.apache.its.util.TestUtils.getTestDir;
+
+public class IT_003_SharedResourceInclusion {
+
private static final String BASENAME = "shared-resources";
private static final String VERSION = "1";
-
+
@Test
- public void execute()
- throws VerificationException, IOException, URISyntaxException
- {
- File testDir = getTestDir( BASENAME );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-
- verifier.executeGoal( "package" );
-
+ public void execute() throws VerificationException, IOException,
URISyntaxException {
+ File testDir = getTestDir(BASENAME);
+
+ Verifier verifier = new Verifier(testDir.getAbsolutePath());
+
+ verifier.executeGoal("package");
+
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
- File assembly = new File( testDir, "target/" + BASENAME + "-" +
VERSION + "-source-release.zip" );
-
+
+ File assembly = new File(testDir, "target/" + BASENAME + "-" + VERSION
+ "-source-release.zip");
+
Set<String> required = new HashSet<String>();
-
- required.add( archivePathFromProject( BASENAME, VERSION, "/pom.xml" )
);
- required.add( archivePathFromProject( BASENAME, VERSION, "/LICENSE" )
);
- required.add( archivePathFromProject( BASENAME, VERSION,
"/DEPENDENCIES" ) );
- required.add( archivePathFromProject( BASENAME, VERSION, "/NOTICE" ) );
-
+
+ required.add(archivePathFromProject(BASENAME, VERSION, "/pom.xml"));
+ required.add(archivePathFromProject(BASENAME, VERSION, "/LICENSE"));
+ required.add(archivePathFromProject(BASENAME, VERSION,
"/DEPENDENCIES"));
+ required.add(archivePathFromProject(BASENAME, VERSION, "/NOTICE"));
+
Set<String> banned = new HashSet<String>();
-
- banned.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/LICENSE" ) );
- banned.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/DEPENDENCIES" ) );
- banned.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/NOTICE" ) );
-
- banned.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/LICENSE" ) );
- banned.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/DEPENDENCIES" ) );
- banned.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/NOTICE" ) );
-
- assertZipContents( required, banned, assembly );
- }
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/LICENSE"));
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/DEPENDENCIES"));
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/NOTICE"));
+
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child2",
"/LICENSE"));
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child2",
"/DEPENDENCIES"));
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child2",
"/NOTICE"));
+
+ assertZipContents(required, banned, assembly);
+ }
}
diff --git
a/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_004_IdeExcludes.java
b/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_004_IdeExcludes.java
index 17093a0..3a05878 100644
---
a/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_004_IdeExcludes.java
+++
b/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_004_IdeExcludes.java
@@ -1,3 +1,21 @@
+/*
+ * 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 org.apache.its;
/*
@@ -19,15 +37,6 @@ package org.apache.its;
* under the License.
*/
-import static org.apache.its.util.TestUtils.archivePathFromChild;
-import static org.apache.its.util.TestUtils.archivePathFromProject;
-import static org.apache.its.util.TestUtils.assertZipContents;
-import static org.apache.its.util.TestUtils.getTestDir;
-
-import org.apache.maven.it.VerificationException;
-import org.apache.maven.it.Verifier;
-import org.junit.Test;
-
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
@@ -35,55 +44,60 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
-public class IT_004_IdeExcludes
-{
-
+import org.apache.maven.it.VerificationException;
+import org.apache.maven.it.Verifier;
+import org.junit.Test;
+
+import static org.apache.its.util.TestUtils.archivePathFromChild;
+import static org.apache.its.util.TestUtils.archivePathFromProject;
+import static org.apache.its.util.TestUtils.assertZipContents;
+import static org.apache.its.util.TestUtils.getTestDir;
+
+public class IT_004_IdeExcludes {
+
private static final String BASENAME = "ide-excludes";
private static final String VERSION = "1";
-
+
@Test
- public void execute()
- throws VerificationException, IOException, URISyntaxException
- {
- File testDir = getTestDir( BASENAME );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-
- verifier.executeGoal( "package" );
-
+ public void execute() throws VerificationException, IOException,
URISyntaxException {
+ File testDir = getTestDir(BASENAME);
+
+ Verifier verifier = new Verifier(testDir.getAbsolutePath());
+
+ verifier.executeGoal("package");
+
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
- File assembly = new File( testDir, "target/" + BASENAME + "-" +
VERSION + "-source-release.zip" );
-
+
+ File assembly = new File(testDir, "target/" + BASENAME + "-" + VERSION
+ "-source-release.zip");
+
Set<String> required = Collections.emptySet();
-
+
Set<String> banned = new HashSet<String>();
-
- banned.add( archivePathFromProject( BASENAME, VERSION, "/.classpath" )
);
- banned.add( archivePathFromProject( BASENAME, VERSION, "/.project" ) );
- banned.add( archivePathFromProject( BASENAME, VERSION,
"/maven-eclipse.xml" ) );
- banned.add( archivePathFromProject( BASENAME, VERSION,
"/ide-excludes.iml" ) );
- banned.add( archivePathFromProject( BASENAME, VERSION,
"/ide-excludes.ipr" ) );
- banned.add( archivePathFromProject( BASENAME, VERSION,
"/ide-excludes.iws" ) );
- banned.add( archivePathFromProject( BASENAME, VERSION, "/.deployables"
) );
- banned.add( archivePathFromProject( BASENAME, VERSION, "/.settings" )
);
- banned.add( archivePathFromProject( BASENAME, VERSION, "/.wtpmodules"
) );
- banned.add( archivePathFromProject( BASENAME, VERSION,
"/.externalToolBuilders" ) );
-
- banned.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/.classpath" ) );
- banned.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/.project" ) );
- banned.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/maven-eclipse.xml" ) );
- banned.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/.deployables" ) );
- banned.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/.settings" ) );
- banned.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/.wtpmodules" ) );
- banned.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/.externalToolBuilders" ) );
-
- banned.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/ide-excludes-child2.iml" ) );
- banned.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/ide-excludes-child2.ipr" ) );
- banned.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/ide-excludes-child2.iws" ) );
-
- assertZipContents( required, banned, assembly );
- }
+ banned.add(archivePathFromProject(BASENAME, VERSION, "/.classpath"));
+ banned.add(archivePathFromProject(BASENAME, VERSION, "/.project"));
+ banned.add(archivePathFromProject(BASENAME, VERSION,
"/maven-eclipse.xml"));
+ banned.add(archivePathFromProject(BASENAME, VERSION,
"/ide-excludes.iml"));
+ banned.add(archivePathFromProject(BASENAME, VERSION,
"/ide-excludes.ipr"));
+ banned.add(archivePathFromProject(BASENAME, VERSION,
"/ide-excludes.iws"));
+ banned.add(archivePathFromProject(BASENAME, VERSION, "/.deployables"));
+ banned.add(archivePathFromProject(BASENAME, VERSION, "/.settings"));
+ banned.add(archivePathFromProject(BASENAME, VERSION, "/.wtpmodules"));
+ banned.add(archivePathFromProject(BASENAME, VERSION,
"/.externalToolBuilders"));
+
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/.classpath"));
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/.project"));
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/maven-eclipse.xml"));
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/.deployables"));
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/.settings"));
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/.wtpmodules"));
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/.externalToolBuilders"));
+
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child2",
"/ide-excludes-child2.iml"));
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child2",
"/ide-excludes-child2.ipr"));
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child2",
"/ide-excludes-child2.iws"));
+
+ assertZipContents(required, banned, assembly);
+ }
}
diff --git
a/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_005_MiscellaneousExcludes.java
b/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_005_MiscellaneousExcludes.java
index 93f80f4..b904d31 100644
---
a/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_005_MiscellaneousExcludes.java
+++
b/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_005_MiscellaneousExcludes.java
@@ -1,3 +1,21 @@
+/*
+ * 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 org.apache.its;
/*
@@ -19,15 +37,6 @@ package org.apache.its;
* under the License.
*/
-import static org.apache.its.util.TestUtils.archivePathFromChild;
-import static org.apache.its.util.TestUtils.archivePathFromProject;
-import static org.apache.its.util.TestUtils.assertZipContents;
-import static org.apache.its.util.TestUtils.getTestDir;
-
-import org.apache.maven.it.VerificationException;
-import org.apache.maven.it.Verifier;
-import org.junit.Test;
-
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
@@ -35,38 +44,43 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
-public class IT_005_MiscellaneousExcludes
-{
-
+import org.apache.maven.it.VerificationException;
+import org.apache.maven.it.Verifier;
+import org.junit.Test;
+
+import static org.apache.its.util.TestUtils.archivePathFromChild;
+import static org.apache.its.util.TestUtils.archivePathFromProject;
+import static org.apache.its.util.TestUtils.assertZipContents;
+import static org.apache.its.util.TestUtils.getTestDir;
+
+public class IT_005_MiscellaneousExcludes {
+
private static final String BASENAME = "misc-excludes";
private static final String VERSION = "1";
-
+
@Test
- public void execute()
- throws VerificationException, IOException, URISyntaxException
- {
- File testDir = getTestDir( BASENAME );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-
- verifier.executeGoal( "package" );
-
+ public void execute() throws VerificationException, IOException,
URISyntaxException {
+ File testDir = getTestDir(BASENAME);
+
+ Verifier verifier = new Verifier(testDir.getAbsolutePath());
+
+ verifier.executeGoal("package");
+
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
- File assembly = new File( testDir, "target/" + BASENAME + "-" +
VERSION + "-source-release.zip" );
-
+
+ File assembly = new File(testDir, "target/" + BASENAME + "-" + VERSION
+ "-source-release.zip");
+
Set<String> required = Collections.emptySet();
-
+
Set<String> banned = new HashSet<String>();
-
- banned.add( archivePathFromProject( BASENAME, VERSION,
"/cobertura.ser" ) );
- banned.add( archivePathFromProject( BASENAME, VERSION,
"/release.properties" ) );
- banned.add( archivePathFromProject( BASENAME, VERSION,
"/pom.xml.releaseBackup" ) );
-
- banned.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/cobertura.ser" ) );
-
- assertZipContents( required, banned, assembly );
- }
+ banned.add(archivePathFromProject(BASENAME, VERSION,
"/cobertura.ser"));
+ banned.add(archivePathFromProject(BASENAME, VERSION,
"/release.properties"));
+ banned.add(archivePathFromProject(BASENAME, VERSION,
"/pom.xml.releaseBackup"));
+
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child2",
"/cobertura.ser"));
+
+ assertZipContents(required, banned, assembly);
+ }
}
diff --git
a/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_ExcludeSrcDirWithinBuildOutputDir.java
b/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_ExcludeSrcDirWithinBuildOutputDir.java
index 19c2685..b8ed28e 100644
---
a/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_ExcludeSrcDirWithinBuildOutputDir.java
+++
b/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_ExcludeSrcDirWithinBuildOutputDir.java
@@ -1,3 +1,21 @@
+/*
+ * 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 org.apache.its;
/*
@@ -19,62 +37,64 @@ package org.apache.its;
* under the License.
*/
-import static org.apache.its.util.TestUtils.archivePathFromChild;
-import static org.apache.its.util.TestUtils.archivePathFromProject;
-import static org.apache.its.util.TestUtils.assertZipContents;
-import static org.apache.its.util.TestUtils.getTestDir;
-
-import org.apache.maven.it.VerificationException;
-import org.apache.maven.it.Verifier;
-import org.junit.Test;
-
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.HashSet;
import java.util.Set;
-public class IT_ExcludeSrcDirWithinBuildOutputDir
-{
-
+import org.apache.maven.it.VerificationException;
+import org.apache.maven.it.Verifier;
+import org.junit.Test;
+
+import static org.apache.its.util.TestUtils.archivePathFromChild;
+import static org.apache.its.util.TestUtils.archivePathFromProject;
+import static org.apache.its.util.TestUtils.assertZipContents;
+import static org.apache.its.util.TestUtils.getTestDir;
+
+public class IT_ExcludeSrcDirWithinBuildOutputDir {
+
private static final String BASENAME = "output-dir-contains-src-name";
private static final String VERSION = "1";
-
+
@Test
- public void execute()
- throws VerificationException, IOException, URISyntaxException
- {
- File testDir = getTestDir( BASENAME );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-
- verifier.executeGoal( "package" );
-
+ public void execute() throws VerificationException, IOException,
URISyntaxException {
+ File testDir = getTestDir(BASENAME);
+
+ Verifier verifier = new Verifier(testDir.getAbsolutePath());
+
+ verifier.executeGoal("package");
+
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
- File assembly = new File( testDir, "target/" + BASENAME + "-" +
VERSION + "-source-release.zip" );
-
+
+ File assembly = new File(testDir, "target/" + BASENAME + "-" + VERSION
+ "-source-release.zip");
+
Set<String> required = new HashSet<String>();
-
- required.add( archivePathFromProject( BASENAME, VERSION, "/pom.xml" )
);
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/pom.xml" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/pom.xml" ) );
-
- required.add( archivePathFromProject( BASENAME, VERSION,
"/src/test/resources/project/src/main/resources/test.properties" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/src/test/resources/project/src/main/resources/test.properties" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/src/test/resources/project/src/main/resources/test.properties" ) );
-
+
+ required.add(archivePathFromProject(BASENAME, VERSION, "/pom.xml"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/pom.xml"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child2",
"/pom.xml"));
+
+ required.add(archivePathFromProject(
+ BASENAME, VERSION,
"/src/test/resources/project/src/main/resources/test.properties"));
+ required.add(archivePathFromChild(
+ BASENAME, VERSION, "child1",
"/src/test/resources/project/src/main/resources/test.properties"));
+ required.add(archivePathFromChild(
+ BASENAME, VERSION, "child2",
"/src/test/resources/project/src/main/resources/test.properties"));
+
Set<String> banned = new HashSet<String>();
-
- banned.add( archivePathFromProject( BASENAME, VERSION, "/target/" ) );
- banned.add( archivePathFromProject( BASENAME, VERSION,
"/target/test-classes/project/src/main/resources/test.properties" ) );
- banned.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/target/" ) );
- banned.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/target/test-classes/project/src/main/resources/test.properties" ) );
- banned.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/target/" ) );
- banned.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/target/test-classes/project/src/main/resources/test.properties" ) );
-
- assertZipContents( required, banned, assembly );
- }
+ banned.add(archivePathFromProject(BASENAME, VERSION, "/target/"));
+ banned.add(archivePathFromProject(
+ BASENAME, VERSION,
"/target/test-classes/project/src/main/resources/test.properties"));
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/target/"));
+ banned.add(archivePathFromChild(
+ BASENAME, VERSION, "child1",
"/target/test-classes/project/src/main/resources/test.properties"));
+ banned.add(archivePathFromChild(BASENAME, VERSION, "child2",
"/target/"));
+ banned.add(archivePathFromChild(
+ BASENAME, VERSION, "child2",
"/target/test-classes/project/src/main/resources/test.properties"));
+
+ assertZipContents(required, banned, assembly);
+ }
}
diff --git
a/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_IncludeIdeFilesWithinSrcDir.java
b/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_IncludeIdeFilesWithinSrcDir.java
index c2141aa..8a4a5b4 100644
---
a/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_IncludeIdeFilesWithinSrcDir.java
+++
b/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_IncludeIdeFilesWithinSrcDir.java
@@ -1,3 +1,21 @@
+/*
+ * 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 org.apache.its;
/*
@@ -19,78 +37,74 @@ package org.apache.its;
* under the License.
*/
-import static org.apache.its.util.TestUtils.archivePathFromChild;
-import static org.apache.its.util.TestUtils.archivePathFromProject;
-import static org.apache.its.util.TestUtils.assertZipContents;
-import static org.apache.its.util.TestUtils.getTestDir;
-
-import org.apache.maven.it.VerificationException;
-import org.apache.maven.it.Verifier;
-import org.junit.Test;
-
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.HashSet;
import java.util.Set;
-public class IT_IncludeIdeFilesWithinSrcDir
-{
-
+import org.apache.maven.it.VerificationException;
+import org.apache.maven.it.Verifier;
+import org.junit.Test;
+
+import static org.apache.its.util.TestUtils.archivePathFromChild;
+import static org.apache.its.util.TestUtils.archivePathFromProject;
+import static org.apache.its.util.TestUtils.assertZipContents;
+import static org.apache.its.util.TestUtils.getTestDir;
+
+public class IT_IncludeIdeFilesWithinSrcDir {
+
private static final String BASENAME = "src-contains-ide-files";
private static final String VERSION = "1";
-
+
@Test
- public void execute()
- throws VerificationException, IOException, URISyntaxException
- {
- File testDir = getTestDir( BASENAME );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-
- verifier.executeGoal( "package" );
-
+ public void execute() throws VerificationException, IOException,
URISyntaxException {
+ File testDir = getTestDir(BASENAME);
+
+ Verifier verifier = new Verifier(testDir.getAbsolutePath());
+
+ verifier.executeGoal("package");
+
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
- File assembly = new File( testDir, "target/" + BASENAME + "-" +
VERSION + "-source-release.zip" );
-
+
+ File assembly = new File(testDir, "target/" + BASENAME + "-" + VERSION
+ "-source-release.zip");
+
Set<String> required = new HashSet<String>();
-
- required.add( archivePathFromProject( BASENAME, VERSION, "/pom.xml" )
);
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/pom.xml" ) );
-
- required.add( archivePathFromProject( BASENAME, VERSION,
"/src/test/resources/.classpath" ) );
- required.add( archivePathFromProject( BASENAME, VERSION,
"/src/test/resources/.project" ) );
- required.add( archivePathFromProject( BASENAME, VERSION,
"/src/test/resources/maven-eclipse.xml" ) );
- required.add( archivePathFromProject( BASENAME, VERSION,
"/src/test/resources/ide-excludes.iml" ) );
- required.add( archivePathFromProject( BASENAME, VERSION,
"/src/test/resources/ide-excludes.ipr" ) );
- required.add( archivePathFromProject( BASENAME, VERSION,
"/src/test/resources/ide-excludes.iws" ) );
- required.add( archivePathFromProject( BASENAME, VERSION,
"/src/test/resources/.deployables/" ) );
- required.add( archivePathFromProject( BASENAME, VERSION,
"/src/test/resources/.settings/" ) );
- required.add( archivePathFromProject( BASENAME, VERSION,
"/src/test/resources/.wtpmodules/" ) );
- required.add( archivePathFromProject( BASENAME, VERSION,
"/src/test/resources/.externalToolBuilders/" ) );
-
- required.add( archivePathFromProject( BASENAME, VERSION,
"/src/test/resources/release.properties" ) );
- required.add( archivePathFromProject( BASENAME, VERSION,
"/src/test/resources/pom.xml.releaseBackup" ) );
-
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/src/test/resources/.classpath" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/src/test/resources/.project" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/src/test/resources/maven-eclipse.xml" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/src/test/resources/ide-excludes.iml" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/src/test/resources/ide-excludes.ipr" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/src/test/resources/ide-excludes.iws" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/src/test/resources/.deployables/" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/src/test/resources/.settings/" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/src/test/resources/.wtpmodules/" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/src/test/resources/.externalToolBuilders/" ) );
-
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/src/test/resources/release.properties" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/src/test/resources/pom.xml.releaseBackup" ) );
-
+
+ required.add(archivePathFromProject(BASENAME, VERSION, "/pom.xml"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/pom.xml"));
+
+ required.add(archivePathFromProject(BASENAME, VERSION,
"/src/test/resources/.classpath"));
+ required.add(archivePathFromProject(BASENAME, VERSION,
"/src/test/resources/.project"));
+ required.add(archivePathFromProject(BASENAME, VERSION,
"/src/test/resources/maven-eclipse.xml"));
+ required.add(archivePathFromProject(BASENAME, VERSION,
"/src/test/resources/ide-excludes.iml"));
+ required.add(archivePathFromProject(BASENAME, VERSION,
"/src/test/resources/ide-excludes.ipr"));
+ required.add(archivePathFromProject(BASENAME, VERSION,
"/src/test/resources/ide-excludes.iws"));
+ required.add(archivePathFromProject(BASENAME, VERSION,
"/src/test/resources/.deployables/"));
+ required.add(archivePathFromProject(BASENAME, VERSION,
"/src/test/resources/.settings/"));
+ required.add(archivePathFromProject(BASENAME, VERSION,
"/src/test/resources/.wtpmodules/"));
+ required.add(archivePathFromProject(BASENAME, VERSION,
"/src/test/resources/.externalToolBuilders/"));
+
+ required.add(archivePathFromProject(BASENAME, VERSION,
"/src/test/resources/release.properties"));
+ required.add(archivePathFromProject(BASENAME, VERSION,
"/src/test/resources/pom.xml.releaseBackup"));
+
+ required.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/src/test/resources/.classpath"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/src/test/resources/.project"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/src/test/resources/maven-eclipse.xml"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/src/test/resources/ide-excludes.iml"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/src/test/resources/ide-excludes.ipr"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/src/test/resources/ide-excludes.iws"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/src/test/resources/.deployables/"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/src/test/resources/.settings/"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/src/test/resources/.wtpmodules/"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/src/test/resources/.externalToolBuilders/"));
+
+ required.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/src/test/resources/release.properties"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child1",
"/src/test/resources/pom.xml.releaseBackup"));
+
Set<String> banned = new HashSet<String>();
-
- assertZipContents( required, banned, assembly );
- }
+ assertZipContents(required, banned, assembly);
+ }
}
diff --git
a/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_ZipAndTarCreation.java
b/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_ZipAndTarCreation.java
index b8771ff..fc1f02c 100644
---
a/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_ZipAndTarCreation.java
+++
b/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_ZipAndTarCreation.java
@@ -1,3 +1,21 @@
+/*
+ * 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 org.apache.its;
/*
@@ -8,9 +26,9 @@ package org.apache.its;
* 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
@@ -19,12 +37,6 @@ package org.apache.its;
* under the License.
*/
-import static org.apache.its.util.TestUtils.archivePathFromChild;
-import static org.apache.its.util.TestUtils.archivePathFromProject;
-import static org.apache.its.util.TestUtils.assertZipContents;
-import static org.apache.its.util.TestUtils.assertTarContents;
-import static org.apache.its.util.TestUtils.getTestDir;
-
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
@@ -33,52 +45,56 @@ import java.util.HashSet;
import java.util.Set;
import junit.framework.Assert;
-
import org.apache.maven.it.VerificationException;
import org.apache.maven.it.Verifier;
import org.junit.Test;
-public class IT_ZipAndTarCreation
-{
+import static org.apache.its.util.TestUtils.archivePathFromChild;
+import static org.apache.its.util.TestUtils.archivePathFromProject;
+import static org.apache.its.util.TestUtils.assertTarContents;
+import static org.apache.its.util.TestUtils.assertZipContents;
+import static org.apache.its.util.TestUtils.getTestDir;
+
+public class IT_ZipAndTarCreation {
private static final String BASENAME = "zip-and-tar";
private static final String VERSION = "1";
-
+
@Test
- public void execute()
- throws VerificationException, IOException, URISyntaxException
- {
- File testDir = getTestDir( BASENAME );
-
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-
- verifier.executeGoal( "package" );
-
+ public void execute() throws VerificationException, IOException,
URISyntaxException {
+ File testDir = getTestDir(BASENAME);
+
+ Verifier verifier = new Verifier(testDir.getAbsolutePath());
+
+ verifier.executeGoal("package");
+
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
- // make sure the tar did NOT get created by default
- File tarAssemblyFile = new File( testDir, "target/" + BASENAME + "-" +
VERSION + "-source-release.tar.gz" );
- Assert.assertTrue( "tar assembly should have been created",
tarAssemblyFile.exists() );
-
- File zipAssemblyFile = new File( testDir, "target/" + BASENAME + "-" +
VERSION + "-source-release.zip" );
- Assert.assertTrue( "zip assembly should have been created",
zipAssemblyFile.exists() );
-
+
+ // make sure the tar did NOT get created by default
+ File tarAssemblyFile = new File(testDir, "target/" + BASENAME + "-" +
VERSION + "-source-release.tar.gz");
+ Assert.assertTrue("tar assembly should have been created",
tarAssemblyFile.exists());
+
+ File zipAssemblyFile = new File(testDir, "target/" + BASENAME + "-" +
VERSION + "-source-release.zip");
+ Assert.assertTrue("zip assembly should have been created",
zipAssemblyFile.exists());
+
Set<String> required = new HashSet<String>();
-
- required.add( archivePathFromProject( BASENAME, VERSION, "/pom.xml" )
);
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"pom.xml" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/pom.xml" ) );
-
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/src/main/java/org/apache/assembly/it/App.java" ) );
- required.add( archivePathFromChild( BASENAME, VERSION, "child1",
"/src/main/resources/META-INF/plexus/components.xml" ) );
-
- required.add( archivePathFromChild( BASENAME, VERSION, "child2",
"/src/main/java/org/apache/assembly/it/App.java" ) );
-
+
+ required.add(archivePathFromProject(BASENAME, VERSION, "/pom.xml"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child1",
"pom.xml"));
+ required.add(archivePathFromChild(BASENAME, VERSION, "child2",
"/pom.xml"));
+
+ required.add(
+ archivePathFromChild(BASENAME, VERSION, "child1",
"/src/main/java/org/apache/assembly/it/App.java"));
+ required.add(archivePathFromChild(
+ BASENAME, VERSION, "child1",
"/src/main/resources/META-INF/plexus/components.xml"));
+
+ required.add(
+ archivePathFromChild(BASENAME, VERSION, "child2",
"/src/main/java/org/apache/assembly/it/App.java"));
+
Set<String> banned = Collections.emptySet();
-
- assertZipContents( required, banned, zipAssemblyFile );
- assertTarContents( required, banned, tarAssemblyFile );
+
+ assertZipContents(required, banned, zipAssemblyFile);
+ assertTarContents(required, banned, tarAssemblyFile);
}
-
}
diff --git
a/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/util/TestUtils.java
b/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/util/TestUtils.java
index 55db25e..6ab63e4 100644
---
a/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/util/TestUtils.java
+++
b/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/util/TestUtils.java
@@ -1,3 +1,21 @@
+/*
+ * 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 org.apache.its.util;
/*
@@ -19,9 +37,6 @@ package org.apache.its.util;
* under the License.
*/
-import static junit.framework.Assert.assertTrue;
-import static junit.framework.Assert.fail;
-
import java.io.File;
import java.io.IOException;
import java.net.URI;
@@ -30,7 +45,6 @@ import java.net.URL;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.LinkedHashSet;
-import java.util.LinkedList;
import java.util.Set;
import java.util.zip.ZipEntry;
import java.util.zip.ZipException;
@@ -38,166 +52,129 @@ import java.util.zip.ZipFile;
import org.codehaus.plexus.archiver.tar.GZipTarFile;
import org.codehaus.plexus.archiver.tar.TarEntry;
-import org.codehaus.plexus.archiver.tar.TarFile;
-
-public class TestUtils
-{
-
- public static String archivePathFromChild( String artifactId, String
version, String childName, String childPath )
- {
- if ( !childPath.startsWith( "/" ) )
- {
+
+import static junit.framework.Assert.assertTrue;
+import static junit.framework.Assert.fail;
+
+public class TestUtils {
+
+ public static String archivePathFromChild(String artifactId, String
version, String childName, String childPath) {
+ if (!childPath.startsWith("/")) {
childPath = "/" + childPath;
}
-
- return ( artifactId + "-" + version + "/" + artifactId + "-" +
childName + childPath );
+
+ return (artifactId + "-" + version + "/" + artifactId + "-" +
childName + childPath);
}
- public static String archivePathFromProject( String artifactId, String
version, String path )
- {
- if ( !path.startsWith( "/" ) )
- {
+ public static String archivePathFromProject(String artifactId, String
version, String path) {
+ if (!path.startsWith("/")) {
path = "/" + path;
}
-
- return ( artifactId + "-" + version + path );
+
+ return (artifactId + "-" + version + path);
}
-
-
- public static void assertTarContents( Set<String> required, Set<String>
banned, File assembly )
- throws IOException
- {
- assertTrue( "Assembly archive missing: " + assembly, assembly.isFile()
);
+
+ public static void assertTarContents(Set<String> required, Set<String>
banned, File assembly) throws IOException {
+ assertTrue("Assembly archive missing: " + assembly, assembly.isFile());
GZipTarFile tarFile = null;
- try
- {
- tarFile = new GZipTarFile( assembly );
+ try {
+ tarFile = new GZipTarFile(assembly);
LinkedHashSet<String> pathSet = new LinkedHashSet<String>();
- for ( @SuppressWarnings( "unchecked" )
- Enumeration<TarEntry> enumeration = tarFile.getEntries();
enumeration.hasMoreElements(); )
- {
- pathSet.add( enumeration.nextElement().getName() );
+ for (@SuppressWarnings("unchecked") Enumeration<TarEntry>
enumeration = tarFile.getEntries();
+ enumeration.hasMoreElements(); ) {
+ pathSet.add(enumeration.nextElement().getName());
}
- assertArchiveContents( required, banned,
assembly.getAbsolutePath(), pathSet );
- }
- finally
- {
- if ( tarFile != null )
- {
+ assertArchiveContents(required, banned,
assembly.getAbsolutePath(), pathSet);
+ } finally {
+ if (tarFile != null) {
tarFile.close();
}
}
}
- public static void assertZipContents( Set<String> required, Set<String>
banned, File assembly )
- throws ZipException, IOException
- {
- assertTrue( "Assembly archive missing: " + assembly, assembly.isFile()
);
+ public static void assertZipContents(Set<String> required, Set<String>
banned, File assembly)
+ throws ZipException, IOException {
+ assertTrue("Assembly archive missing: " + assembly, assembly.isFile());
ZipFile zf = null;
- try
- {
- zf = new ZipFile( assembly );
+ try {
+ zf = new ZipFile(assembly);
LinkedHashSet<String> pathSet = new LinkedHashSet<String>();
- for ( Enumeration<? extends ZipEntry> enumeration = zf.entries();
enumeration.hasMoreElements(); )
- {
- pathSet.add( enumeration.nextElement().getName() );
+ for (Enumeration<? extends ZipEntry> enumeration = zf.entries();
enumeration.hasMoreElements(); ) {
+ pathSet.add(enumeration.nextElement().getName());
}
- assertArchiveContents( required, banned,
assembly.getAbsolutePath(), pathSet );
- }
- finally
- {
- if ( zf != null )
- {
+ assertArchiveContents(required, banned,
assembly.getAbsolutePath(), pathSet);
+ } finally {
+ if (zf != null) {
zf.close();
}
}
}
-
- private static void assertArchiveContents(Set<String> required,
Set<String> banned, String assemblyName, Set<String> contents )
- {
-
+
+ private static void assertArchiveContents(
+ Set<String> required, Set<String> banned, String assemblyName,
Set<String> contents) {
+
Set<String> missing = new HashSet<String>();
- for ( String name : required )
- {
- if ( !contents.contains( name ) )
- {
- missing.add( name );
+ for (String name : required) {
+ if (!contents.contains(name)) {
+ missing.add(name);
}
}
Set<String> banViolations = new HashSet<String>();
- for ( String name : banned )
- {
- if ( contents.contains( name ) )
- {
- banViolations.add( name );
+ for (String name : banned) {
+ if (contents.contains(name)) {
+ banViolations.add(name);
}
}
- if ( !missing.isEmpty() || !banViolations.isEmpty() )
- {
+ if (!missing.isEmpty() || !banViolations.isEmpty()) {
StringBuffer msg = new StringBuffer();
- msg.append( "The following errors were found in:\n\n" );
- msg.append( assemblyName );
- msg.append( "\n");
- msg.append( "\nThe following REQUIRED entries were missing from
the bundle archive:\n" );
-
- if ( missing.isEmpty() )
- {
- msg.append( "\nNone." );
- }
- else
- {
- for ( String name : missing )
- {
- msg.append( "\n" ).append( name );
+ msg.append("The following errors were found in:\n\n");
+ msg.append(assemblyName);
+ msg.append("\n");
+ msg.append("\nThe following REQUIRED entries were missing from the
bundle archive:\n");
+
+ if (missing.isEmpty()) {
+ msg.append("\nNone.");
+ } else {
+ for (String name : missing) {
+ msg.append("\n").append(name);
}
}
- msg.append( "\n\nThe following BANNED entries were present from
the bundle archive:\n" );
+ msg.append("\n\nThe following BANNED entries were present from the
bundle archive:\n");
- if ( banViolations.isEmpty() )
- {
- msg.append( "\nNone.\n" );
- }
- else
- {
- for ( String name : banViolations )
- {
- msg.append( "\n" ).append( name );
+ if (banViolations.isEmpty()) {
+ msg.append("\nNone.\n");
+ } else {
+ for (String name : banViolations) {
+ msg.append("\n").append(name);
}
}
-
- msg.append( "\n" ).append( "Archive contents:\n" );
- for ( String path : contents )
- {
- msg.append( "\n" ).append( path );
+
+ msg.append("\n").append("Archive contents:\n");
+ for (String path : contents) {
+ msg.append("\n").append(path);
}
- fail( msg.toString() );
+ fail(msg.toString());
}
-
-
}
- public static File getTestDir( String name )
- throws IOException, URISyntaxException
- {
+ public static File getTestDir(String name) throws IOException,
URISyntaxException {
ClassLoader cloader = Thread.currentThread().getContextClassLoader();
- URL resource = cloader.getResource( name );
+ URL resource = cloader.getResource(name);
- if ( resource == null )
- {
- throw new IOException( "Cannot find test directory: " + name );
+ if (resource == null) {
+ throw new IOException("Cannot find test directory: " + name);
}
- return new File( new URI( resource.toExternalForm()
).normalize().getPath() );
+ return new File(new
URI(resource.toExternalForm()).normalize().getPath());
}
-
}