mirror of https://github.com/apache/maven.git
PR: MNG-366
separate api from implementation keeping most of doxia, reporting and other libraries out of the core git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@220009 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8750ec7f59
commit
5a0904e9fd
|
@ -15,7 +15,6 @@
|
|||
<artifactId>wagon-provider-api</artifactId>
|
||||
<version>1.0-alpha-4</version>
|
||||
</dependency>
|
||||
<!-- TODO: remove -->
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.reporting</groupId>
|
||||
<artifactId>maven-reporting-api</artifactId>
|
||||
|
|
|
@ -499,13 +499,13 @@ public class DefaultPluginManager
|
|||
pluginDescriptor.setClassRealm( pluginContainer.getContainerRealm() );
|
||||
|
||||
List unresolved = new ArrayList( dependencies );
|
||||
|
||||
|
||||
unresolved.removeAll( resolved );
|
||||
|
||||
|
||||
resolveCoreArtifacts( unresolved );
|
||||
|
||||
List allResolved = new ArrayList( resolved.size() + unresolved.size() );
|
||||
|
||||
|
||||
allResolved.addAll( resolved );
|
||||
allResolved.addAll( unresolved );
|
||||
|
||||
|
@ -527,36 +527,36 @@ public class DefaultPluginManager
|
|||
}
|
||||
|
||||
private Map resolvedCoreArtifactFiles = new HashMap();
|
||||
|
||||
|
||||
private void resolveCoreArtifacts( List unresolved )
|
||||
throws PluginConfigurationException
|
||||
{
|
||||
for ( Iterator it = unresolved.iterator(); it.hasNext(); )
|
||||
{
|
||||
Artifact artifact = (Artifact) it.next();
|
||||
|
||||
|
||||
File artifactFile = (File) resolvedCoreArtifactFiles.get( artifact.getId() );
|
||||
|
||||
|
||||
if ( artifactFile == null )
|
||||
{
|
||||
String resource = "/META-INF/maven/" + artifact.getGroupId() + "/" + artifact.getArtifactId() + "/pom.xml";
|
||||
|
||||
|
||||
URL resourceUrl = container.getContainerRealm().getResource( resource );
|
||||
|
||||
|
||||
if ( resourceUrl == null )
|
||||
{
|
||||
throw new PluginConfigurationException( "Cannot resolve core artifact: " + artifact.getId() );
|
||||
}
|
||||
|
||||
|
||||
String artifactPath = resourceUrl.getPath();
|
||||
|
||||
|
||||
artifactPath = artifactPath.substring( 0, artifactPath.length() - resource.length() );
|
||||
|
||||
|
||||
artifactFile = new File( artifactPath );
|
||||
|
||||
|
||||
resolvedCoreArtifactFiles.put( artifact.getId(), artifactFile );
|
||||
}
|
||||
|
||||
|
||||
artifact.setFile( artifactFile );
|
||||
}
|
||||
}
|
||||
|
@ -926,7 +926,6 @@ public class DefaultPluginManager
|
|||
Set artifacts = new HashSet();
|
||||
artifacts.add( "classworlds" );
|
||||
artifacts.add( "commons-cli" );
|
||||
artifacts.add( "commons-validator" );
|
||||
artifacts.add( "jline" );
|
||||
artifacts.add( "jsch" );
|
||||
artifacts.add( "maven-artifact" );
|
||||
|
@ -938,6 +937,7 @@ public class DefaultPluginManager
|
|||
artifacts.add( "maven-plugin-descriptor" );
|
||||
artifacts.add( "maven-plugin-mapping" );
|
||||
artifacts.add( "maven-plugin-registry" );
|
||||
artifacts.add( "maven-profile" );
|
||||
artifacts.add( "maven-project" );
|
||||
artifacts.add( "maven-settings" );
|
||||
artifacts.add( "plexus-container-default" );
|
||||
|
@ -947,10 +947,8 @@ public class DefaultPluginManager
|
|||
artifacts.add( "wagon-file" );
|
||||
artifacts.add( "wagon-http-lightweight" );
|
||||
artifacts.add( "wagon-ssh" );
|
||||
// TODO: remove doxia
|
||||
artifacts.add( "doxia-core" );
|
||||
artifacts.add( "doxia-sink-api" );
|
||||
artifacts.add( "maven-reporting-api" );
|
||||
artifacts.add( "oro" );
|
||||
artifactFilter = new ExclusionSetFilter( artifacts );
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ public class MBoot
|
|||
"maven-artifact", "maven-plugin-descriptor", "maven-artifact-manager", "maven-artifact-test",
|
||||
"maven-plugin-mapping",
|
||||
"maven-script/maven-script-beanshell", "maven-script/maven-script-marmalade", "maven-project", "maven-profile",
|
||||
"maven-plugin-registry", "maven-reporting/maven-reporting-api", "maven-core", "maven-archiver",
|
||||
"maven-plugin-registry", "maven-reporting/maven-reporting-api", "maven-reporting/maven-reporting-impl", "maven-core", "maven-archiver",
|
||||
"maven-plugin-tools/maven-plugin-tools-api", "maven-plugin-tools/maven-plugin-tools-java",
|
||||
"maven-plugin-tools/maven-plugin-tools-beanshell", "maven-plugin-tools/maven-plugin-tools-pluggy",
|
||||
"maven-plugin-tools/maven-plugin-tools-marmalade", "maven-core-it-verifier"};
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.reporting</groupId>
|
||||
<artifactId>maven-reporting-api</artifactId>
|
||||
<artifactId>maven-reporting-impl</artifactId>
|
||||
<version>2.0-beta-1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.reporting</groupId>
|
||||
<artifactId>maven-reporting-api</artifactId>
|
||||
<artifactId>maven-reporting-impl</artifactId>
|
||||
<version>2.0-beta-1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.reporting</groupId>
|
||||
<artifactId>maven-reporting-api</artifactId>
|
||||
<artifactId>maven-reporting-impl</artifactId>
|
||||
<version>2.0-beta-1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -120,15 +120,7 @@ public class PmdReport
|
|||
public void executeReport( Locale locale )
|
||||
throws MavenReportException
|
||||
{
|
||||
Sink sink = null;
|
||||
try
|
||||
{
|
||||
sink = getSink();
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
throw new MavenReportException( "Can't obtain sink for PMD report.", e );
|
||||
}
|
||||
Sink sink = getSink();
|
||||
|
||||
PMD pmd = new PMD();
|
||||
RuleContext ruleContext = new RuleContext();
|
||||
|
|
|
@ -31,9 +31,14 @@
|
|||
<name>Maven Project Info Reports Plugin</name>
|
||||
<inceptionYear>2005</inceptionYear>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-model</artifactId>
|
||||
<version>2.0-beta-1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.reporting</groupId>
|
||||
<artifactId>maven-reporting-api</artifactId>
|
||||
<artifactId>maven-reporting-impl</artifactId>
|
||||
<version>2.0-beta-1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -118,16 +118,9 @@ public class CimReport
|
|||
public void executeReport( Locale locale )
|
||||
throws MavenReportException
|
||||
{
|
||||
try
|
||||
{
|
||||
CimRenderer r = new CimRenderer( getSink(), getProject().getModel(), locale );
|
||||
CimRenderer r = new CimRenderer( getSink(), getProject().getModel(), locale );
|
||||
|
||||
r.render();
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
throw new MavenReportException( "Can't write the report " + getOutputName(), e );
|
||||
}
|
||||
r.render();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -138,17 +138,10 @@ public class DependenciesReport
|
|||
public void executeReport( Locale locale )
|
||||
throws MavenReportException
|
||||
{
|
||||
try
|
||||
{
|
||||
DependenciesRenderer r = new DependenciesRenderer( getSink(), getProject(), locale, mavenProjectBuilder,
|
||||
artifactFactory );
|
||||
DependenciesRenderer r = new DependenciesRenderer( getSink(), getProject(), locale, mavenProjectBuilder,
|
||||
artifactFactory );
|
||||
|
||||
r.render();
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
throw new MavenReportException( "Can't write the report " + getOutputName(), e );
|
||||
}
|
||||
r.render();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -115,16 +115,9 @@ public class IssueTrackingReport
|
|||
public void executeReport( Locale locale )
|
||||
throws MavenReportException
|
||||
{
|
||||
try
|
||||
{
|
||||
IssueTrackingRenderer r = new IssueTrackingRenderer( getSink(), getProject().getModel(), locale );
|
||||
IssueTrackingRenderer r = new IssueTrackingRenderer( getSink(), getProject().getModel(), locale );
|
||||
|
||||
r.render();
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
throw new MavenReportException( "Can't write the report " + getOutputName(), e );
|
||||
}
|
||||
r.render();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -123,16 +123,9 @@ public class LicenseReport
|
|||
public void executeReport( Locale locale )
|
||||
throws MavenReportException
|
||||
{
|
||||
try
|
||||
{
|
||||
LicenseRenderer r = new LicenseRenderer( getSink(), getProject(), locale );
|
||||
LicenseRenderer r = new LicenseRenderer( getSink(), getProject(), locale );
|
||||
|
||||
r.render();
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
throw new MavenReportException( "Can't write the report " + getOutputName(), e );
|
||||
}
|
||||
r.render();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -116,16 +116,9 @@ public class MailingListsReport
|
|||
public void executeReport( Locale locale )
|
||||
throws MavenReportException
|
||||
{
|
||||
try
|
||||
{
|
||||
MailingListsRenderer r = new MailingListsRenderer( getSink(), getProject().getModel(), locale );
|
||||
MailingListsRenderer r = new MailingListsRenderer( getSink(), getProject().getModel(), locale );
|
||||
|
||||
r.render();
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
throw new MavenReportException( "Can't write the report " + getOutputName(), e );
|
||||
}
|
||||
r.render();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -115,16 +115,9 @@ public class ScmReport
|
|||
public void executeReport( Locale locale )
|
||||
throws MavenReportException
|
||||
{
|
||||
try
|
||||
{
|
||||
ScmRenderer r = new ScmRenderer( getSink(), getProject().getModel(), locale );
|
||||
ScmRenderer r = new ScmRenderer( getSink(), getProject().getModel(), locale );
|
||||
|
||||
r.render();
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
throw new MavenReportException( "Can't write the report " + getOutputName(), e );
|
||||
}
|
||||
r.render();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -119,16 +119,9 @@ public class TeamListReport
|
|||
public void executeReport( Locale locale )
|
||||
throws MavenReportException
|
||||
{
|
||||
try
|
||||
{
|
||||
TeamListRenderer r = new TeamListRenderer( getSink(), getProject().getModel(), locale );
|
||||
TeamListRenderer r = new TeamListRenderer( getSink(), getProject().getModel(), locale );
|
||||
|
||||
r.render();
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
throw new MavenReportException( "Can't write the report " + getOutputName(), e );
|
||||
}
|
||||
r.render();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
<dependency>
|
||||
<groupId>plexus</groupId>
|
||||
<artifactId>plexus-site-renderer</artifactId>
|
||||
<version>1.0-alpha-2-20050715.080727-2</version>
|
||||
<version>1.0-alpha-2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
|
|
|
@ -38,30 +38,10 @@
|
|||
</developer>
|
||||
</developers>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-project</artifactId>
|
||||
<version>2.0-beta-1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>doxia</groupId>
|
||||
<artifactId>doxia-core</artifactId>
|
||||
<artifactId>doxia-sink-api</artifactId>
|
||||
<version>1.0-alpha-4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>2.0-beta-1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-validator</groupId>
|
||||
<artifactId>commons-validator</artifactId>
|
||||
<version>1.1.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>oro</groupId>
|
||||
<artifactId>oro</artifactId>
|
||||
<version>2.0.7</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -18,7 +18,6 @@ package org.apache.maven.reporting;
|
|||
|
||||
import org.codehaus.doxia.sink.Sink;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.File;
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -48,9 +47,6 @@ public interface MavenReport
|
|||
|
||||
String getDescription( Locale locale );
|
||||
|
||||
Sink getSink()
|
||||
throws IOException;
|
||||
|
||||
// TODO: remove?
|
||||
void setReportOutputDirectory( File outputDirectory );
|
||||
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-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.
|
||||
*/
|
||||
-->
|
||||
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>maven-reporting</artifactId>
|
||||
<groupId>org.apache.maven.reporting</groupId>
|
||||
<version>2.0-beta-1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>maven-reporting-impl</artifactId>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>vsiveton</id>
|
||||
<name>Vincent Siveton</name>
|
||||
<email>vincent.siveton@gmail.com</email>
|
||||
<roles>
|
||||
<role>Java Developer</role>
|
||||
</roles>
|
||||
<timezone>-5</timezone>
|
||||
</developer>
|
||||
</developers>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-project</artifactId>
|
||||
<version>2.0-beta-1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.reporting</groupId>
|
||||
<artifactId>maven-reporting-api</artifactId>
|
||||
<version>2.0-beta-1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>doxia</groupId>
|
||||
<artifactId>doxia-core</artifactId>
|
||||
<version>1.0-alpha-4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>2.0-beta-1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-validator</groupId>
|
||||
<artifactId>commons-validator</artifactId>
|
||||
<version>1.1.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>oro</groupId>
|
||||
<artifactId>oro</artifactId>
|
||||
<version>2.0.7</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -1,7 +1,7 @@
|
|||
package org.apache.maven.reporting;
|
||||
|
||||
/*
|
||||
* Copyright 2005 The Apache Software Foundation.
|
||||
* Copyright 2001-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.
|
||||
|
@ -101,6 +101,7 @@ public abstract class AbstractMavenReport
|
|||
|
||||
/**
|
||||
* @see org.apache.maven.reporting.MavenReport#generate(org.codehaus.doxia.sink.Sink, java.util.Locale)
|
||||
* @deprecated
|
||||
*/
|
||||
public void generate( Sink sink, Locale locale )
|
||||
throws MavenReportException
|
||||
|
@ -126,12 +127,6 @@ public abstract class AbstractMavenReport
|
|||
{
|
||||
}
|
||||
|
||||
public Sink getSink()
|
||||
throws IOException
|
||||
{
|
||||
return sink;
|
||||
}
|
||||
|
||||
public String getCategoryName()
|
||||
{
|
||||
return CATEGORY_PROJECT_REPORTS;
|
||||
|
@ -205,4 +200,9 @@ public abstract class AbstractMavenReport
|
|||
{
|
||||
this.reportOutputDirectory = reportOutputDirectory;
|
||||
}
|
||||
|
||||
public Sink getSink()
|
||||
{
|
||||
return sink;
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
package org.apache.maven.reporting;
|
||||
|
||||
/*
|
||||
* Copyright 2004-2005 The Apache Software Foundation.
|
||||
* Copyright 2001-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.
|
|
@ -1,8 +1,21 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.apache.maven.reporting.sink;
|
||||
|
||||
/*
|
||||
* Copyright 2001-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;
|
||||
import org.codehaus.doxia.sink.SinkAdapter;
|
||||
|
|
@ -1,14 +1,7 @@
|
|||
package org.apache.maven.reporting.sink;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.codehaus.doxia.sink.Sink;
|
||||
import org.codehaus.doxia.site.renderer.SiteRenderer;
|
||||
import org.codehaus.plexus.util.StringInputStream;
|
||||
|
||||
/*
|
||||
* Copyright 2005 The Apache Software Foundation.
|
||||
* Copyright 2001-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.
|
||||
|
@ -23,6 +16,13 @@ import org.codehaus.plexus.util.StringInputStream;
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.codehaus.doxia.sink.Sink;
|
||||
import org.codehaus.doxia.site.renderer.SiteRenderer;
|
||||
import org.codehaus.plexus.util.StringInputStream;
|
||||
|
||||
/**
|
||||
* @author <a href="evenisse@apache.org">Emmanuel Venisse</a>
|
||||
* @version $Id: MavenReport.java 163376 2005-02-23 00:06:06Z brett $
|
|
@ -12,5 +12,6 @@
|
|||
<inceptionYear>2005</inceptionYear>
|
||||
<modules>
|
||||
<module>maven-reporting-api</module>
|
||||
<module>maven-reporting-impl</module>
|
||||
</modules>
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue