本文整理了Java中org.apache.maven.model.Build.getFinalName()
方法的一些代码示例,展示了Build.getFinalName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Build.getFinalName()
方法的具体详情如下:
包路径:org.apache.maven.model.Build
类名称:Build
方法名:getFinalName
暂无
代码示例来源:origin: org.apache.maven/maven-project
public String getFinalName()
{
return build.getFinalName();
}
代码示例来源:origin: apache/usergrid
public String getProjectOutputJarPath() {
return Utils.forceSlashOnDir( project.getBuild().getDirectory() ) + project.getBuild().getFinalName() +
"." + project.getPackaging();
}
代码示例来源:origin: apache/usergrid
public String getProjectTestOutputJarPath() {
return Utils.forceSlashOnDir( project.getBuild().getDirectory() ) + project.getBuild().getFinalName() +
"-tests.jar";
}
代码示例来源:origin: fabric8io/docker-maven-plugin
private File ensureThatArtifactFileIsSet(MavenProject project) {
Artifact artifact = project.getArtifact();
if (artifact == null) {
return null;
}
File oldFile = artifact.getFile();
if (oldFile != null) {
return oldFile;
}
Build build = project.getBuild();
if (build == null) {
return null;
}
String finalName = build.getFinalName();
String target = build.getDirectory();
if (finalName == null || target == null) {
return null;
}
File artifactFile = new File(target, finalName + "." + project.getPackaging());
if (artifactFile.exists() && artifactFile.isFile()) {
setArtifactFile(project, artifactFile);
}
return null;
}
代码示例来源:origin: vipshop/Saturn
@SuppressWarnings({ "unchecked" })
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
if (!CommonUtils.initSaturnHome())
throw new MojoExecutionException("The ${user.home}/.saturn/caches is not exists");
Log log = getLog();
MavenProject project = (MavenProject) getPluginContext().get("project");
String version = getSaturnVersion(project);
log.info("Packing the saturn job into a zip file: version:" + version);
List<File> runtimeLibFiles = new ArrayList<File>();
List<Artifact> runtimeArtifacts = project.getRuntimeArtifacts();
for (Artifact artifact : runtimeArtifacts) {
runtimeLibFiles.add(artifact.getFile());
}
runtimeLibFiles.add(new File(project.getBuild().getDirectory(),
project.getBuild().getFinalName() + "." + project.getPackaging()));
File zipFile = new File(project.getBuild().getDirectory(),
project.getArtifactId() + "-" + project.getVersion() + "-" + "app.zip");
try {
CommonUtils.zip(runtimeLibFiles, null, zipFile);
} catch (Exception e) {
e.printStackTrace();
throw new MojoExecutionException("zip " + zipFile + " failed", e);
}
projectHelper.attachArtifact(project, "zip", "executor", zipFile);
}
代码示例来源:origin: apache/maven
if ( build.getFinalName() != null )
serializer.startTag( NAMESPACE, "finalName" ).text( build.getFinalName() ).endTag( NAMESPACE, "finalName" );
代码示例来源:origin: org.apache.maven/maven-project
if ( childBuild.getFinalName() == null )
childBuild.setFinalName( parentBuild.getFinalName() );
代码示例来源:origin: apache/maven
if ( childBuild.getFinalName() == null )
childBuild.setFinalName( parentBuild.getFinalName() );
代码示例来源:origin: org.apache.maven/maven-project
debugMessages ) );
dynamicBuild.setFinalName( restoreString( dynamicBuild.getFinalName(),
originalInterpolatedBuild.getFinalName(),
changedBuild.getFinalName(),
project,
config,
代码示例来源:origin: takari/polyglot-maven
if ( build.getFinalName() != null )
serializer.attribute( NAMESPACE, "finalName", build.getFinalName() );
代码示例来源:origin: net.flexmojos.oss/flexmojos-maven-plugin
protected File getOriginalSwfFile()
{
File bkpOriginalFile =
new File( build.getDirectory(), build.getFinalName() + "-" + originalClassifierName + ".swf" );
return bkpOriginalFile;
}
代码示例来源:origin: Microsoft/azure-maven-plugins
protected File getJarFile() {
final String jarFilePath = StringUtils.isNotEmpty(jarFile) ? jarFile :
Paths.get(buildDirectoryAbsolutePath, project.getBuild().getFinalName() + ".jar").toString();
return new File(jarFilePath);
}
代码示例来源:origin: com.google.appengine/gcloud-maven-plugin
@Override
protected ArrayList<String> collectParameters(String command) {
ArrayList<String> arguments = new ArrayList<>();
arguments.add(command);
handleClassPath(arguments);
arguments.add("-o");
arguments.add(project.getBuild().getDirectory() + "/swagger.xml");
arguments.add("-w");
String appDir = project.getBuild().getDirectory() + "/" + project.getBuild().getFinalName();
arguments.add(appDir);
return arguments;
}
代码示例来源:origin: org.andromda.maven.plugins/andromdapp-maven-plugin
/**
* Retrieves the file that will be or is deployed.
*
* @return the deploy file.
* @throws MojoExecutionException
*/
protected File getDeployFile() throws MojoExecutionException
{
return new File(this.deployLocation, this.project.getBuild().getFinalName() + '.' + this.getPackaging());
}
}
代码示例来源:origin: org.apache.sling/maven-launchpad-plugin
private File getPrimaryArtifact() throws MojoExecutionException {
ArtifactHandler handler = artifactHandlerManager.getArtifactHandler(project.getPackaging());
String artifactName = project.getBuild().getFinalName() + "." + handler.getExtension();
File file = new File(buildDirectory, artifactName);
if (!file.exists()) {
throw new MojoExecutionException("Project's primary artifact (" + file.getPath() + ") doesn't exist.");
}
return file;
}
代码示例来源:origin: jbossas/jboss-as-maven-plugin
@Override
protected File file() {
final PackageType packageType = getPackageType();
final String filename;
if (this.filename == null) {
filename = String.format("%s.%s", project.getBuild().getFinalName(), packageType.getFileExtension());
} else {
filename = this.filename;
}
return new File(targetDir, filename);
}
代码示例来源:origin: org.jboss.shrinkwrap.resolver/shrinkwrap-resolver-impl-maven
@Override
public String getFinalName() {
return model.getBuild().getFinalName() + "." + model.getPackaging();
}
代码示例来源:origin: kumuluz/kumuluzee
protected void repackage() throws MojoExecutionException {
buildDirectory = project.getBuild().getDirectory();
outputDirectory = project.getBuild().getOutputDirectory();
finalName = project.getBuild().getFinalName();
checkPrecoditions();
copyDependencies("classes/lib");
unpackDependencies();
packageJar();
renameJars();
}
代码示例来源:origin: com.atlassian.maven.plugins/maven-amps-plugin
public void execute() throws MojoExecutionException, MojoFailureException
{
MavenProject project = getMavenContext().getProject();
File pluginFile = new File(project.getBuild().getDirectory(), project.getBuild().getFinalName() + ".jar");
getMavenGoals().copyContainerToOutputDirectory(containerVersion);
getMavenGoals().debugStandaloneContainer(pluginFile);
}
}
代码示例来源:origin: com.atlassian.maven.plugins/amps-maven-plugin
public void execute() throws MojoExecutionException, MojoFailureException
{
MavenProject project = getMavenContext().getProject();
File pluginFile = new File(project.getBuild().getDirectory(), project.getBuild().getFinalName() + ".jar");
getMavenGoals().copyContainerToOutputDirectory(containerVersion);
getMavenGoals().debugStandaloneContainer(pluginFile);
}
}
内容来源于网络,如有侵权,请联系作者删除!