Author: bdemers Date: Tue Nov 23 14:35:06 2010 New Revision: 1038139 URL: http://svn.apache.org/viewvc?rev=1038139&view=rev Log: Adding a zip and tar source assembly, some apache projects need zips and tars for source distributions
Added: maven/resources/trunk/apache-source-release-assembly-descriptor/src/main/resources/assemblies/source-release-zip-tar.xml maven/resources/trunk/apache-source-release-assembly-descriptor/src/main/resources/assemblies/source-shared.xml Modified: maven/resources/trunk/apache-source-release-assembly-descriptor/pom.xml maven/resources/trunk/apache-source-release-assembly-descriptor/src/main/resources/assemblies/source-release.xml maven/resources/trunk/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_000_BasicArchiveCreation.java Modified: maven/resources/trunk/apache-source-release-assembly-descriptor/pom.xml URL: http://svn.apache.org/viewvc/maven/resources/trunk/apache-source-release-assembly-descriptor/pom.xml?rev=1038139&r1=1038138&r2=1038139&view=diff ============================================================================== --- maven/resources/trunk/apache-source-release-assembly-descriptor/pom.xml (original) +++ maven/resources/trunk/apache-source-release-assembly-descriptor/pom.xml Tue Nov 23 14:35:06 2010 @@ -59,6 +59,12 @@ under the License. <version>1.5.8</version> <scope>test</scope> </dependency> + <dependency> + <groupId>org.apache.maven.shared</groupId> + <artifactId>maven-verifier</artifactId> + <version>1.2</version> + <scope>test</scope> + </dependency> </dependencies> <build> @@ -177,15 +183,6 @@ under the License. <profile> <id>run-its</id> - <dependencies> - <dependency> - <groupId>org.apache.maven.shared</groupId> - <artifactId>maven-verifier</artifactId> - <version>1.2</version> - <scope>test</scope> - </dependency> - </dependencies> - <build> <plugins> <plugin> Added: maven/resources/trunk/apache-source-release-assembly-descriptor/src/main/resources/assemblies/source-release-zip-tar.xml URL: http://svn.apache.org/viewvc/maven/resources/trunk/apache-source-release-assembly-descriptor/src/main/resources/assemblies/source-release-zip-tar.xml?rev=1038139&view=auto ============================================================================== --- maven/resources/trunk/apache-source-release-assembly-descriptor/src/main/resources/assemblies/source-release-zip-tar.xml (added) +++ maven/resources/trunk/apache-source-release-assembly-descriptor/src/main/resources/assemblies/source-release-zip-tar.xml Tue Nov 23 14:35:06 2010 @@ -0,0 +1,30 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<assembly> + <id>source-release</id> + <formats> + <format>zip</format> + <format>tar.gz</format> + </formats> + <componentDescriptors> + <componentDescriptor>assemblies/source-shared.xml</componentDescriptor> + </componentDescriptors> +</assembly> Modified: maven/resources/trunk/apache-source-release-assembly-descriptor/src/main/resources/assemblies/source-release.xml URL: http://svn.apache.org/viewvc/maven/resources/trunk/apache-source-release-assembly-descriptor/src/main/resources/assemblies/source-release.xml?rev=1038139&r1=1038138&r2=1038139&view=diff ============================================================================== --- maven/resources/trunk/apache-source-release-assembly-descriptor/src/main/resources/assemblies/source-release.xml (original) +++ maven/resources/trunk/apache-source-release-assembly-descriptor/src/main/resources/assemblies/source-release.xml Tue Nov 23 14:35:06 2010 @@ -23,52 +23,7 @@ <formats> <format>zip</format> </formats> - <fileSets> - <!-- main project directory structure --> - <fileSet> - <directory>.</directory> - <outputDirectory>/</outputDirectory> - <useDefaultExcludes>true</useDefaultExcludes> - <excludes> - <!-- build output --> - <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*]</exclude> - - <!-- NOTE: Most of the following excludes should not be required - if the standard release process is followed. This is because the - release plugin checks out project sources into a location like - target/checkout, then runs the build from there. The result is - a source-release archive that comes from a pretty clean directory - structure. - - HOWEVER, if the release plugin is configured to run extra goals - or generate a project website, it's definitely possible that some - of these files will be present. So, it's safer to exclude them. - --> - - <!-- IDEs --> - <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml]</exclude> - <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project]</exclude> - <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath]</exclude> - <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws]</exclude> - <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr]</exclude> - <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml]</exclude> - <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?]</exclude> - <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?]</exclude> - <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?]</exclude> - <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?]</exclude> - - <!-- misc --> - <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?cobertura\.ser]</exclude> - - <!-- release-plugin temp files --> - <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup]</exclude> - <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties]</exclude> - </excludes> - </fileSet> - <!-- license, readme, etc. calculated at build time --> - <fileSet> - <directory>${project.build.directory}/maven-shared-archive-resources/META-INF</directory> - <outputDirectory>/</outputDirectory> - </fileSet> - </fileSets> + <componentDescriptors> + <componentDescriptor>assemblies/source-shared.xml</componentDescriptor> + </componentDescriptors> </assembly> Added: maven/resources/trunk/apache-source-release-assembly-descriptor/src/main/resources/assemblies/source-shared.xml URL: http://svn.apache.org/viewvc/maven/resources/trunk/apache-source-release-assembly-descriptor/src/main/resources/assemblies/source-shared.xml?rev=1038139&view=auto ============================================================================== --- maven/resources/trunk/apache-source-release-assembly-descriptor/src/main/resources/assemblies/source-shared.xml (added) +++ maven/resources/trunk/apache-source-release-assembly-descriptor/src/main/resources/assemblies/source-shared.xml Tue Nov 23 14:35:06 2010 @@ -0,0 +1,70 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<component> + <fileSets> + <!-- main project directory structure --> + <fileSet> + <directory>.</directory> + <outputDirectory>/</outputDirectory> + <useDefaultExcludes>true</useDefaultExcludes> + <excludes> + <!-- build output --> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*]</exclude> + + <!-- NOTE: Most of the following excludes should not be required + if the standard release process is followed. This is because the + release plugin checks out project sources into a location like + target/checkout, then runs the build from there. The result is + a source-release archive that comes from a pretty clean directory + structure. + + HOWEVER, if the release plugin is configured to run extra goals + or generate a project website, it's definitely possible that some + of these files will be present. So, it's safer to exclude them. + --> + + <!-- IDEs --> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?]</exclude> + + <!-- misc --> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?cobertura\.ser]</exclude> + + <!-- release-plugin temp files --> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup]</exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties]</exclude> + </excludes> + </fileSet> + <!-- license, readme, etc. calculated at build time --> + <fileSet> + <directory>${project.build.directory}/maven-shared-archive-resources/META-INF</directory> + <outputDirectory>/</outputDirectory> + </fileSet> + </fileSets> +</component> Modified: maven/resources/trunk/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_000_BasicArchiveCreation.java URL: http://svn.apache.org/viewvc/maven/resources/trunk/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_000_BasicArchiveCreation.java?rev=1038139&r1=1038138&r2=1038139&view=diff ============================================================================== --- maven/resources/trunk/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_000_BasicArchiveCreation.java (original) +++ maven/resources/trunk/apache-source-release-assembly-descriptor/src/test/java/org/apache/its/IT_000_BasicArchiveCreation.java Tue Nov 23 14:35:06 2010 @@ -35,6 +35,8 @@ import java.util.Collections; import java.util.HashSet; import java.util.Set; +import junit.framework.Assert; + public class IT_000_BasicArchiveCreation { @@ -54,6 +56,10 @@ public class IT_000_BasicArchiveCreation 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" ); Set<String> required = new HashSet<String>();