本文整理了Java中org.apache.maven.model.Build.setOutputDirectory()
方法的一些代码示例,展示了Build.setOutputDirectory()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Build.setOutputDirectory()
方法的具体详情如下:
包路径:org.apache.maven.model.Build
类名称:Build
方法名:setOutputDirectory
[英]Set the directory where compiled application classes are placed. The default value is target/classes
.
[中]设置放置已编译应用程序类的目录。默认值为target/classes
。
代码示例来源:origin: org.apache.maven/maven-project
public void setOutputDirectory( String outputDirectory )
{
build.setOutputDirectory( outputDirectory );
}
代码示例来源:origin: apache/maven
protected void mergeBuild_OutputDirectory( Build target, Build source, boolean sourceDominant,
Map<Object, Object> context )
{
String src = source.getOutputDirectory();
if ( src != null )
{
if ( sourceDominant || target.getOutputDirectory() == null )
{
target.setOutputDirectory( src );
target.setLocation( "outputDirectory", source.getLocation( "outputDirectory" ) );
}
}
}
代码示例来源:origin: org.apache.maven/maven-project
build.setOutputDirectory( alignToBaseDirectory( build.getOutputDirectory(), basedir ) );
代码示例来源:origin: org.apache.maven/maven-project
build.setOutputDirectory( unalignFromBaseDirectory( build.getOutputDirectory(), basedir ) );
代码示例来源:origin: org.apache.maven/maven-project
public static Build cloneBuild( Build src )
{
if ( src == null )
{
return null;
}
Build result = new Build();
cloneBuildBaseFields( src, result );
result.setExtensions( cloneList( src.getExtensions(), EXTENSION_CLONER ) );
result.setOutputDirectory( src.getOutputDirectory() );
result.setScriptSourceDirectory( src.getScriptSourceDirectory() );
result.setSourceDirectory( src.getSourceDirectory() );
result.setTestOutputDirectory( src.getTestOutputDirectory() );
result.setTestSourceDirectory( src.getTestSourceDirectory() );
return result;
}
代码示例来源:origin: apache/maven
build.setOutputDirectory( alignToBaseDirectory( build.getOutputDirectory(), basedir ) );
代码示例来源:origin: apache/maven
build.setOutputDirectory( unalignFromBaseDirectory( build.getOutputDirectory(), basedir ) );
代码示例来源:origin: apache/maven
build.setOutputDirectory( alignToBaseDirectory( build.getOutputDirectory(), basedir ) );
代码示例来源:origin: org.apache.maven/maven-project
childBuild.setOutputDirectory( parentBuild.getOutputDirectory() );
代码示例来源:origin: apache/maven
childBuild.setOutputDirectory( parentBuild.getOutputDirectory() );
代码示例来源:origin: apache/maven
build.setOutputDirectory( interpolatedTrimmed( parser.nextText(), "outputDirectory" ) );
代码示例来源:origin: takari/polyglot-maven
public BuildBuilder outputDirectory(String outputDirectory) {
if (outputDirectory != null) {
getBuild().setOutputDirectory(outputDirectory);
}
return this;
}
代码示例来源:origin: org.apache.maven/maven-project
debugMessages ) );
dynamicBuild.setOutputDirectory( restoreString( dynamicBuild.getOutputDirectory(),
originalInterpolatedBuild.getOutputDirectory(),
changedBuild.getOutputDirectory(),
代码示例来源:origin: apache/maven
build.setOutputDirectory( interpolatedTrimmed( parser.nextText(), "outputDirectory" ) );
代码示例来源:origin: takari/polyglot-maven
build.setOutputDirectory( getTrimmedValue( value ) );
代码示例来源:origin: io.tesla.maven/maven-model
protected void mergeBuild_OutputDirectory( Build target, Build source, boolean sourceDominant,
Map<Object, Object> context )
{
String src = source.getOutputDirectory();
if ( src != null )
{
if ( sourceDominant || target.getOutputDirectory() == null )
{
target.setOutputDirectory( src );
target.setLocation( "outputDirectory", source.getLocation( "outputDirectory" ) );
}
}
}
代码示例来源:origin: org.apache.maven.plugins/maven-clover-plugin
private void redirectOutputDirectories()
{
// Explicitely set the output directory to be the Clover one so that all other plugins executing
// thereafter output files in the Clover output directory and not in the main output directory.
getProject().getBuild().setDirectory( this.cloverOutputDirectory );
// TODO: Ugly hack below. Changing the directory should be enough for changing the values of all other
// properties depending on it!
getProject().getBuild().setOutputDirectory( new File( this.cloverOutputDirectory, "classes" ).getPath() );
// TODO: This is a hack. Remove this when http://jira.codehaus.org/browse/MINSTALL-18 is fixed.
new File( getProject().getBuild().getOutputDirectory() ).mkdirs();
getProject().getBuild().setTestOutputDirectory(
new File( this.cloverOutputDirectory, "test-classes" ).getPath() );
}
代码示例来源:origin: org.sonatype.plugins/munge-maven-plugin
@SuppressWarnings( "unchecked" )
public void execute()
throws MojoExecutionException
{
Munge.symbols.clear();
for ( final String s : symbols.split( "," ) )
{
Munge.symbols.put( s, Boolean.TRUE );
}
final String mungedMainDirectory = mungedDirectory + File.separator + "main";
final String mungedTestDirectory = mungedDirectory + File.separator + "test";
munge( build.getSourceDirectory(), mungedMainDirectory, includes, excludes );
munge( build.getTestSourceDirectory(), mungedTestDirectory, includes, excludes );
if ( null != executedProject )
{
executedProject.getCompileSourceRoots().clear();
executedProject.addCompileSourceRoot( mungedMainDirectory );
executedProject.getTestCompileSourceRoots().clear();
executedProject.addTestCompileSourceRoot( mungedTestDirectory );
final Build executedBuild = executedProject.getBuild();
executedBuild.setDirectory( mungedDirectory );
executedBuild.setOutputDirectory( mungedDirectory + File.separator + "classes" );
executedBuild.setTestOutputDirectory( mungedDirectory + File.separator + "test-classes" );
}
}
代码示例来源:origin: errai/errai
@Override
public boolean install() {
final MavenFacet coreFacet = getProject().getFacet(MavenFacet.class);
final Model pom = coreFacet.getModel();
Build build = pom.getBuild();
if (build == null) {
build = new Build();
pom.setBuild(build);
}
pom.addProperty(Property.JbossHome.getName(), JBOSS_HOME);
pom.addProperty(Property.DevContext.getName(), DEV_CONTEXT);
pom.addProperty(Property.ErraiVersion.getName(), getErraiVersion());
if (build.getOutputDirectory() == null)
build.setOutputDirectory("src/main/webapp/WEB-INF/classes");
Resource res = getResource(build.getSourceDirectory(), build.getResources());
if (res == null) {
res = new Resource();
res.setDirectory(build.getSourceDirectory());
}
if (build.getResources().size() < 2) {
res = getResource(DefaultValue.ResourceDirectory.getDefaultValue(), build.getResources());
if (res == null) {
res = new Resource();
res.setDirectory(DefaultValue.ResourceDirectory.getDefaultValue());
}
}
coreFacet.setModel(pom);
return true;
}
代码示例来源:origin: com.github.htfv.maven.plugins/build-configurator-core
build.setFinalName(
interpolateString(build.getFinalName()));
build.setOutputDirectory(
interpolateString(build.getOutputDirectory()));
build.setScriptSourceDirectory(
内容来源于网络,如有侵权,请联系作者删除!