org.apache.maven.model.Build.setFinalName()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(124)

本文整理了Java中org.apache.maven.model.Build.setFinalName()方法的一些代码示例,展示了Build.setFinalName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Build.setFinalName()方法的具体详情如下:
包路径:org.apache.maven.model.Build
类名称:Build
方法名:setFinalName

Build.setFinalName介绍

暂无

代码示例

代码示例来源:origin: org.apache.maven/maven-project

public void setFinalName( String finalName )
{
  build.setFinalName( finalName );
}

代码示例来源:origin: org.apache.maven/maven-project

childBuild.setFinalName( parentBuild.getFinalName() );

代码示例来源:origin: apache/maven

childBuild.setFinalName( parentBuild.getFinalName() );

代码示例来源:origin: apache/maven

build.setFinalName( interpolatedTrimmed( parser.nextText(), "finalName" ) );

代码示例来源:origin: org.apache.maven/maven-project

debugMessages ) );
dynamicBuild.setFinalName( restoreString( dynamicBuild.getFinalName(),
                     originalInterpolatedBuild.getFinalName(),
                     changedBuild.getFinalName(),

代码示例来源:origin: apache/maven

build.setFinalName( interpolatedTrimmed( parser.nextText(), "finalName" ) );

代码示例来源:origin: org.apache.maven/maven-project

modelBuild.setFinalName( profileBuild.getFinalName() );

代码示例来源:origin: takari/polyglot-maven

build.setFinalName( getTrimmedValue( value ) );

代码示例来源:origin: org.scala-tools/maven-scala-plugin

getBuild().setDefaultGoal(value);
} else if (key.equals("finalName") || key.equals("project.finalName")) {
  getBuild().setFinalName(value);
} else if (key.equals("scriptSourceDirectory")
    || key.equals("project.scriptSourceDirectory")

代码示例来源:origin: be.fluid-it.tools.mvn.cd/mvn-ext-freeze

@Override
public void mojoStarted( ExecutionEvent event )
{
  if (event.getMojoExecution().getExecutionId() != null && event.getMojoExecution().getExecutionId().endsWith("-snapshot")) {
    frozenPomFile = event.getProject().getFile();
    event.getProject().setFile(new File( frozenPomFile.getParent(), MavenConventions.POM_FILE));
    frozenArtifact = event.getProject().getArtifact();
    Artifact snapshotArtifact = ArtifactUtils.copyArtifact(frozenArtifact);
    snapshotArtifact.setVersion(transformToSnapshotVersion(frozenArtifact.getVersion()));
    event.getProject().setArtifact(snapshotArtifact);
    if (!isPomArtifact(event.getProject())) {
      frozenFinalName = event.getProject().getBuild().getFinalName();
      event.getProject().getBuild().setFinalName(transformToSnapshot(frozenFinalName, frozenArtifact, snapshotArtifact));
      event.getProject().getArtifact().setFile(new File(transformToSnapshot(frozenArtifact.getFile().getAbsolutePath(), frozenArtifact, snapshotArtifact)));
      logger.info("[SnapshotExecutionListener]: Switched frozenArtifact file to " + transformToSnapshot(frozenArtifact.getFile().getAbsolutePath(), frozenArtifact, snapshotArtifact));
    }
    frozenAttachedArtifacts = new LinkedList<Artifact>();
    for (Artifact attachedArtifact : event.getProject().getAttachedArtifacts()) {
      String attachedFileAbsolutePath = attachedArtifact.getFile().getAbsolutePath();
      logger.info("[SnapshotExecutionListener]: Attached frozenArtifact file : " + attachedFileAbsolutePath);
      frozenAttachedArtifacts.add(attachedArtifact);
    }
    event.getProject().getAttachedArtifacts().clear();
    for (Artifact frozenAttachedArtifact : frozenAttachedArtifacts) {
      Artifact unfrozenAttachedArtifact = ArtifactUtils.copyArtifact(frozenAttachedArtifact);
      unfrozenAttachedArtifact.setVersion(transformToSnapshot(unfrozenAttachedArtifact.getVersion(), frozenArtifact, snapshotArtifact));
      event.getProject().addAttachedArtifact(unfrozenAttachedArtifact);
    }
  }
}

代码示例来源:origin: be.fluid-it.tools.mvn.cd/mvn-ext-freeze

private void restoreProjectState(ExecutionEvent event) {
    if (event.getMojoExecution().getExecutionId() != null && event.getMojoExecution().getExecutionId().endsWith("-snapshot")) {
      if (!event.getProject().getFile().equals(frozenPomFile)) {
        event.getProject().setFile(frozenPomFile);
        event.getProject().setArtifact(frozenArtifact);

        event.getProject().getAttachedArtifacts().clear();
        for (Artifact frozenAttachedArtifact : frozenAttachedArtifacts) {
          event.getProject().addAttachedArtifact(frozenAttachedArtifact);
        }

        if (!isPomArtifact(event.getProject())) {
          event.getProject().getBuild().setFinalName(frozenFinalName);
        }
      }
    }
  }
}

代码示例来源:origin: org.jboss.forge.addon/maven-impl-projects

@Override
public void setFinalName(final String finalName)
{
 MavenFacet mavenFacet = getFaceted().getFacet(MavenFacet.class);
 Model pom = mavenFacet.getModel();
 Build build = pom.getBuild();
 if (build == null)
 {
   build = new Build();
   pom.setBuild(build);
 }
 pom.getBuild().setFinalName(finalName);
 mavenFacet.setModel(pom);
}

代码示例来源:origin: org.switchyard/switchyard-forge-plugin

Profile buildOpenShiftProfile() throws Exception {
  Model pom = project.getFacet(MavenCoreFacet.class).getPOM();
  Profile profile = new Profile();
  profile.setId(OPEN_SHIFT_PROFILE);
  
  Build build = new Build();
  build.setFinalName(pom.getArtifactId());
  profile.setBuild(build);
  addScannerPlugin(pom, profile);
  Plugin jarPlugin = new Plugin();
  jarPlugin.setGroupId("org.apache.maven.plugins");
  jarPlugin.setArtifactId("maven-jar-plugin");
  jarPlugin.setVersion("2.3.1");
  String pluginConfig = 
      "<configuration>"
      + "<outputDirectory>deployments</outputDirectory>"
      + "</configuration>";
  Xpp3Dom dom = Xpp3DomBuilder.build(new ByteArrayInputStream(pluginConfig.getBytes()), "UTF-8");
  jarPlugin.setConfiguration(dom);
  build.addPlugin(jarPlugin);
  
  return profile;
}

代码示例来源:origin: apache/maven-release

+ releaseProject.getId() );
releaseModel.getBuild().setFinalName( finalName );

代码示例来源:origin: io.tesla.maven/maven-model

build.setFinalName( getTrimmedValue( parser.nextText() ) );

代码示例来源:origin: com.github.htfv.maven.plugins/build-configurator-core

build.setDirectory(
    interpolateString(build.getDirectory()));
build.setFinalName(
    interpolateString(build.getFinalName()));
build.setOutputDirectory(

代码示例来源:origin: io.tesla.maven/maven-model

build.setFinalName( getTrimmedValue( parser.nextText() ) );

相关文章