From 7b7f7659d812310dcc0a9763bde554d103e0f310 Mon Sep 17 00:00:00 2001 From: Brett Leslie Porter Date: Thu, 17 Feb 2005 07:00:25 +0000 Subject: [PATCH] Initial revision git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163361 13f79535-47bb-0310-9956-ffa450edef68 --- maven-reporting-api/pom.xml | 26 +++++++++++++++ .../reporting/DefaultMavenReportManager.java | 33 +++++++++++++++++++ .../apache/maven/reporting/MavenReport.java | 33 +++++++++++++++++++ .../maven/reporting/MavenReportException.java | 31 +++++++++++++++++ .../maven/reporting/MavenReportManager.java | 30 +++++++++++++++++ 5 files changed, 153 insertions(+) create mode 100755 maven-reporting-api/pom.xml create mode 100755 maven-reporting-api/src/main/java/org/apache/maven/reporting/DefaultMavenReportManager.java create mode 100755 maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReport.java create mode 100755 maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReportException.java create mode 100755 maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReportManager.java diff --git a/maven-reporting-api/pom.xml b/maven-reporting-api/pom.xml new file mode 100755 index 0000000000..57f3371b39 --- /dev/null +++ b/maven-reporting-api/pom.xml @@ -0,0 +1,26 @@ + + 4.0.0 + + maven + maven-component + 2.0-SNAPSHOT + + maven + maven-reporting-api + 2.0-SNAPSHOT + 2005 + org.apache.maven.reporting + + + + doxia + doxia-core + 1.0-alpha-2-SNAPSHOT + + + junit + junit + 3.8.1 + + + diff --git a/maven-reporting-api/src/main/java/org/apache/maven/reporting/DefaultMavenReportManager.java b/maven-reporting-api/src/main/java/org/apache/maven/reporting/DefaultMavenReportManager.java new file mode 100755 index 0000000000..bcbd9e3950 --- /dev/null +++ b/maven-reporting-api/src/main/java/org/apache/maven/reporting/DefaultMavenReportManager.java @@ -0,0 +1,33 @@ +package org.apache.maven.reporting; + +/* + * Copyright 2005 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. + */ + +/** + * Manage the set of available reports. + * + * @author Brett Porter + * @version $Id$ + */ +public class DefaultMavenReportManager + implements MavenReportManager +{ + public MavenReport getReport( String name ) + { + // TODO: return the report + return null; + } +} diff --git a/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReport.java b/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReport.java new file mode 100755 index 0000000000..8501e00d30 --- /dev/null +++ b/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReport.java @@ -0,0 +1,33 @@ +package org.apache.maven.reporting; + +/* + * Copyright 2005 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.codehaus.doxia.sink.Sink; + +/** + * The basis for a Maven report. + * + * @author Brett Porter + * @version $Id$ + */ +public interface MavenReport +{ + String ROLE = MavenReport.class.getName(); + + void execute( Sink sink ) + throws MavenReportException; +} diff --git a/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReportException.java b/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReportException.java new file mode 100755 index 0000000000..5571cc36e0 --- /dev/null +++ b/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReportException.java @@ -0,0 +1,31 @@ +package org.apache.maven.reporting; + +/* + * Copyright 2005 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. + */ + +/** + * An exception occurring during the execution of a Maven report. + * + * @author Brett Porter + * @version $Id$ + */ +public class MavenReportException extends Exception +{ + public MavenReportException( String msg, Exception e ) + { + super( msg, e ); + } +} diff --git a/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReportManager.java b/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReportManager.java new file mode 100755 index 0000000000..d992a9e9d4 --- /dev/null +++ b/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReportManager.java @@ -0,0 +1,30 @@ +package org.apache.maven.reporting; + +/* + * Copyright 2005 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. + */ + +/** + * Manage the set of available reports. + * + * @author Brett Porter + * @version $Id$ + */ +public interface MavenReportManager +{ + String ROLE = MavenReportManager.class.getName(); + + MavenReport getReport( String name ); +}