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-reporting-api.git

commit 03feeacf025b1f0e12e3e60e99c4ee1d8161a44e
Author: Jason van Zyl <[email protected]>
AuthorDate: Sat Mar 28 19:02:09 2009 +0000

    o copy of the reporting api, removed from my maven 3.x branch
    
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/shared/trunk@759551 
13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            | 49 +++++++++++++++++
 .../maven/reporting/MavenMultiPageReport.java      | 40 ++++++++++++++
 .../org/apache/maven/reporting/MavenReport.java    | 64 ++++++++++++++++++++++
 .../maven/reporting/MavenReportException.java      | 40 ++++++++++++++
 .../maven/reporting/MavenReportRenderer.java       | 33 +++++++++++
 src/main/resources/default-report.xml              | 25 +++++++++
 src/site/site.xml                                  |  6 ++
 7 files changed, 257 insertions(+)

diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..2aee138
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,49 @@
+<?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.
+-->
+
+<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";>
+  <parent>
+    <artifactId>maven</artifactId>
+    <groupId>org.apache.maven</groupId>
+    <version>3.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>maven-reporting-api</artifactId>
+  <name>Maven Reporting API</name>
+  <developers>
+    <developer>
+      <id>vsiveton</id>
+      <name>Vincent Siveton</name>
+      <email>[email protected]</email>
+      <roles>
+        <role>Java Developer</role>
+      </roles>
+      <timezone>-5</timezone>
+    </developer>
+  </developers>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-sink-api</artifactId>
+      <version>1.0-alpha-9</version>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/src/main/java/org/apache/maven/reporting/MavenMultiPageReport.java 
b/src/main/java/org/apache/maven/reporting/MavenMultiPageReport.java
new file mode 100644
index 0000000..f746d39
--- /dev/null
+++ b/src/main/java/org/apache/maven/reporting/MavenMultiPageReport.java
@@ -0,0 +1,40 @@
+package org.apache.maven.reporting;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.doxia.sink.SinkFactory;
+
+import java.util.Locale;
+
+/**
+ * Temporary class for backwards compatibility. This method
+ * should be moved to the MavenReport class, and the other 'generate'
+ * method should be dropped. But that will render all reporting mojo's 
+ * uncompilable. 
+ *
+ * @author <a href="mailto:[email protected]";>Kenney Westerhof</a>
+ */
+public interface MavenMultiPageReport
+    extends MavenReport
+{
+    void generate( Sink sink, SinkFactory sinkFactory, Locale locale )
+        throws MavenReportException;
+}
diff --git a/src/main/java/org/apache/maven/reporting/MavenReport.java 
b/src/main/java/org/apache/maven/reporting/MavenReport.java
new file mode 100644
index 0000000..bc16f80
--- /dev/null
+++ b/src/main/java/org/apache/maven/reporting/MavenReport.java
@@ -0,0 +1,64 @@
+package org.apache.maven.reporting;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.codehaus.doxia.sink.Sink;
+
+import java.io.File;
+import java.util.Locale;
+
+/**
+ * The basis for a Maven report.
+ *
+ * @author Brett Porter
+ * @author <a href="[email protected]">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public interface MavenReport
+{
+    String ROLE = MavenReport.class.getName();
+
+    /** @deprecated For removal in Maven 3.0 or when reporting-api is 
decoupled from the core, as categories are dynamic. */
+    String CATEGORY_PROJECT_INFORMATION = "Project Info";
+
+    /** @deprecated For removal in Maven 3.0 or when reporting-api is 
decoupled from the core, as categories are dynamic. */
+    String CATEGORY_PROJECT_REPORTS = "Project Reports";
+
+    // eventually, we must replace this with the o.a.m.d.s.Sink class as a 
parameter
+    void generate( Sink sink, Locale locale )
+        throws MavenReportException;
+
+    String getOutputName();
+
+    String getName( Locale locale );
+
+    String getCategoryName();
+
+    String getDescription( Locale locale );
+
+    // TODO: remove?
+    void setReportOutputDirectory( File outputDirectory );
+
+    File getReportOutputDirectory();
+
+    boolean isExternalReport();
+
+    boolean canGenerateReport();
+}
diff --git a/src/main/java/org/apache/maven/reporting/MavenReportException.java 
b/src/main/java/org/apache/maven/reporting/MavenReportException.java
new file mode 100644
index 0000000..14d0794
--- /dev/null
+++ b/src/main/java/org/apache/maven/reporting/MavenReportException.java
@@ -0,0 +1,40 @@
+package org.apache.maven.reporting;
+
+/*
+ * 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.
+ */
+
+/**
+ * An exception occurring during the execution of a Maven report.
+ *
+ * @author Brett Porter
+ * @author <a href="[email protected]">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public class MavenReportException extends Exception
+{
+    public MavenReportException( String msg )
+    {
+        super( msg );
+    }
+
+    public MavenReportException( String msg, Exception e )
+    {
+        super( msg, e );
+    }
+}
diff --git a/src/main/java/org/apache/maven/reporting/MavenReportRenderer.java 
b/src/main/java/org/apache/maven/reporting/MavenReportRenderer.java
new file mode 100644
index 0000000..6471460
--- /dev/null
+++ b/src/main/java/org/apache/maven/reporting/MavenReportRenderer.java
@@ -0,0 +1,33 @@
+package org.apache.maven.reporting;
+
+/*
+ * 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.
+ */
+
+/**
+ * @author Jason van Zyl
+ * @author <a href="[email protected]">Emmanuel Venisse</a>
+ * @version $Id$
+ * @todo Later it may be appropriate to create something like a 
VelocityMavenReportRenderer that could take a velocity template and pipe that 
through Doxia rather than coding them up like this.
+ */
+public interface MavenReportRenderer
+{
+    String getTitle();
+
+    void render();
+}
\ No newline at end of file
diff --git a/src/main/resources/default-report.xml 
b/src/main/resources/default-report.xml
new file mode 100644
index 0000000..dde8d0d
--- /dev/null
+++ b/src/main/resources/default-report.xml
@@ -0,0 +1,25 @@
+<?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 name="${project.name}">
+  <body>
+    ${reports}
+  </body>
+</project>
diff --git a/src/site/site.xml b/src/site/site.xml
new file mode 100644
index 0000000..15f431a
--- /dev/null
+++ b/src/site/site.xml
@@ -0,0 +1,6 @@
+<project>
+  <body>
+    <menu ref="parent"/>
+    <menu ref="reports"/>
+  </body>
+</project>
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to