本文整理汇总了Java中org.apache.maven.shared.invoker.InvocationRequest.setToolchainsFile方法的典型用法代码示例。如果您正苦于以下问题:Java InvocationRequest.setToolchainsFile方法的具体用法?Java InvocationRequest.setToolchainsFile怎么用?Java InvocationRequest.setToolchainsFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.maven.shared.invoker.InvocationRequest
的用法示例。
在下文中一共展示了InvocationRequest.setToolchainsFile方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupInvocationRequest
import org.apache.maven.shared.invoker.InvocationRequest; //导入方法依赖的package包/类
private InvocationRequest setupInvocationRequest() throws MojoExecutionException {
InvocationRequest request = new DefaultInvocationRequest();
request.setPomFile(this.project.getFile());
// installation and deployment are performed in a later step. We first need to ensure that there are no changes in
// the scm, ...
request.setGoals(this.goals);
request.setProperties(this.releaseArgs);
request.setProfiles(this.profiles);
request.setShellEnvironmentInherited(true);
for (String key : this.releaseEnvironmentVariables.keySet()) {
request.addShellEnvironment(key, this.releaseEnvironmentVariables.get(key));
}
request.setOffline(this.settings.isOffline());
request.setInteractive(this.settings.isInteractiveMode());
MavenExecutionRequest originalRequest = this.session.getRequest();
File globalSettingsFile = originalRequest.getGlobalSettingsFile();
if (globalSettingsFile != null && globalSettingsFile.exists() && globalSettingsFile.isFile()) {
request.setGlobalSettingsFile(globalSettingsFile);
}
File userSettingsFile = originalRequest.getUserSettingsFile();
if (userSettingsFile != null && userSettingsFile.exists() && userSettingsFile.isFile()) {
request.setUserSettingsFile(userSettingsFile);
}
File toolchainsFile = originalRequest.getUserToolchainsFile();
if (toolchainsFile.exists() && toolchainsFile.isFile()) {
request.setToolchainsFile(toolchainsFile);
}
return request;
}
示例2: createInvocationRequest
import org.apache.maven.shared.invoker.InvocationRequest; //导入方法依赖的package包/类
public InvocationRequest createInvocationRequest()
{
InvocationRequest request = new DefaultInvocationRequest();
request.setAlsoMake( alsoMake );
request.setAlsoMakeDependents( alsoMakeDependents );
request.setDebug( debug );
request.setFailureBehavior( failureBehavior );
request.setGlobalChecksumPolicy( globalChecksumPolicy );
request.setGlobalSettingsFile( stringToFile( globalSettings ) );
request.setGoals( goals );
request.setInteractive( !batchMode );
request.setJavaHome( stringToFile( javaHome ) );
request.setLocalRepositoryDirectory( stringToFile( localRepository ) );
request.setMavenOpts( mavenOpts );
request.setOffline( offline );
request.setPomFile( stringToFile( pomFile ) );
request.setProfiles( profiles );
request.setProjects( projects );
request.setRecursive( !nonRecursive );
request.setResumeFrom( resumeFrom );
request.setShowErrors( showErrors );
request.setShowVersion( showVersion );
request.setThreads( threads );
request.setToolchainsFile( stringToFile( toolchains ) );
request.setUpdateSnapshots( updateSnapshots );
request.setUserSettingsFile( stringToFile( userSettings ) );
Properties properties = new Properties();
defines.forEach( ( key, value ) -> properties.put( key, value ) );
request.setProperties( properties );
return request;
}
示例3: createAndConfigureAnInvocationRequest
import org.apache.maven.shared.invoker.InvocationRequest; //导入方法依赖的package包/类
protected InvocationRequest createAndConfigureAnInvocationRequest( ItemWithProperties currentValue )
{
InvocationRequest request = new DefaultInvocationRequest();
request.setAlsoMake( isAlsoMake() );
request.setAlsoMakeDependents( isAlsoMakeDependents() );
request.setDebug( isDebug() );
request.setFailureBehavior( getFailureBehaviour() );
request.setGlobalChecksumPolicy( getGlobalChecksumPolicy() );
request.setGlobalSettingsFile( getGlobalSettingsFile() );
request.setInteractive( isInteractive() );
request.setLocalRepositoryDirectory( getLocalRepositoryDirectory() );
request.setMavenOpts( getMavenOpts() );
request.setNonPluginUpdates( isNonPluginUpdates() );
request.setOffline( isOffline() );
// request.setProperties( properties )
// ;
// @TODO: Think about it.
// request.setPomFile(pomFile);
// @TODO: Think about it.
// request.setPomFileName(pomFilename);
// The following parameter do make sense to use a placeholder
// base directory
// cd @[email protected]
// mvn clean package
request.setBaseDirectory( getBaseDirectoryAfterPlaceHolderIsReplaced( currentValue.getName() ) );
// goals:
// mvn plugin-name:@[email protected]
//
request.setGoals( getGoalsAfterPlaceHolderIsReplaced( currentValue.getName() ) );
// Profiles:
// mvn [email protected]@ clean package
// mvn [email protected]@
request.setProfiles( getProfilesAfterPlaceHolderIsReplaced( currentValue.getName() ) );
// Projects:
// mvn -pl [email protected]@ clean package
request.setProjects( getProjectsAfterPlaceHolderIsReplaced( currentValue.getName() ) );
Properties props = getMergedProperties(currentValue );
request.setProperties( props );
request.setRecursive( isRecursive() );
request.setResumeFrom( getResumeFrom() );
request.setShellEnvironmentInherited( isShellEnvironmentInherited() );
request.setShowErrors( isShowErrors() );
request.setShowVersion( isShowVersion() );
request.setThreads( getThreads() );
request.setToolchainsFile( getToolchains() );
request.setUpdateSnapshots( isUpdateSnapshots() );
request.setUserSettingsFile( getUserSettings() );
return request;
}