mirror of https://github.com/apache/maven.git
finish correcting spelling of prerequisites
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@289355 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9262d5171e
commit
139efa3bdf
|
@ -193,7 +193,8 @@ public class DefaultMaven
|
||||||
// TODO: yuck! Revisit when cleaning up the exception handling from the top down
|
// TODO: yuck! Revisit when cleaning up the exception handling from the top down
|
||||||
Throwable exception = response.getException();
|
Throwable exception = response.getException();
|
||||||
|
|
||||||
if ( ReactorManager.FAIL_AT_END.equals( rm.getFailureBehavior() ) && ( exception instanceof ReactorException ) )
|
if ( ReactorManager.FAIL_AT_END.equals( rm.getFailureBehavior() ) &&
|
||||||
|
( exception instanceof ReactorException ) )
|
||||||
{
|
{
|
||||||
logFailure( response, exception, null );
|
logFailure( response, exception, null );
|
||||||
|
|
||||||
|
@ -311,7 +312,8 @@ public class DefaultMaven
|
||||||
getLogger().info( messageBuffer.toString() );
|
getLogger().info( messageBuffer.toString() );
|
||||||
}
|
}
|
||||||
|
|
||||||
private MavenExecutionResponse dispatchErrorResponse( EventDispatcher dispatcher, String event, String baseDirectory, Exception e )
|
private MavenExecutionResponse dispatchErrorResponse( EventDispatcher dispatcher, String event,
|
||||||
|
String baseDirectory, Exception e )
|
||||||
{
|
{
|
||||||
dispatcher.dispatchError( event, baseDirectory, e );
|
dispatcher.dispatchError( event, baseDirectory, e );
|
||||||
|
|
||||||
|
@ -326,7 +328,8 @@ public class DefaultMaven
|
||||||
|
|
||||||
private List collectProjects( List files, ArtifactRepository localRepository, boolean recursive, Settings settings,
|
private List collectProjects( List files, ArtifactRepository localRepository, boolean recursive, Settings settings,
|
||||||
ProfileManager globalProfileManager )
|
ProfileManager globalProfileManager )
|
||||||
throws ProjectBuildingException, ReactorException, IOException, ArtifactResolutionException, ProfileActivationException
|
throws ProjectBuildingException, ReactorException, IOException, ArtifactResolutionException,
|
||||||
|
ProfileActivationException
|
||||||
{
|
{
|
||||||
List projects = new ArrayList( files.size() );
|
List projects = new ArrayList( files.size() );
|
||||||
|
|
||||||
|
@ -341,9 +344,9 @@ public class DefaultMaven
|
||||||
|
|
||||||
MavenProject project = getProject( file, localRepository, settings, globalProfileManager );
|
MavenProject project = getProject( file, localRepository, settings, globalProfileManager );
|
||||||
|
|
||||||
if ( project.getPrerequesites() != null && project.getPrerequesites().getMaven() != null )
|
if ( project.getPrerequisites() != null && project.getPrerequisites().getMaven() != null )
|
||||||
{
|
{
|
||||||
DefaultArtifactVersion version = new DefaultArtifactVersion( project.getPrerequesites().getMaven() );
|
DefaultArtifactVersion version = new DefaultArtifactVersion( project.getPrerequisites().getMaven() );
|
||||||
if ( runtimeInformation.getApplicationVersion().compareTo( version ) < 0 )
|
if ( runtimeInformation.getApplicationVersion().compareTo( version ) < 0 )
|
||||||
{
|
{
|
||||||
throw new ProjectBuildingException( "Unable to build project '" + project.getFile() +
|
throw new ProjectBuildingException( "Unable to build project '" + project.getFile() +
|
||||||
|
@ -366,7 +369,8 @@ public class DefaultMaven
|
||||||
moduleFiles.add( new File( basedir, name + "/pom.xml" ) );
|
moduleFiles.add( new File( basedir, name + "/pom.xml" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
List collectedProjects = collectProjects( moduleFiles, localRepository, recursive, settings, globalProfileManager );
|
List collectedProjects = collectProjects( moduleFiles, localRepository, recursive, settings,
|
||||||
|
globalProfileManager );
|
||||||
projects.addAll( collectedProjects );
|
projects.addAll( collectedProjects );
|
||||||
project.setCollectedProjects( collectedProjects );
|
project.setCollectedProjects( collectedProjects );
|
||||||
}
|
}
|
||||||
|
@ -426,8 +430,7 @@ public class DefaultMaven
|
||||||
protected MavenSession createSession( MavenExecutionRequest request, ReactorManager rpm )
|
protected MavenSession createSession( MavenExecutionRequest request, ReactorManager rpm )
|
||||||
{
|
{
|
||||||
return new MavenSession( container, request.getSettings(), request.getLocalRepository(),
|
return new MavenSession( container, request.getSettings(), request.getLocalRepository(),
|
||||||
request.getEventDispatcher(), rpm, request.getGoals(),
|
request.getEventDispatcher(), rpm, request.getGoals(), request.getBaseDirectory() );
|
||||||
request.getBaseDirectory() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -231,10 +231,10 @@ public class DefaultPluginManager
|
||||||
MavenProject project = mavenProjectBuilder.buildFromRepository( artifact, remoteRepositories,
|
MavenProject project = mavenProjectBuilder.buildFromRepository( artifact, remoteRepositories,
|
||||||
localRepository );
|
localRepository );
|
||||||
// if we don't have the required Maven version, then ignore an update
|
// if we don't have the required Maven version, then ignore an update
|
||||||
if ( project.getPrerequesites() != null && project.getPrerequesites().getMaven() != null )
|
if ( project.getPrerequisites() != null && project.getPrerequisites().getMaven() != null )
|
||||||
{
|
{
|
||||||
DefaultArtifactVersion requiredVersion = new DefaultArtifactVersion(
|
DefaultArtifactVersion requiredVersion = new DefaultArtifactVersion(
|
||||||
project.getPrerequesites().getMaven() );
|
project.getPrerequisites().getMaven() );
|
||||||
if ( runtimeInformation.getApplicationVersion().compareTo( requiredVersion ) < 0 )
|
if ( runtimeInformation.getApplicationVersion().compareTo( requiredVersion ) < 0 )
|
||||||
{
|
{
|
||||||
throw new PluginVersionResolutionException( plugin.getGroupId(), plugin.getArtifactId(),
|
throw new PluginVersionResolutionException( plugin.getGroupId(), plugin.getArtifactId(),
|
||||||
|
|
|
@ -148,8 +148,9 @@ public class DefaultPluginVersionManager
|
||||||
// are we using the LATEST metadata to resolve plugin version?
|
// are we using the LATEST metadata to resolve plugin version?
|
||||||
Boolean rtCheckLatest = settingsRTInfo.getCheckLatestPluginVersion();
|
Boolean rtCheckLatest = settingsRTInfo.getCheckLatestPluginVersion();
|
||||||
|
|
||||||
boolean checkLatestMetadata = Boolean.TRUE.equals( rtCheckLatest ) ||
|
boolean checkLatestMetadata = Boolean.TRUE.equals( rtCheckLatest ) || (
|
||||||
( !Boolean.FALSE.equals( rtCheckLatest ) && Boolean.valueOf( getPluginRegistry( groupId, artifactId ).getCheckLatest() )
|
!Boolean.FALSE.equals( rtCheckLatest ) &&
|
||||||
|
Boolean.valueOf( getPluginRegistry( groupId, artifactId ).getCheckLatest() )
|
||||||
.booleanValue() );
|
.booleanValue() );
|
||||||
|
|
||||||
// third pass...if we're checking for latest install/deploy, retrieve the version for LATEST metadata and also
|
// third pass...if we're checking for latest install/deploy, retrieve the version for LATEST metadata and also
|
||||||
|
@ -478,7 +479,8 @@ public class DefaultPluginVersionManager
|
||||||
return groupId + ":" + artifactId;
|
return groupId + ":" + artifactId;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getVersionFromPluginConfig( String groupId, String artifactId, MavenProject project, boolean resolveAsReportPlugin )
|
private String getVersionFromPluginConfig( String groupId, String artifactId, MavenProject project,
|
||||||
|
boolean resolveAsReportPlugin )
|
||||||
{
|
{
|
||||||
String version = null;
|
String version = null;
|
||||||
|
|
||||||
|
@ -625,7 +627,8 @@ public class DefaultPluginVersionManager
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ResolutionGroup resolutionGroup = artifactMetadataSource.retrieve( artifact, localRepository, remoteRepositories );
|
ResolutionGroup resolutionGroup = artifactMetadataSource.retrieve( artifact, localRepository,
|
||||||
|
remoteRepositories );
|
||||||
|
|
||||||
// switching this out with the actual resolved artifact instance, since the MMSource re-creates the pom
|
// switching this out with the actual resolved artifact instance, since the MMSource re-creates the pom
|
||||||
// artifact.
|
// artifact.
|
||||||
|
@ -640,10 +643,10 @@ public class DefaultPluginVersionManager
|
||||||
boolean pluginValid = true;
|
boolean pluginValid = true;
|
||||||
|
|
||||||
// if we don't have the required Maven version, then ignore an update
|
// if we don't have the required Maven version, then ignore an update
|
||||||
if ( project.getPrerequesites() != null && project.getPrerequesites().getMaven() != null )
|
if ( project.getPrerequisites() != null && project.getPrerequisites().getMaven() != null )
|
||||||
{
|
{
|
||||||
DefaultArtifactVersion requiredVersion = new DefaultArtifactVersion(
|
DefaultArtifactVersion requiredVersion = new DefaultArtifactVersion(
|
||||||
project.getPrerequesites().getMaven() );
|
project.getPrerequisites().getMaven() );
|
||||||
|
|
||||||
if ( runtimeInformation.getApplicationVersion().compareTo( requiredVersion ) < 0 )
|
if ( runtimeInformation.getApplicationVersion().compareTo( requiredVersion ) < 0 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,7 +39,7 @@ import org.apache.maven.model.Organization;
|
||||||
import org.apache.maven.model.Plugin;
|
import org.apache.maven.model.Plugin;
|
||||||
import org.apache.maven.model.PluginExecution;
|
import org.apache.maven.model.PluginExecution;
|
||||||
import org.apache.maven.model.PluginManagement;
|
import org.apache.maven.model.PluginManagement;
|
||||||
import org.apache.maven.model.Prerequesites;
|
import org.apache.maven.model.Prerequisites;
|
||||||
import org.apache.maven.model.ReportPlugin;
|
import org.apache.maven.model.ReportPlugin;
|
||||||
import org.apache.maven.model.ReportSet;
|
import org.apache.maven.model.ReportSet;
|
||||||
import org.apache.maven.model.Reporting;
|
import org.apache.maven.model.Reporting;
|
||||||
|
@ -798,9 +798,9 @@ public class MavenProject
|
||||||
return model.getUrl();
|
return model.getUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Prerequesites getPrerequesites()
|
public Prerequisites getPrerequisites()
|
||||||
{
|
{
|
||||||
return model.getPrerequesites();
|
return model.getPrerequisites();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIssueManagement( IssueManagement issueManagement )
|
public void setIssueManagement( IssueManagement issueManagement )
|
||||||
|
|
Loading…
Reference in New Issue