提交 b02f9cc6 编写于 作者: O Olivier Lamy

[HUDSON-8406] Add more options to configure maven project building

processPlugins and resolveDependencies are now configurable
上级 2637f6b6
......@@ -181,6 +181,18 @@ public final class MavenModuleSet extends AbstractMavenProject<MavenModuleSet,Ma
* If true, do not archive artifacts to the master.
*/
private boolean archivingDisabled = false;
/**
* parameter for pom parsing by default <code>false</code> to be faster
* @since 1.394
*/
private boolean resolveDependencies = false;
/**
* parameter for pom parsing by default <code>false</code> to be faster
* @since 1.394
*/
private boolean processPlugins = false;
/**
* Reporters configured at {@link MavenModuleSet} level. Applies to all {@link MavenModule} builds.
......@@ -358,6 +370,26 @@ public final class MavenModuleSet extends AbstractMavenProject<MavenModuleSet,Ma
public void setIsArchivingDisabled(boolean archivingDisabled) {
this.archivingDisabled = archivingDisabled;
}
public boolean isResolveDependencies()
{
return resolveDependencies;
}
public void setResolveDependencies( boolean resolveDependencies )
{
this.resolveDependencies = resolveDependencies;
}
public boolean isProcessPlugins()
{
return processPlugins;
}
public void setProcessPlugins( boolean processPlugins )
{
this.processPlugins = processPlugins;
}
/**
* List of active {@link MavenReporter}s that should be applied to all module builds.
......@@ -764,7 +796,8 @@ public final class MavenModuleSet extends AbstractMavenProject<MavenModuleSet,Ma
ignoreUpstremChanges = !json.has("triggerByDependency");
incrementalBuild = req.hasParameter("maven.incrementalBuild");
archivingDisabled = req.hasParameter("maven.archivingDisabled");
resolveDependencies = req.hasParameter( "maven.resolveDependencies" );
processPlugins = req.hasParameter( "maven.processPlugins" );
reporters.rebuild(req,json,MavenReporters.getConfigurableList());
publishers.rebuild(req,json,BuildStepDescriptor.filter(Publisher.all(),this.getClass()));
buildWrappers.rebuild(req,json,BuildWrappers.getFor(this));
......@@ -876,4 +909,6 @@ public final class MavenModuleSet extends AbstractMavenProject<MavenModuleSet,Ma
}
}
......@@ -1003,6 +1003,10 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
private final String workspaceProper;
private final String mavenVersion;
private boolean resolveDependencies = false;
private boolean processPlugins = false;
String rootPOMRelPrefix;
public PomParser(BuildListener listener, MavenInstallation mavenHome, MavenModuleSet project,String mavenVersion) {
......@@ -1030,6 +1034,8 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
}
this.alternateSettings = project.getAlternateSettings();
this.mavenVersion = mavenVersion;
this.resolveDependencies = project.isResolveDependencies();
this.processPlugins = project.isProcessPlugins();
}
......@@ -1099,9 +1105,8 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
privateRepository, settingsLoc );
mavenEmbedderRequest.setTransferListener( new SimpleTransferListener(listener) );
// FIXME must be configurable tru the ui !!
mavenEmbedderRequest.setProcessPlugins( true );
mavenEmbedderRequest.setResolveDependencies( true );
mavenEmbedderRequest.setProcessPlugins( this.processPlugins );
mavenEmbedderRequest.setResolveDependencies( this.resolveDependencies );
// FIXME handle 3.1 level when version will be here : no rush :-)
// or made something configurable tru the ui ?
......
......@@ -88,6 +88,10 @@ THE SOFTWARE.
checked="${!it.aggregatorStyleBuild}" />
<f:optionalBlock name="maven.usePrivateRepository" title="${%Use private Maven repository}" help="/plugin/maven-plugin/private-repository.html"
checked="${it.usesPrivateRepository()}" />
<f:optionalBlock name="maven.resolveDependencies" title="${%Resolve Dependencies during Pom parsing}"
checked="${it.isResolveDependencies()}" />
<f:optionalBlock name="maven.processPlugins" title="${%Process Plugins during Pom parsing}"
checked="${it.isProcessPlugins()}" />
</f:advanced>
</f:section>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册