Author: olamy Date: Fri Feb 1 15:56:53 2008 New Revision: 617714 URL: http://svn.apache.org/viewvc?rev=617714&view=rev Log: add a very simple zip plugin
Added: maven/sandbox/trunk/plugins/maven-zip-plugin/ (with props) maven/sandbox/trunk/plugins/maven-zip-plugin/pom.xml (with props) maven/sandbox/trunk/plugins/maven-zip-plugin/src/ maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/ maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/ (with props) maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/pom.xml (with props) maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/src/ maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/src/main/ maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/src/main/resources/ maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/src/main/resources/empty.txt (with props) maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/verify.bsh (with props) maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/ maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/java/ maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/java/org/ maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/java/org/apache/ maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/java/org/apache/maven/ maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/java/org/apache/maven/plugins/ maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/java/org/apache/maven/plugins/zip/ maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/java/org/apache/maven/plugins/zip/ZipMojo.java (with props) maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/resources/ maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/resources/META-INF/ maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/resources/META-INF/plexus/ maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/resources/META-INF/plexus/components.xml (with props) maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/ maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/apt/ maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/apt/index.apt (with props) maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/apt/usage.apt (with props) maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/site.xml (with props) Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Fri Feb 1 15:56:53 2008 @@ -0,0 +1,4 @@ +.classpath +target +.settings +.project Added: maven/sandbox/trunk/plugins/maven-zip-plugin/pom.xml URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-zip-plugin/pom.xml?rev=617714&view=auto ============================================================================== --- maven/sandbox/trunk/plugins/maven-zip-plugin/pom.xml (added) +++ maven/sandbox/trunk/plugins/maven-zip-plugin/pom.xml Fri Feb 1 15:56:53 2008 @@ -0,0 +1,172 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <parent> + <artifactId>maven-plugins</artifactId> + <groupId>org.apache.maven.plugins</groupId> + <version>10</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <artifactId>maven-zip-plugin</artifactId> + <packaging>maven-plugin</packaging> + <version>1.0-SNAPSHOT</version> + <name>Maven Zip Plugin</name> + <prerequisites> + <maven>2.0.6</maven> + </prerequisites> + + <scm> + <connection>scm:svn:https://svn.apache.org/repos/asf/maven/sandbox/trunk/plugins/maven-zip-plugin/</connection> + <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/sandbox/trunk/plugins/maven-zip-plugin/</developerConnection> + <url>http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-zip-plugin/</url> + </scm> + + <dependencies> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-plugin-api</artifactId> + <version>2.0.6</version> + </dependency> + + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-project</artifactId> + <version>2.0.6</version> + </dependency> + + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-archiver</artifactId> + <version>2.3</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-archiver</artifactId> + <version>1.0-alpha-9</version> + <exclusions> + <exclusion> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-container-default</artifactId> + </exclusion> + <exclusion> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-component-api</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-io</artifactId> + <version>1.0-alpha-1</version> + <exclusions> + <exclusion> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-container-default</artifactId> + </exclusion> + <exclusion> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-component-api</artifactId> + </exclusion> + </exclusions> + </dependency> + + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.maven.shared</groupId> + <artifactId>maven-plugin-testing-harness</artifactId> + <version>1.0-beta-1</version> + <scope>test</scope> + </dependency> + + </dependencies> + + <profiles> + <profile> + <id>integration-tests</id> + <activation> + <property> + <name>skipTests</name> + <value>!true</value> + </property> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-install-plugin</artifactId> + <version>2.2</version> + <executions> + <execution> + <id>integration-test</id> + <phase>pre-integration-test</phase> + <goals> + <goal>install-file</goal> + </goals> + <configuration> + <file>${project.build.directory}/${project.build.finalName}.jar</file> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${project.version}</version> + <packaging>${project.packaging}</packaging> + <pomFile>${basedir}/pom.xml</pomFile> + <createChecksum>true</createChecksum> + <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath> + <localRepositoryId>it-local-repo</localRepositoryId> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-invoker-plugin</artifactId> + <version>1.1</version> + <configuration> + <projectsDirectory>src/it</projectsDirectory> + <pomIncludes> + <pomInclude>**/**/pom.xml</pomInclude> + </pomIncludes> + <postBuildHookScript>verify.bsh</postBuildHookScript> + <localRepositoryPath>${basedir}/target/local-repo</localRepositoryPath> + <goals> + <goal>clean</goal> + <goal>package</goal> + </goals> + </configuration> + <executions> + <execution> + <id>integration-test</id> + <phase>integration-test</phase> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> +</project> Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/pom.xml ------------------------------------------------------------------------------ svn:executable = * Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/pom.xml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Fri Feb 1 15:56:53 2008 @@ -0,0 +1,3 @@ +build.log +target + Added: maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/pom.xml URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/pom.xml?rev=617714&view=auto ============================================================================== --- maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/pom.xml (added) +++ maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/pom.xml Fri Feb 1 15:56:53 2008 @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>simple-project</artifactId> + <version>1.0-SNAPSHOT</version> + + <packaging>zip</packaging> + + <build> + <plugins> + <plugin> + <artifactId>maven-zip-plugin</artifactId> + <version>@pom.version@</version> + <extensions>true</extensions> + </plugin> + </plugins> + + </build> + +</project> \ No newline at end of file Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/pom.xml ------------------------------------------------------------------------------ svn:executable = * Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/pom.xml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/src/main/resources/empty.txt URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/src/main/resources/empty.txt?rev=617714&view=auto ============================================================================== --- maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/src/main/resources/empty.txt (added) +++ maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/src/main/resources/empty.txt Fri Feb 1 15:56:53 2008 @@ -0,0 +1,18 @@ +#/* +# * Licensed to the Apache Software Foundation (ASF) under one +# * or more contributor license agreements. See the NOTICE file +# * distributed with this work for additional information +# * regarding copyright ownership. The ASF licenses this file +# * to you under the Apache License, Version 2.0 (the +# * "License"); you may not use this file except in compliance +# * with the License. You may obtain a copy of the License at +# * +# * http://www.apache.org/licenses/LICENSE-2.0 +# * +# * Unless required by applicable law or agreed to in writing, +# * software distributed under the License is distributed on an +# * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# * KIND, either express or implied. See the License for the +# * specific language governing permissions and limitations +# * under the License. +# */ \ No newline at end of file Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/src/main/resources/empty.txt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/src/main/resources/empty.txt ------------------------------------------------------------------------------ svn:executable = * Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/src/main/resources/empty.txt ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/verify.bsh URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/verify.bsh?rev=617714&view=auto ============================================================================== --- maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/verify.bsh (added) +++ maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/verify.bsh Fri Feb 1 15:56:53 2008 @@ -0,0 +1,84 @@ + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.io.*; +import java.util.*; +import java.util.jar.*; +import org.codehaus.plexus.util.*; + +boolean result = true; + +try +{ + File target = new File( basedir, "target" ); + if ( !target.exists() || !target.isDirectory() ) + { + System.err.println( "target file is missing or not a directory." ); + return false; + } + + File artifact = new File ( target, "simple-project-1.0-SNAPSHOT.zip" ); + if ( !artifact.exists() || artifact.isDirectory() ) + { + System.err.println( "artifact file is missing or a directory." ); + return false; + } + + String[] artifactNames = new String[] { "empty.txt", + "META-INF/maven/org.apache.maven.plugins/simple-project/pom.properties", + "META-INF/maven/org.apache.maven.plugins/simple-project/pom.xml" }; + + Set contents = new HashSet(); + + JarFile jar = new JarFile( artifact ); + Enumeration jarEntries = jar.entries(); + while ( jarEntries.hasMoreElements() ) + { + JarEntry entry = (JarEntry) jarEntries.nextElement(); + if ( !entry.isDirectory() ) + { + // Only compare files + contents.add( entry.getName() ); + } + } + + if ( artifactNames.length != contents.size() ) + { + System.err.println( "jar content size is different from the expected content size" ); + return false; + } + for ( int i = 0; i < artifactNames.length; i++ ) + { + String artifactName = artifactNames[i]; + if ( !contents.contains( artifactName ) ) + { + System.err.println( "Artifact[" + artifactName + "] not found in jar archive" ); + return false; + } + } + +} +catch( Throwable e ) +{ + e.printStackTrace(); + result = false; +} + +return result; Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/it/simple-project/verify.bsh ------------------------------------------------------------------------------ svn:executable = * Added: maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/java/org/apache/maven/plugins/zip/ZipMojo.java URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/java/org/apache/maven/plugins/zip/ZipMojo.java?rev=617714&view=auto ============================================================================== --- maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/java/org/apache/maven/plugins/zip/ZipMojo.java (added) +++ maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/java/org/apache/maven/plugins/zip/ZipMojo.java Fri Feb 1 15:56:53 2008 @@ -0,0 +1,172 @@ +/* + * 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.maven.plugins.zip; + +import java.io.File; + +import org.apache.maven.archiver.PomPropertiesUtil; +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.project.MavenProject; +import org.codehaus.plexus.archiver.zip.ZipArchiver; + +/** + * @author <a href="mailto:[EMAIL PROTECTED]">olamy</a> + * @since 12 janv. 08 + * @version $Id$ + * + * @goal zip + * @phase package + */ +public class ZipMojo + extends AbstractMojo +{ + + /** + * The maven project. + * + * @parameter expression="${project}" + * @required + * @readonly + */ + private MavenProject project; + + + /** + * Directory containing the classes. + * + * @parameter expression="${project.build.outputDirectory}" + * @required + */ + private File contentDirectory; + + /** + * Directory containing the generated ZIP. + * + * @parameter expression="${project.build.directory}" + * @required + */ + private File outputDirectory; + + /** + * Name of the generated ZIP. + * + * @parameter alias="zipName" expression="${zip.finalName}" default-value="${project.build.finalName}" + * @required + */ + private String finalName; + + /** + * Classifier to add to the artifact generated. If given, the artifact will be an attachment instead. + * + * @parameter + */ + private String classifier; + + /** + * The Jar archiver. + * + * @parameter expression="${component.org.codehaus.plexus.archiver.Archiver#zip}" + * @required + */ + private ZipArchiver zipArchiver; + + /** + * Include or not empty directories + * + * @parameter expression="${zip.includeEmptyDirs}" default-value="false" + */ + private boolean includeEmptyDirs; + + /** + * Whether creating the archive should be forced. + * + * @parameter expression="${zip.forceCreation}" default-value="false" + */ + private boolean forceCreation; + + /** + * Adding pom.xml and pom.properties to the archive. + * + * @parameter expression="${addMavenDescriptor}" default-value="true" + */ + private boolean addMavenDescriptor; + + + protected File getZipFile( File basedir, String finalName, String classifier ) + { + if ( classifier == null ) + { + classifier = ""; + } + else if ( classifier.trim().length() > 0 && !classifier.startsWith( "-" ) ) + { + classifier = "-" + classifier; + } + + return new File( basedir, finalName + classifier + ".zip" ); + } + + /** + * @see org.apache.maven.plugin.Mojo#execute() + */ + public void execute() + throws MojoExecutionException, MojoFailureException + { + try + { + + File zipFile = getZipFile( outputDirectory, finalName, classifier ); + + zipArchiver.setDestFile( zipFile ); + zipArchiver.setIncludeEmptyDirs( includeEmptyDirs ); + zipArchiver.setCompress( true ); + zipArchiver.setForced( forceCreation ); + + if ( addMavenDescriptor ) + { + if ( project.getArtifact().isSnapshot() ) + { + project.setVersion( project.getArtifact().getVersion() ); + } + + String groupId = project.getGroupId(); + + String artifactId = project.getArtifactId(); + + zipArchiver.addFile( project.getFile(), "META-INF/maven/" + groupId + "/" + artifactId + "/pom.xml" ); + PomPropertiesUtil pomPropertiesUtil = new PomPropertiesUtil(); + File dir = new File( project.getBuild().getDirectory(), "maven-zip-plugin" ); + File pomPropertiesFile = new File( dir, "pom.properties" ); + pomPropertiesUtil.createPomProperties( project, zipArchiver, pomPropertiesFile, forceCreation ); + } + zipArchiver.addDirectory( contentDirectory ); + zipArchiver.createArchive(); + project.getArtifact().setFile( zipFile ); + + } + catch ( Exception e ) + { + throw new MojoExecutionException( "Error assembling ZIP", e ); + } + + } + +} Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/java/org/apache/maven/plugins/zip/ZipMojo.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/java/org/apache/maven/plugins/zip/ZipMojo.java ------------------------------------------------------------------------------ svn:executable = * Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/java/org/apache/maven/plugins/zip/ZipMojo.java ------------------------------------------------------------------------------ --- svn:keywords (added) +++ svn:keywords Fri Feb 1 15:56:53 2008 @@ -0,0 +1 @@ +URL HeadURL Author LastChangedBy Date LastChangedDate Rev Revision LastChangedRevision Id Added: maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/resources/META-INF/plexus/components.xml URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/resources/META-INF/plexus/components.xml?rev=617714&view=auto ============================================================================== --- maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/resources/META-INF/plexus/components.xml (added) +++ maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/resources/META-INF/plexus/components.xml Fri Feb 1 15:56:53 2008 @@ -0,0 +1,23 @@ +<component-set> + <components> + <component> + <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role> + <role-hint>zip</role-hint> + <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation> + <configuration> + <phases> + <process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources> + <!-- + <compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile> + <process-test-resources>org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources> + <test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile> + <test>org.apache.maven.plugins:maven-surefire-plugin:test</test> + --> + <package>org.apache.maven.plugins:maven-zip-plugin:zip</package> + <install>org.apache.maven.plugins:maven-install-plugin:install</install> + <deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy> + </phases> + </configuration> + </component> + </components> +</component-set> \ No newline at end of file Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/resources/META-INF/plexus/components.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/resources/META-INF/plexus/components.xml ------------------------------------------------------------------------------ svn:executable = * Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/main/resources/META-INF/plexus/components.xml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/apt/index.apt URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/apt/index.apt?rev=617714&view=auto ============================================================================== --- maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/apt/index.apt (added) +++ maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/apt/index.apt Fri Feb 1 15:56:53 2008 @@ -0,0 +1,41 @@ + ------ + Introduction + ------ + Dennis Lundberg + ------ + 2 February 2008 + ------ + + ~~ 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. + + ~~ NOTE: For help with the syntax of this file, see: + ~~ http://maven.apache.org/guides/mini/guide-apt-format.html + +Maven 2 Zip Plugin + + This plugin provides the capability to build a zip file. + +* Goals Overview + + * {{{zip-mojo.html}zip:zip}} create a zip file for a content directory (default is $\{project.build.outputDirectory\} ). + + [] + +* Usage + + Instructions on how to use the Zip Plugin can be found {{{usage.html}here}}. \ No newline at end of file Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/apt/index.apt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/apt/index.apt ------------------------------------------------------------------------------ svn:executable = * Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/apt/index.apt ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/apt/usage.apt URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/apt/usage.apt?rev=617714&view=auto ============================================================================== --- maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/apt/usage.apt (added) +++ maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/apt/usage.apt Fri Feb 1 15:56:53 2008 @@ -0,0 +1,61 @@ + ------ + Introduction + ------ + Dennis Lundberg + ------ + 2 February 2008 + ------ + + ~~ 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. + + ~~ NOTE: For help with the syntax of this file, see: + ~~ http://maven.apache.org/guides/mini/guide-apt-format.html + +Usage + + A brief example on how to use this plugin. + +* Use the zip packaging + + You must the packaging of your project to zip and declare the maven-zip-plugin with extensions set to true + (the zip packaging is not in maven core) + ++-----------------+ +<project> + ... + <packaging>zip</packaging> + ... + <build> + <plugins> + ... + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-zip-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <!-- default value is ${project.build.outputDirectory} --> + <!-- this means all of your resources will be in the zip file --> + <contentDirectory></contentDirectory> + </configuration> + </plugin> + ... + </plugins> + </build> + ... +</project> ++-----------------+ \ No newline at end of file Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/apt/usage.apt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/apt/usage.apt ------------------------------------------------------------------------------ svn:executable = * Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/apt/usage.apt ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/site.xml URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/site.xml?rev=617714&view=auto ============================================================================== --- maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/site.xml (added) +++ maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/site.xml Fri Feb 1 15:56:53 2008 @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<project> + <!-- TODO: Most of the stuff in this file should be inherited from the shared parent --> + <!-- TODO: banners, skin, publish date, version should be inherited from Maven itself --> + <bannerLeft> + <name>${project.name}</name> + <src>http://maven.apache.org/images/apache-maven-project-2.png</src> + <href>http://maven.apache.org/</href> + </bannerLeft> + <bannerRight> + <src>http://maven.apache.org/images/maven-logo-2.gif</src> + </bannerRight> + <skin> + <groupId>org.apache.maven.skins</groupId> + <artifactId>maven-stylus-skin</artifactId> + </skin> + <publishDate format="dd MMM yyyy" position="left" /> + <version position="left" /> + <body> + <menu name="Overview"> + <item name="Introduction" href="index.html"/> + <item name="Goals" href="plugin-info.html"/> + </menu> + <!-- TODO: Link, head, reports should be inherited --> + <!-- TODO: use breadcrumbs more structure, links for links, and inherit subprojects as a menu or not at all --> + <links> + <item name="Apache" href="http://www.apache.org/"/> + <item name="Maven 1.x" href="http://maven.apache.org/maven-1.x"/> + <item name="Maven 2.x" href="http://maven.apache.org/"/> + <item name="Maven 2.x Plugins" href="http://maven.apache.org/plugins/"/> + <item name="Continuum" href="http://maven.apache.org/continuum"/> + <item name="SCM" href="http://maven.apache.org/scm"/> + <item name="Wagon" href="http://maven.apache.org/wagon"/> + <item name="JXR" href="http://maven.apache.org/jxr"/> + <item name="Doxia" href="http://maven.apache.org/doxia"/> + </links> + <head> + <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> + </script> + <script type="text/javascript"> + _uacct = "UA-140879-1"; + urchinTracker(); + </script> + </head> + <menu ref="reports" inherit="bottom" /> + </body> +</project> Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/site.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/site.xml ------------------------------------------------------------------------------ svn:executable = * Propchange: maven/sandbox/trunk/plugins/maven-zip-plugin/src/site/site.xml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision"