mirror of https://github.com/apache/maven.git
[MNG-7071] Remove the profiles.xml warning, since the functionality is ignored since Maven 3.
This commit is contained in:
parent
eb43b9be11
commit
83dc6909aa
|
@ -705,16 +705,6 @@ public class DefaultProjectBuilder
|
||||||
project.setInjectedProfileIds( modelId, getProfileIds( result.getActivePomProfiles( modelId ) ) );
|
project.setInjectedProfileIds( modelId, getProfileIds( result.getActivePomProfiles( modelId ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
String modelId = findProfilesXml( result, profilesXmls );
|
|
||||||
if ( modelId != null )
|
|
||||||
{
|
|
||||||
ModelProblem problem =
|
|
||||||
new DefaultModelProblem( "Detected profiles.xml alongside " + modelId
|
|
||||||
+ ", this file is no longer supported and was ignored" + ", please use the settings.xml instead",
|
|
||||||
ModelProblem.Severity.WARNING, ModelProblem.Version.V30, model, -1, -1, null );
|
|
||||||
result.getProblems().add( problem );
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// All the parts that were taken out of MavenProject for Maven 4.0.0
|
// All the parts that were taken out of MavenProject for Maven 4.0.0
|
||||||
//
|
//
|
||||||
|
@ -1019,33 +1009,6 @@ public class DefaultProjectBuilder
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String findProfilesXml( ModelBuildingResult result, Map<File, Boolean> profilesXmls )
|
|
||||||
{
|
|
||||||
for ( String modelId : result.getModelIds() )
|
|
||||||
{
|
|
||||||
Model model = result.getRawModel( modelId );
|
|
||||||
|
|
||||||
File basedir = model.getProjectDirectory();
|
|
||||||
if ( basedir == null )
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
Boolean profilesXml = profilesXmls.get( basedir );
|
|
||||||
if ( profilesXml == null )
|
|
||||||
{
|
|
||||||
profilesXml = new File( basedir, "profiles.xml" ).exists();
|
|
||||||
profilesXmls.put( basedir, profilesXml );
|
|
||||||
}
|
|
||||||
if ( profilesXml )
|
|
||||||
{
|
|
||||||
return modelId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* InternalConfig
|
* InternalConfig
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -29,8 +29,8 @@ under the License.
|
||||||
|
|
||||||
<name>Maven Integration Test :: MNG-4107</name>
|
<name>Maven Integration Test :: MNG-4107</name>
|
||||||
<description>
|
<description>
|
||||||
Test that POM interpolation uses the property values from the dominant profile source (POM vs. profiles.xml
|
Test that POM interpolation uses the property values from the dominant profile source (POM vs. settings.xml).
|
||||||
vs. settings.xml). This boils down to the proper order of profile injection and interpolation, i.e.
|
This boils down to the proper order of profile injection and interpolation, i.e.
|
||||||
interpolate after profiles from all sources are injected.
|
interpolate after profiles from all sources are injected.
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue