本文整理匯總了Java中org.apache.maven.plugin.descriptor.PluginDescriptor.setArtifactId方法的典型用法代碼示例。如果您正苦於以下問題:Java PluginDescriptor.setArtifactId方法的具體用法?Java PluginDescriptor.setArtifactId怎麽用?Java PluginDescriptor.setArtifactId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.maven.plugin.descriptor.PluginDescriptor
的用法示例。
在下文中一共展示了PluginDescriptor.setArtifactId方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: retrieveContext
import org.apache.maven.plugin.descriptor.PluginDescriptor; //導入方法依賴的package包/類
Map<String, Object> retrieveContext( MavenSession session )
{
Map<String, Object> context = null;
if ( session != null )
{
PluginDescriptor desc = new PluginDescriptor();
desc.setGroupId( PluginDescriptor.getDefaultPluginGroupId() );
desc.setArtifactId( PluginDescriptor.getDefaultPluginArtifactId( "toolchains" ) );
MavenProject current = session.getCurrentProject();
if ( current != null )
{
//TODO: why is this using the context
context = session.getPluginContext( desc, current );
}
}
return ( context != null ) ? context : new HashMap<String, Object>();
}
示例2: createMojoDescriptor
import org.apache.maven.plugin.descriptor.PluginDescriptor; //導入方法依賴的package包/類
public static MojoDescriptor createMojoDescriptor( String mojoDescription )
{
final PluginDescriptor descriptor = new PluginDescriptor();
descriptor.setArtifactId( mojoDescription );
final MojoDescriptor mojoDescriptor = new MojoDescriptor();
mojoDescriptor.setDescription( mojoDescription );
mojoDescriptor.setPluginDescriptor( descriptor );
return mojoDescriptor;
}
示例3: createMojoDescriptor
import org.apache.maven.plugin.descriptor.PluginDescriptor; //導入方法依賴的package包/類
public static MojoDescriptor createMojoDescriptor( String phaseName, boolean threadSafe )
{
final MojoDescriptor mojoDescriptor = new MojoDescriptor();
mojoDescriptor.setPhase( phaseName );
final PluginDescriptor descriptor = new PluginDescriptor();
Plugin plugin = new Plugin();
plugin.setArtifactId( "org.apache.maven.test.MavenExecutionPlan" );
plugin.setGroupId( "stub-plugin-" + phaseName );
descriptor.setPlugin( plugin );
descriptor.setArtifactId( "artifact." + phaseName );
mojoDescriptor.setPluginDescriptor( descriptor );
mojoDescriptor.setThreadSafe( threadSafe );
return mojoDescriptor;
}
示例4: newMojoExecution
import org.apache.maven.plugin.descriptor.PluginDescriptor; //導入方法依賴的package包/類
private MojoExecution newMojoExecution()
{
PluginDescriptor pd = new PluginDescriptor();
pd.setArtifactId( "my-plugin" );
pd.setGroupId( "org.myco.plugins" );
pd.setVersion( "1" );
MojoDescriptor md = new MojoDescriptor();
md.setPluginDescriptor( pd );
pd.addComponentDescriptor( md );
return new MojoExecution( md );
}