From 3af42c2f05bed387c195060a71409971fe98f899 Mon Sep 17 00:00:00 2001 From: Britton Isbell Date: Mon, 29 Sep 2008 23:02:15 +0000 Subject: [PATCH] Removed unneeded class/methods related to extension scanner. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@700300 13f79535-47bb-0310-9956-ffa450edef68 --- .../errors/DefaultProjectErrorReporter.java | 82 ------------------- .../maven/errors/ProjectErrorReporter.java | 73 ----------------- .../apache/maven/project/ModelAndFile.java | 62 -------------- 3 files changed, 217 deletions(-) delete mode 100644 maven-project/src/main/java/org/apache/maven/project/ModelAndFile.java diff --git a/maven-core/src/main/java/org/apache/maven/errors/DefaultProjectErrorReporter.java b/maven-core/src/main/java/org/apache/maven/errors/DefaultProjectErrorReporter.java index 1fb028b069..72f46849c3 100644 --- a/maven-core/src/main/java/org/apache/maven/errors/DefaultProjectErrorReporter.java +++ b/maven-core/src/main/java/org/apache/maven/errors/DefaultProjectErrorReporter.java @@ -20,7 +20,6 @@ import org.apache.maven.project.InvalidProjectVersionException; import org.apache.maven.project.MavenProject; import org.apache.maven.project.ProjectBuilderConfiguration; import org.apache.maven.project.artifact.InvalidDependencyVersionException; -import org.apache.maven.project.ModelAndFile; import org.codehaus.plexus.component.repository.exception.ComponentLookupException; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; @@ -551,50 +550,6 @@ public class DefaultProjectErrorReporter registerBuildError( cause, writer.toString() ); } - public void reportErrorParsingParentProjectModel( ModelAndFile childInfo, - File parentPomFile, - XmlPullParserException cause ) - { - StringWriter writer = new StringWriter(); - - writer.write( NEWLINE ); - if ( parentPomFile == null ) - { - writer.write( "Error parsing built-in super POM!" ); - } - else - { - writer.write( "Error parsing parent-POM." ); - } - - writer.write( NEWLINE ); - writer.write( NEWLINE ); - writer.write( cause.getMessage() ); - writer.write( NEWLINE ); - writer.write( NEWLINE ); - writer.write( "Line: " ); - writer.write( "" + cause.getLineNumber() ); - writer.write( NEWLINE ); - writer.write( "Column: " ); - writer.write( "" + cause.getColumnNumber() ); - writer.write( NEWLINE ); - - String projectId = childInfo.getModel().getParent().getId(); - String childId = childInfo.getModel().getId(); - - addStandardInfo( projectId, parentPomFile, writer ); - - writer.write( NEWLINE ); - writer.write( NEWLINE ); - writer.write( "Child-Project Id: " ); - writer.write( childId ); - - addTips( ProjectErrorTips.getTipsForPomParsingError( projectId, parentPomFile, cause ), - writer ); - - registerBuildError( cause, writer.toString() ); - } - public void reportErrorParsingProjectModel( String projectId, File pomFile, IOException cause ) @@ -623,43 +578,6 @@ public class DefaultProjectErrorReporter registerBuildError( cause, writer.toString() ); } - public void reportErrorParsingParentProjectModel( ModelAndFile childInfo, - File parentPomFile, - IOException cause ) - { - StringWriter writer = new StringWriter(); - - writer.write( NEWLINE ); - if ( parentPomFile == null ) - { - writer.write( "Error reading built-in super POM!" ); - } - else - { - writer.write( "Error reading parent-POM." ); - } - - writer.write( NEWLINE ); - writer.write( NEWLINE ); - writer.write( cause.getMessage() ); - writer.write( NEWLINE ); - - String projectId = childInfo.getModel().getParent().getId(); - String childId = childInfo.getModel().getId(); - - addStandardInfo( projectId, parentPomFile, writer ); - - writer.write( NEWLINE ); - writer.write( NEWLINE ); - writer.write( "Child-Project Id: " ); - writer.write( childId ); - - addTips( ProjectErrorTips.getTipsForPomParsingError( projectId, parentPomFile, cause ), - writer ); - - registerBuildError( cause, writer.toString() ); - } - public void reportParentPomArtifactNotFound( Parent parentRef, ProjectBuilderConfiguration config, List remoteRepos, diff --git a/maven-core/src/main/java/org/apache/maven/errors/ProjectErrorReporter.java b/maven-core/src/main/java/org/apache/maven/errors/ProjectErrorReporter.java index 0da1c0c3ae..70a824feb9 100644 --- a/maven-core/src/main/java/org/apache/maven/errors/ProjectErrorReporter.java +++ b/maven-core/src/main/java/org/apache/maven/errors/ProjectErrorReporter.java @@ -1,11 +1,8 @@ package org.apache.maven.errors; import org.apache.maven.artifact.InvalidRepositoryException; -import org.apache.maven.artifact.resolver.ArtifactNotFoundException; -import org.apache.maven.artifact.resolver.ArtifactResolutionException; import org.apache.maven.model.DeploymentRepository; import org.apache.maven.model.Model; -import org.apache.maven.model.Parent; import org.apache.maven.model.Profile; import org.apache.maven.model.Repository; import org.apache.maven.profiles.activation.ProfileActivationContext; @@ -15,9 +12,7 @@ import org.apache.maven.execution.DuplicateProjectException; import org.apache.maven.project.InvalidProjectModelException; import org.apache.maven.project.InvalidProjectVersionException; import org.apache.maven.project.MavenProject; -import org.apache.maven.project.ProjectBuilderConfiguration; import org.apache.maven.project.artifact.InvalidDependencyVersionException; -import org.apache.maven.project.ModelAndFile; import org.codehaus.plexus.component.repository.exception.ComponentLookupException; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; @@ -270,21 +265,6 @@ public interface ProjectErrorReporter File pomFile, XmlPullParserException cause ); - /** - * Call Stack: - *
- *
-     * ...
-     * --> DefaultModelLineageBuilder.buildModelLineage(..)
-     *     --> DefaultModelLineageBuilder.readModel(..) (private)
-     *         --> thrown XmlPullParserException
-     * <------ ProjectBuildingException
-     * 
- */ - void reportErrorParsingParentProjectModel( ModelAndFile childInfo, - File parentPomFile, - XmlPullParserException cause ); - /** * Call Stack: *
@@ -303,59 +283,6 @@ public interface ProjectErrorReporter File pomFile, IOException cause ); - /** - * Call Stack: - *
- *
-     * ...
-     * --> DefaultModelLineageBuilder.buildModelLineage(..)
-     *     --> DefaultModelLineageBuilder.readModel(..) (private)
-     *         --> thrown IOException
-     * <------ ProjectBuildingException
-     * 
- */ - void reportErrorParsingParentProjectModel( ModelAndFile childInfo, - File parentPomFile, - IOException cause ); - - /** - * Call Stack: - *
- *
-     * ...
-     * --> DefaultModelLineageBuilder.buildModelLineage(..)
-     *     --> DefaultModelLineageBuilder.resolveParentPom(..) (private)
-     *         --> DefaultModelLineageBuilder.resolveParentFromRepository(..) (private)
-     *             --> thrown ArtifactNotFoundException
-     * <---------- ProjectBuildingException
-     * 
- */ - void reportParentPomArtifactNotFound( Parent parentRef, - ProjectBuilderConfiguration config, - List remoteRepos, - String childId, - File childPomFile, - ArtifactNotFoundException cause ); - - /** - * Call Stack: - *
- *
-     * ...
-     * --> DefaultModelLineageBuilder.buildModelLineage(..)
-     *     --> DefaultModelLineageBuilder.resolveParentPom(..) (private)
-     *         --> DefaultModelLineageBuilder.resolveParentFromRepository(..) (private)
-     *             --> thrown ArtifactResolutionException
-     * <---------- ProjectBuildingException
-     * 
- */ - void reportParentPomArtifactUnresolvable( Parent parentRef, - ProjectBuilderConfiguration config, - List remoteRepos, - String childId, - File childPomFile, - ArtifactResolutionException cause ); - /** * Call Stack: *
diff --git a/maven-project/src/main/java/org/apache/maven/project/ModelAndFile.java b/maven-project/src/main/java/org/apache/maven/project/ModelAndFile.java deleted file mode 100644 index 915986ebd3..0000000000 --- a/maven-project/src/main/java/org/apache/maven/project/ModelAndFile.java +++ /dev/null @@ -1,62 +0,0 @@ -package org.apache.maven.project; - -/* - * 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.model.Model; - -import java.io.File; - -public class ModelAndFile -{ - - private final Model model; - - private final File file; - - private final boolean validProfilesXmlLocation; - - public ModelAndFile( Model model, File file, boolean validProfilesXmlLocation ) - { - this.model = model; - this.file = file; - this.validProfilesXmlLocation = validProfilesXmlLocation; - } - - public Model getModel() - { - return model; - } - - public File getFile() - { - return file; - } - - public boolean isValidProfilesXmlLocation() - { - return validProfilesXmlLocation; - } - - public String toString() - { - return model.getId() + "@" + file; - } - -}