Author: jtolentino Date: Wed Dec 6 14:21:15 2006 New Revision: 483264 URL: http://svn.apache.org/viewvc?view=rev&rev=483264 Log: New plugin for jira report generation that uses plexus-swizzle.
Added: maven/sandbox/plugins/maven-swizzle-plugin/ maven/sandbox/plugins/maven-swizzle-plugin/pom.xml maven/sandbox/plugins/maven-swizzle-plugin/src/ maven/sandbox/plugins/maven-swizzle-plugin/src/main/ maven/sandbox/plugins/maven-swizzle-plugin/src/main/java/ maven/sandbox/plugins/maven-swizzle-plugin/src/main/java/org/ maven/sandbox/plugins/maven-swizzle-plugin/src/main/java/org/apache/ maven/sandbox/plugins/maven-swizzle-plugin/src/main/java/org/apache/maven/ maven/sandbox/plugins/maven-swizzle-plugin/src/main/java/org/apache/maven/plugin/ maven/sandbox/plugins/maven-swizzle-plugin/src/main/java/org/apache/maven/plugin/swizzle/ maven/sandbox/plugins/maven-swizzle-plugin/src/main/java/org/apache/maven/plugin/swizzle/ReportMojo.java maven/sandbox/plugins/maven-swizzle-plugin/src/site/ maven/sandbox/plugins/maven-swizzle-plugin/src/site/apt/ maven/sandbox/plugins/maven-swizzle-plugin/src/site/apt/examples/ maven/sandbox/plugins/maven-swizzle-plugin/src/site/apt/examples/generating-resolved-issues-report.apt maven/sandbox/plugins/maven-swizzle-plugin/src/site/fml/ maven/sandbox/plugins/maven-swizzle-plugin/src/site/fml/faq.fml maven/sandbox/plugins/maven-swizzle-plugin/src/site/index.apt maven/sandbox/plugins/maven-swizzle-plugin/src/site/site.xml maven/sandbox/plugins/maven-swizzle-plugin/src/site/usage.apt maven/sandbox/plugins/maven-swizzle-plugin/src/test/ maven/sandbox/plugins/maven-swizzle-plugin/src/test/java/ maven/sandbox/plugins/maven-swizzle-plugin/src/test/java/org/ maven/sandbox/plugins/maven-swizzle-plugin/src/test/java/org/apache/ maven/sandbox/plugins/maven-swizzle-plugin/src/test/java/org/apache/maven/ maven/sandbox/plugins/maven-swizzle-plugin/src/test/java/org/apache/maven/plugin/ maven/sandbox/plugins/maven-swizzle-plugin/src/test/java/org/apache/maven/plugin/swizzle/ maven/sandbox/plugins/maven-swizzle-plugin/src/test/java/org/apache/maven/plugin/swizzle/ReportMojoTest.java maven/sandbox/plugins/maven-swizzle-plugin/src/test/resources/ maven/sandbox/plugins/maven-swizzle-plugin/src/test/resources/unit/ maven/sandbox/plugins/maven-swizzle-plugin/src/test/resources/unit/simple.xml Added: maven/sandbox/plugins/maven-swizzle-plugin/pom.xml URL: http://svn.apache.org/viewvc/maven/sandbox/plugins/maven-swizzle-plugin/pom.xml?view=auto&rev=483264 ============================================================================== --- maven/sandbox/plugins/maven-swizzle-plugin/pom.xml (added) +++ maven/sandbox/plugins/maven-swizzle-plugin/pom.xml Wed Dec 6 14:21:15 2006 @@ -0,0 +1,61 @@ +<!-- + +Copyright 2006 + +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>4</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>org.apache.maven.plugin.swizzle</groupId> + <artifactId>maven-swizzle-plugin</artifactId> + <packaging>maven-plugin</packaging> + <version>1.0-SNAPSHOT</version> + <name>maven-swizzle-plugin Maven Mojo</name> + <url>http://maven.apache.org</url> + <dependencies> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-plugin-api</artifactId> + <version>2.0</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-swizzle</artifactId> + <version>1.0-SNAPSHOT</version> + </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> +</project> Added: maven/sandbox/plugins/maven-swizzle-plugin/src/main/java/org/apache/maven/plugin/swizzle/ReportMojo.java URL: http://svn.apache.org/viewvc/maven/sandbox/plugins/maven-swizzle-plugin/src/main/java/org/apache/maven/plugin/swizzle/ReportMojo.java?view=auto&rev=483264 ============================================================================== --- maven/sandbox/plugins/maven-swizzle-plugin/src/main/java/org/apache/maven/plugin/swizzle/ReportMojo.java (added) +++ maven/sandbox/plugins/maven-swizzle-plugin/src/main/java/org/apache/maven/plugin/swizzle/ReportMojo.java Wed Dec 6 14:21:15 2006 @@ -0,0 +1,40 @@ +package org.apache.maven.plugin.swizzle; + +/* + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; + +import org.codehaus.plexus.swizzle.JiraReport; + +/** + * Goal which generates a swizzle report based on velocity template + * supplied through a ReportConfiguration + * + * @goal generate + */ +public class ReportMojo + extends AbstractMojo +{ + private JiraReport report; + + public void execute() + throws MojoExecutionException + { + System.out.println( "This is template." ); + } +} Added: maven/sandbox/plugins/maven-swizzle-plugin/src/site/apt/examples/generating-resolved-issues-report.apt URL: http://svn.apache.org/viewvc/maven/sandbox/plugins/maven-swizzle-plugin/src/site/apt/examples/generating-resolved-issues-report.apt?view=auto&rev=483264 ============================================================================== --- maven/sandbox/plugins/maven-swizzle-plugin/src/site/apt/examples/generating-resolved-issues-report.apt (added) +++ maven/sandbox/plugins/maven-swizzle-plugin/src/site/apt/examples/generating-resolved-issues-report.apt Wed Dec 6 14:21:15 2006 @@ -0,0 +1 @@ +just a template. will fill this up later. \ No newline at end of file Added: maven/sandbox/plugins/maven-swizzle-plugin/src/site/fml/faq.fml URL: http://svn.apache.org/viewvc/maven/sandbox/plugins/maven-swizzle-plugin/src/site/fml/faq.fml?view=auto&rev=483264 ============================================================================== --- maven/sandbox/plugins/maven-swizzle-plugin/src/site/fml/faq.fml (added) +++ maven/sandbox/plugins/maven-swizzle-plugin/src/site/fml/faq.fml Wed Dec 6 14:21:15 2006 @@ -0,0 +1 @@ +This is a new plugin. No FAQs yet. \ No newline at end of file Added: maven/sandbox/plugins/maven-swizzle-plugin/src/site/index.apt URL: http://svn.apache.org/viewvc/maven/sandbox/plugins/maven-swizzle-plugin/src/site/index.apt?view=auto&rev=483264 ============================================================================== --- maven/sandbox/plugins/maven-swizzle-plugin/src/site/index.apt (added) +++ maven/sandbox/plugins/maven-swizzle-plugin/src/site/index.apt Wed Dec 6 14:21:15 2006 @@ -0,0 +1 @@ +just a template. will fill this up later. \ No newline at end of file Added: maven/sandbox/plugins/maven-swizzle-plugin/src/site/site.xml URL: http://svn.apache.org/viewvc/maven/sandbox/plugins/maven-swizzle-plugin/src/site/site.xml?view=auto&rev=483264 ============================================================================== --- maven/sandbox/plugins/maven-swizzle-plugin/src/site/site.xml (added) +++ maven/sandbox/plugins/maven-swizzle-plugin/src/site/site.xml Wed Dec 6 14:21:15 2006 @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + +<!-- +Copyright 2006 Apache Software Foundation + +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> + <body> + <menu name="Overview"> + <item name="Introduction" href="index.html"/> + <item name="Goals" href="plugin-info.html"/> + <item name="Usage" href="usage.html"/> + <item name="FAQ" href="faq.html"/> + </menu> + <menu name="Examples"> + <item name="Generating Resolved Issues Report" href="examples/generating-resolved-issues-report.html"/> + </menu> + </body> +</project> Added: maven/sandbox/plugins/maven-swizzle-plugin/src/site/usage.apt URL: http://svn.apache.org/viewvc/maven/sandbox/plugins/maven-swizzle-plugin/src/site/usage.apt?view=auto&rev=483264 ============================================================================== --- maven/sandbox/plugins/maven-swizzle-plugin/src/site/usage.apt (added) +++ maven/sandbox/plugins/maven-swizzle-plugin/src/site/usage.apt Wed Dec 6 14:21:15 2006 @@ -0,0 +1 @@ +just a template. will fill this up later. \ No newline at end of file Added: maven/sandbox/plugins/maven-swizzle-plugin/src/test/java/org/apache/maven/plugin/swizzle/ReportMojoTest.java URL: http://svn.apache.org/viewvc/maven/sandbox/plugins/maven-swizzle-plugin/src/test/java/org/apache/maven/plugin/swizzle/ReportMojoTest.java?view=auto&rev=483264 ============================================================================== --- maven/sandbox/plugins/maven-swizzle-plugin/src/test/java/org/apache/maven/plugin/swizzle/ReportMojoTest.java (added) +++ maven/sandbox/plugins/maven-swizzle-plugin/src/test/java/org/apache/maven/plugin/swizzle/ReportMojoTest.java Wed Dec 6 14:21:15 2006 @@ -0,0 +1,40 @@ +/** + * + * Copyright 2006 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.maven.plugin.swizzle; + +import org.apache.maven.plugin.testing.AbstractMojoTestCase; + +import java.io.File; + +/** + * Author: John Tolentino + */ +public class ReportMojoTest + extends AbstractMojoTestCase +{ + private ReportMojo mojo; + + public void testSimple() + throws Exception + { + File pom = new File( getBasedir(), "target/test-classes/unit/simple.xml" ); + mojo = (ReportMojo) lookupMojo( "generate", pom ); + + assertNotNull( mojo ); + } +} Added: maven/sandbox/plugins/maven-swizzle-plugin/src/test/resources/unit/simple.xml URL: http://svn.apache.org/viewvc/maven/sandbox/plugins/maven-swizzle-plugin/src/test/resources/unit/simple.xml?view=auto&rev=483264 ============================================================================== --- maven/sandbox/plugins/maven-swizzle-plugin/src/test/resources/unit/simple.xml (added) +++ maven/sandbox/plugins/maven-swizzle-plugin/src/test/resources/unit/simple.xml Wed Dec 6 14:21:15 2006 @@ -0,0 +1,34 @@ +<!-- + +Copyright 2006 + +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> + <name>swizzle-plugin-test</name> + <build> + <plugins> + <plugin> + <artifactId>maven-swizzle-plugin</artifactId> + <configuration> + </configuration> + </plugin> + </plugins> + </build> +</project>