public void setArtifactId( String artifactId ) { getModel().setArtifactId( artifactId ); }
public void setArtifactId( String artifactId ) { getModel().setArtifactId( artifactId ); }
public MavenProject() { Model model = new Model(); model.setGroupId( EMPTY_PROJECT_GROUP_ID ); model.setArtifactId( EMPTY_PROJECT_ARTIFACT_ID ); model.setVersion( EMPTY_PROJECT_VERSION ); this.setModel( model ); }
public MavenProject() { Model model = new Model(); model.setGroupId( EMPTY_PROJECT_GROUP_ID ); model.setArtifactId( EMPTY_PROJECT_ARTIFACT_ID ); model.setVersion( EMPTY_PROJECT_VERSION ); setModel( model ); }
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" ) ); } } }
private Model createStubModel( Artifact projectArtifact ) { getLogger().debug( "Using defaults for missing POM " + projectArtifact ); Model model = new Model(); model.setModelVersion( "4.0.0" ); model.setArtifactId( projectArtifact.getArtifactId() ); model.setGroupId( projectArtifact.getGroupId() ); model.setVersion( projectArtifact.getVersion() ); // TODO: not correct in some instances model.setPackaging( projectArtifact.getType() ); model.setDistributionManagement( new DistributionManagement() ); model.getDistributionManagement().setStatus( ArtifactStatus.GENERATED.toString() ); return model; }
model.setArtifactId( interpolatedTrimmed( parser.nextText(), "artifactId" ) );
superModel.setArtifactId( STANDALONE_SUPERPOM_ARTIFACTID );
model.setArtifactId( interpolatedTrimmed( parser.nextText(), "artifactId" ) );
public Model mergeModel(Model model) { model.setGroupId(groupId); model.setArtifactId(artifactId); if(version != null) model.setVersion(version); return model; }
private void createTempMavenModel() { model = new Model(); model.setArtifactId("temp-artifact-id"); model.setGroupId("temp-group-id"); model.setVersion("temp-version"); model.setDependencies(new ArrayList<>()); model.setModelVersion("4.0.0"); }
result.setArtifactId( src.getArtifactId() ); result.setBuild( cloneBuild( src.getBuild() ) ); result.setCiManagement( cloneCiManagement( src.getCiManagement() ) );
inheritingModel.setArtifactId(model.getArtifactId()); inheritingModel.setPackaging(model.getPackaging()); inheritingModel.setVersion(model.getVersion()); inheritingModel.setArtifactId(model.getArtifactId()); inheritingModel.setGroupId(model.getGroupId()); inheritingModel.setPackaging(model.getPackaging()); inheritingModel.setArtifactId(model.getArtifactId()); inheritingModel.setPackaging(model.getPackaging()); tasks = modelTasks.get(inheritingModel.getId());
public File getArtifactPomFile() { if (artifactPomFile == null) { checkArgument(!isEmpty(artifactId), "Filename cannot be empty"); final File tempFile = new File(getTempFolder(), artifactId + ".pom"); tempFile.deleteOnExit(); Model model = new Model(); model.setGroupId(getGroupId()); model.setArtifactId(getArtifactId()); model.setVersion(getVersion()); model.setModelVersion("4.0.0"); if (!sharedLibraries.isEmpty()) { model.setBuild(new Build()); model.getBuild().setPlugins(singletonList(createMuleMavenPlugin())); } for (AbstractDependencyFileBuilder fileBuilderDependency : dependencies) { model.addDependency(fileBuilderDependency.getAsMavenDependency()); } artifactPomFile = new File(tempFile.getAbsolutePath()); try (FileOutputStream fileOutputStream = new FileOutputStream(artifactPomFile)) { new MavenXpp3Writer().write(fileOutputStream, model); } catch (IOException e) { throw new MuleRuntimeException(e); } } return artifactPomFile; }
model.setArtifactId(artifactId);
model.setArtifactId( getTrimmedValue( parser.nextText() ) );
public Model getModel() throws IOException { try { Model model = new MavenXpp3Reader().read(new FileInputStream(file)); model.setGroupId(properties.getProperty("groupId", model.getGroupId())); model.setArtifactId(properties.getProperty("artifactId", model.getArtifactId())); model.setVersion(properties.getProperty("version", model.getVersion())); return model; } catch (XmlPullParserException e) { throw new IOException("Error parsing maven pom " + file, e); } } }
model.setGroupId(projectId.getGroup()); model.setVersion(projectId.getVersion()); model.setArtifactId(projectId.getArtifact()); model.setModelVersion("4.0.0");
public Project(String groupId, String artifactId, String version, String path) { model = new Model(); model.setGroupId(groupId); model.setArtifactId(artifactId); model.setVersion(version); if (path != null) { model.setPomFile(new File(path, "pom.xml")); } }
protected Pom createDummyPom() { Model mavenModel = new Model(); mavenModel.setGroupId( "unspecified" ); mavenModel.setArtifactId( "unspecified" ); mavenModel.setVersion( "0.0" ); mavenModel.setPackaging( "jar" ); MavenProject mavenProject = new MavenProject( mavenModel ); Pom pom = new Pom(); pom.setMavenProject( mavenProject ); return pom; }