You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2008/05/22 22:15:53 UTC
svn commit: r659236 -
/maven/components/trunk/maven-project/src/main/aspect/org/apache/maven/project/aspect/compat/Maven20xProjectCompatAspect.aj
Author: jdcasey
Date: Thu May 22 13:15:52 2008
New Revision: 659236
URL: http://svn.apache.org/viewvc?rev=659236&view=rev
Log:
Disable the pluginRepository deprecation message until the first release of 2.1 is imminent, to avoid confusion when using IDEs that use 2.1 snapshots (where the CLI still uses 2.0.x).
Modified:
maven/components/trunk/maven-project/src/main/aspect/org/apache/maven/project/aspect/compat/Maven20xProjectCompatAspect.aj
Modified: maven/components/trunk/maven-project/src/main/aspect/org/apache/maven/project/aspect/compat/Maven20xProjectCompatAspect.aj
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/aspect/org/apache/maven/project/aspect/compat/Maven20xProjectCompatAspect.aj?rev=659236&r1=659235&r2=659236&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/aspect/org/apache/maven/project/aspect/compat/Maven20xProjectCompatAspect.aj (original)
+++ maven/components/trunk/maven-project/src/main/aspect/org/apache/maven/project/aspect/compat/Maven20xProjectCompatAspect.aj Thu May 22 13:15:52 2008
@@ -19,95 +19,96 @@
public privileged aspect Maven20xProjectCompatAspect
{
- private pointcut reactorProjectBuilds():
- cflow( execution( * DefaultMavenProjectBuilder.buildFromSourceFileInternal( .. ) ) )
- && !cflow( execution( * MavenMetadataSource.*( .. ) ) );
-
- private pointcut lineageBuildResumed( DefaultMavenProjectBuilder projectBuilder, ModelLineage lineage ):
- call( * ModelLineageBuilder.resumeBuildingModelLineage( ModelLineage, .. ) )
- && this( projectBuilder )
- && args( lineage, .. );
-
- after( DefaultMavenProjectBuilder projectBuilder, ModelLineage lineage ):
- reactorProjectBuilds()
- && lineageBuildResumed( projectBuilder, lineage )
- {
- for ( ModelLineageIterator it = lineage.lineageIterator(); it.hasNext(); )
- {
- Model model = (Model) it.next();
- List pluginRepos = model.getPluginRepositories();
-
- if ( pluginRepos != null && !pluginRepos.isEmpty() )
- {
- StringBuffer message = new StringBuffer();
- message.append( "The <pluginRepositories/> section of the POM has been deprecated. Please update your POM (" );
- message.append( model.getId() );
- message.append( ")." );
-
- projectBuilder.logger.warn( message.toString() );
- }
- }
- }
-
- private pointcut externalProfilesApplied( DefaultProfileAdvisor advisor, ProfileManager profileManager ):
- execution( * DefaultProfileAdvisor.applyActivatedExternalProfiles( .., ProfileManager+ ) )
- && this( advisor )
- && args( .., profileManager );
-
-
- private boolean settingsProfilesChecked = false;
-
- before( DefaultProfileAdvisor advisor, ProfileManager profileManager ):
- reactorProjectBuilds()
- && externalProfilesApplied( advisor, profileManager )
- {
- if ( profileManager == null )
- {
- return;
- }
-
- Map profilesById = profileManager.getProfilesById();
- Set invalidProfiles = new HashSet();
-
- boolean settingsProfilesEncountered = false;
- for ( Iterator it = profilesById.values().iterator(); it.hasNext(); )
- {
- Profile profile = (Profile) it.next();
-
- if ( "settings.xml".equals( profile.getSource() ) )
- {
- settingsProfilesEncountered = true;
-
- if ( settingsProfilesChecked )
- {
- continue;
- }
- }
-
- List pluginRepos = profile.getPluginRepositories();
- if ( pluginRepos != null && !pluginRepos.isEmpty() )
- {
- invalidProfiles.add( profile );
- }
- }
-
- if ( !invalidProfiles.isEmpty() )
- {
- StringBuffer message = new StringBuffer();
- message.append( "The <pluginRepositories/> section of the POM has been deprecated. Please update the following profiles:\n" );
-
- for ( Iterator it = invalidProfiles.iterator(); it.hasNext(); )
- {
- Profile profile = (Profile) it.next();
- message.append( "\n- " ).append( profile.getId() ).append( " (source: " ).append( profile.getSource() ).append( ")" );
- }
-
- message.append( "\n" );
-
- advisor.logger.warn( message.toString() );
- }
-
- settingsProfilesChecked = settingsProfilesChecked || settingsProfilesEncountered;
- }
+ // FIXME: Re-enable this when we're closer to a 2.1 release.
+// private pointcut reactorProjectBuilds():
+// cflow( execution( * DefaultMavenProjectBuilder.buildFromSourceFileInternal( .. ) ) )
+// && !cflow( execution( * MavenMetadataSource.*( .. ) ) );
+//
+// private pointcut lineageBuildResumed( DefaultMavenProjectBuilder projectBuilder, ModelLineage lineage ):
+// call( * ModelLineageBuilder.resumeBuildingModelLineage( ModelLineage, .. ) )
+// && this( projectBuilder )
+// && args( lineage, .. );
+//
+// after( DefaultMavenProjectBuilder projectBuilder, ModelLineage lineage ):
+// reactorProjectBuilds()
+// && lineageBuildResumed( projectBuilder, lineage )
+// {
+// for ( ModelLineageIterator it = lineage.lineageIterator(); it.hasNext(); )
+// {
+// Model model = (Model) it.next();
+// List pluginRepos = model.getPluginRepositories();
+//
+// if ( pluginRepos != null && !pluginRepos.isEmpty() )
+// {
+// StringBuffer message = new StringBuffer();
+// message.append( "The <pluginRepositories/> section of the POM has been deprecated. Please update your POM (" );
+// message.append( model.getId() );
+// message.append( ")." );
+//
+// projectBuilder.logger.warn( message.toString() );
+// }
+// }
+// }
+//
+// private pointcut externalProfilesApplied( DefaultProfileAdvisor advisor, ProfileManager profileManager ):
+// execution( * DefaultProfileAdvisor.applyActivatedExternalProfiles( .., ProfileManager+ ) )
+// && this( advisor )
+// && args( .., profileManager );
+//
+//
+// private boolean settingsProfilesChecked = false;
+//
+// before( DefaultProfileAdvisor advisor, ProfileManager profileManager ):
+// reactorProjectBuilds()
+// && externalProfilesApplied( advisor, profileManager )
+// {
+// if ( profileManager == null )
+// {
+// return;
+// }
+//
+// Map profilesById = profileManager.getProfilesById();
+// Set invalidProfiles = new HashSet();
+//
+// boolean settingsProfilesEncountered = false;
+// for ( Iterator it = profilesById.values().iterator(); it.hasNext(); )
+// {
+// Profile profile = (Profile) it.next();
+//
+// if ( "settings.xml".equals( profile.getSource() ) )
+// {
+// settingsProfilesEncountered = true;
+//
+// if ( settingsProfilesChecked )
+// {
+// continue;
+// }
+// }
+//
+// List pluginRepos = profile.getPluginRepositories();
+// if ( pluginRepos != null && !pluginRepos.isEmpty() )
+// {
+// invalidProfiles.add( profile );
+// }
+// }
+//
+// if ( !invalidProfiles.isEmpty() )
+// {
+// StringBuffer message = new StringBuffer();
+// message.append( "The <pluginRepositories/> section of the POM has been deprecated. Please update the following profiles:\n" );
+//
+// for ( Iterator it = invalidProfiles.iterator(); it.hasNext(); )
+// {
+// Profile profile = (Profile) it.next();
+// message.append( "\n- " ).append( profile.getId() ).append( " (source: " ).append( profile.getSource() ).append( ")" );
+// }
+//
+// message.append( "\n" );
+//
+// advisor.logger.warn( message.toString() );
+// }
+//
+// settingsProfilesChecked = settingsProfilesChecked || settingsProfilesEncountered;
+// }
}