@Override protected void mergeModel_Name( Model target, Model source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getName(); if ( src != null ) { if ( sourceDominant ) { target.setName( src ); target.setLocation( "name", source.getLocation( "name" ) ); } } }
protected void mergeModel_Description( Model target, Model source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getDescription(); if ( src != null ) { if ( sourceDominant || target.getDescription() == null ) { target.setDescription( src ); target.setLocation( "description", source.getLocation( "description" ) ); } } }
protected void mergeModel_Url( Model target, Model source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getUrl(); if ( src != null ) { if ( sourceDominant || target.getUrl() == null ) { target.setUrl( src ); target.setLocation( "url", source.getLocation( "url" ) ); } } }
protected void mergeModel_Name( Model target, Model source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getName(); if ( src != null ) { if ( sourceDominant || target.getName() == null ) { target.setName( src ); target.setLocation( "name", source.getLocation( "name" ) ); } } }
protected void mergeModel_ModelVersion( Model target, Model source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getModelVersion(); if ( src != null ) { if ( sourceDominant || target.getModelVersion() == null ) { target.setModelVersion( src ); target.setLocation( "modelVersion", source.getLocation( "modelVersion" ) ); } } }
protected void mergeModel_GroupId( Model target, Model source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getGroupId(); if ( src != null ) { if ( sourceDominant || target.getGroupId() == null ) { target.setGroupId( src ); target.setLocation( "groupId", source.getLocation( "groupId" ) ); } } }
protected void mergeModel_ArtifactId( Model target, Model source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getArtifactId(); if ( src != null ) { if ( sourceDominant || target.getArtifactId() == null ) { target.setArtifactId( src ); target.setLocation( "artifactId", source.getLocation( "artifactId" ) ); } } }
protected void mergeModel_Packaging( Model target, Model source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getPackaging(); if ( src != null ) { if ( sourceDominant || target.getPackaging() == null ) { target.setPackaging( src ); target.setLocation( "packaging", source.getLocation( "packaging" ) ); } } }
protected void mergeModel_Version( Model target, Model source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getVersion(); if ( src != null ) { if ( sourceDominant || target.getVersion() == null ) { target.setVersion( src ); target.setLocation( "version", source.getLocation( "version" ) ); } } }
protected void mergeModel_InceptionYear( Model target, Model source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getInceptionYear(); if ( src != null ) { if ( sourceDominant || target.getInceptionYear() == null ) { target.setInceptionYear( src ); target.setLocation( "inceptionYear", source.getLocation( "inceptionYear" ) ); } } }
protected void mergeModel_ChildProjectUrlInheritAppendPath( Model target, Model source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getChildProjectUrlInheritAppendPath(); if ( src != null ) { if ( sourceDominant || target.getChildProjectUrlInheritAppendPath() == null ) { target.setChildProjectUrlInheritAppendPath( src ); target.setLocation( "child.project.url.inherit.append.path", source.getLocation( "child.project.url.inherit.append.path" ) ); } } }
@Override protected void mergeModel_Url( Model target, Model source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getUrl(); if ( src != null ) { if ( sourceDominant ) { target.setUrl( src ); target.setLocation( "url", source.getLocation( "url" ) ); } else if ( target.getUrl() == null ) { target.setUrl( extrapolateChildUrl( src, source.isChildProjectUrlInheritAppendPath(), context ) ); target.setLocation( "url", source.getLocation( "url" ) ); } } }
public void injectLifecycleBindings( Model model, ModelBuildingRequest request, ModelProblemCollector problems ) { String packaging = model.getPackaging(); Collection<Plugin> defaultPlugins = lifecycle.getPluginsBoundByDefaultToAllLifecycles( packaging ); if ( defaultPlugins == null ) { problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE ) .setMessage( "Unknown packaging: " + packaging ) .setLocation( model.getLocation( "packaging" ) ) ); } else if ( !defaultPlugins.isEmpty() ) { Model lifecycleModel = new Model(); lifecycleModel.setBuild( new Build() ); lifecycleModel.getBuild().getPlugins().addAll( defaultPlugins ); merger.merge( model, lifecycleModel ); } }
.setMessage( "Version must be a constant" ).setLocation( childModel.getLocation( "" ) ) ); .setLocation( childModel.getLocation( "version" ) ) );
.setMessage( "Version must be a constant" ).setLocation( childModel.getLocation( "" ) ) ); .setLocation( childModel.getLocation( "version" ) ) );
m.getLocation( "modules" ) ); "specifies duplicate child module " + module, m.getLocation( "modules" ) );
.setMessage( "Invalid packaging for parent POM " + ModelProblemUtils.toSourceHint( parentModel ) + ", must be \"pom\" but is \"" + parentModel.getPackaging() + "\"" ) .setLocation( parentModel.getLocation( "packaging" ) ) );
@Override protected void mergeModel_Name( Model target, Model source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getName(); if ( src != null ) { if ( sourceDominant ) { target.setName( src ); target.setLocation( "name", source.getLocation( "name" ) ); } } }
protected void mergeModel_Url( Model target, Model source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getUrl(); if ( src != null ) { if ( sourceDominant || target.getUrl() == null ) { target.setUrl( src ); target.setLocation( "url", source.getLocation( "url" ) ); } } }
protected void mergeModel_ArtifactId( Model target, Model source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getArtifactId(); if ( src != null ) { if ( sourceDominant || target.getArtifactId() == null ) { target.setArtifactId( src ); target.setLocation( "artifactId", source.getLocation( "artifactId" ) ); } } }