本文整理了Java中org.twdata.maven.mojoexecutor.MojoExecutor.name()
方法的一些代码示例,展示了MojoExecutor.name()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MojoExecutor.name()
方法的具体详情如下:
包路径:org.twdata.maven.mojoexecutor.MojoExecutor
类名称:MojoExecutor
方法名:name
[英]Wraps the element name string in a more readable format
[中]以更可读的格式包装元素名称字符串
代码示例来源:origin: allegro/grunt-maven-plugin
private Element[] createResourcesListElement(String[] resources, String elementName, Element... append) {
Element[] elements = new Element[resources.length + append.length];
int index = 0;
for (; index < resources.length; ++index) {
elements[index] = element(name(elementName), resources[index]);
}
for (int appendIndex = 0; appendIndex < append.length; appendIndex++, ++index) {
elements[index] = append[appendIndex];
}
return elements;
}
代码示例来源:origin: allegro/grunt-maven-plugin
public void addArgument(String value) {
arguments.add(element(name(ARGUMENT_NAME), value));
}
代码示例来源:origin: allegro/grunt-maven-plugin
/**
* Normalization checks if argument contains whitespace character between
* argument name and it's value, if so it replaces the whitespace with provided
* replacement. Normalization is needed, because mojo-exec discards all
* characters after first whitespace.
*/
public void addNormalizedArgument(String value, String whitespaceReplacement) {
arguments.add(element(name(ARGUMENT_NAME), normalizeArgument(value, whitespaceReplacement)));
}
代码示例来源:origin: com.atlassian.maven.plugins/amps-maven-plugin
private Element waitElement(Plugin cargo)
{
if (cargo.getGroupId().equals("org.twdata.maven"))
{
return element(name("wait"), "false");
}
// If not using twdata's cargo, we avoid passing wait=false, because it's the default and it generates
// a deprecation warning
return null;
}
代码示例来源:origin: com.atlassian.maven.plugins/maven-amps-plugin
private Element waitElement(Plugin cargo)
{
if (cargo.getGroupId().equals("org.twdata.maven"))
{
return element(name("wait"), "false");
}
// If not using twdata's cargo, we avoid passing wait=false, because it's the default and it generates
// a deprecation warning
return null;
}
代码示例来源:origin: com.atlassian.maven.plugins/maven-amps-plugin
protected Xpp3Dom baseConfiguration()
{
return configuration(
element(name("driver") , dataSource.getDriver()),
element(name("url"), dataSource.getDefaultDatabase()),
element(name("username"), dataSource.getSystemUsername()),
element(name("password"), dataSource.getSystemPassword()),
// we need commit transaction for drop database and then create them again
element(name("autocommit"), "true")
);
}
代码示例来源:origin: com.atlassian.maven.plugins/amps-maven-plugin
protected Xpp3Dom systemDatabaseConfiguration()
{
return configuration(
element(name("driver") , dataSource.getDriver()),
element(name("url"), dataSource.getDefaultDatabase()),
element(name("username"), dataSource.getSystemUsername()),
element(name("password"), dataSource.getSystemPassword()),
element(name("autocommit"), "true")
);
}
代码示例来源:origin: com.atlassian.maven.plugins/amps-maven-plugin
protected Xpp3Dom productDatabaseConfiguration()
{
return configuration(
element(name("driver") , dataSource.getDriver()),
element(name("url"), dataSource.getUrl()),
element(name("username"), dataSource.getUsername()),
element(name("password"), dataSource.getPassword()),
// we need commit transaction for drop database and then create them again
element(name("autocommit"), "true")
);
}
代码示例来源:origin: allegro/grunt-maven-plugin
/**
* Create
* <pre>configuration</pre> element for proper *nix OSes.
*
* @return configuration
*/
private Element[] buildConfigForProperOS(Executable executable) {
Element[] osConfiguration = new Element[]{
element(name("executable"), executable.executableName()),
element(name("arguments"), executable.argumentsArray())
};
return osConfiguration;
}
代码示例来源:origin: com.atlassian.maven.plugins/amps-maven-plugin
private void appendJunitCategoryToConfiguration(final String category, final Xpp3Dom config)
{
final Element groups = element(name("groups"), category);
config.addChild(groups.toDom());
}
代码示例来源:origin: com.atlassian.maven.plugins/amps-maven-plugin
/**
* Adds a child node with the given name and value to the given DOM node.
*
* @param parentNode the node to receive a new child
* @param childName the name of the new child node
* @param childValue the value of the new child node
*/
private static void addChild(final Xpp3Dom parentNode, final String childName, final String childValue)
{
parentNode.addChild(element(name(childName), childValue).toDom());
}
}
代码示例来源:origin: com.atlassian.maven.plugins/maven-amps-plugin
private void appendJunitCategoryToConfiguration(final String category, final Xpp3Dom config)
{
final Element groups = element(name("groups"), category);
config.addChild(groups.toDom());
}
代码示例来源:origin: com.atlassian.maven.plugins/amps-maven-plugin
@Override
public Xpp3Dom getConfigImportFile()
{
Xpp3Dom pluginConfiguration = productDatabaseConfiguration();
pluginConfiguration.addChild(
element(name("srcFiles"),
element(name("srcFile"), getDataSource().getDumpFilePath())).toDom()
);
return pluginConfiguration;
}
代码示例来源:origin: com.atlassian.maven.plugins/amps-maven-plugin
@Override
public Xpp3Dom getPluginConfiguration() throws MojoExecutionException
{
String sql = dropDatabase() + dropUser() + createDatabase() + createUser() + grantPermissionForUser();
getLog().info("Postgres initialization database sql: " + sql);
Xpp3Dom pluginConfiguration = systemDatabaseConfiguration();
pluginConfiguration.addChild(
element(name("sqlCommand"), sql).toDom()
);
return pluginConfiguration;
}
代码示例来源:origin: com.atlassian.maven.plugins/amps-maven-plugin
@Override
public Xpp3Dom getPluginConfiguration() throws MojoExecutionException
{
String sql = dropDatabase() + dropUser() + createDatabase() + createUser() + grantPermissionForUser();
getLog().info("MSSQL initializarion database sql: " + sql);
Xpp3Dom pluginConfiguration = systemDatabaseConfiguration();
pluginConfiguration.addChild(
element(name("sqlCommand"), sql).toDom()
);
return pluginConfiguration;
}
}
代码示例来源:origin: com.atlassian.maven.plugins/amps-maven-plugin
@Override
public Xpp3Dom getPluginConfiguration() throws MojoExecutionException
{
String sql = dropDatabase() + dropUser() + createDatabase() + createUser() + grantPermissionForUser();
getLog().info("MySQL initialization database sql: " + sql);
Xpp3Dom pluginConfiguration = systemDatabaseConfiguration();
pluginConfiguration.addChild(
element(name("sqlCommand"), sql).toDom()
);
return pluginConfiguration;
}
}
代码示例来源:origin: com.atlassian.maven.plugins/maven-amps-plugin
@Override
public Xpp3Dom getPluginConfiguration() throws MojoExecutionException
{
String sql = dropDatabase() + dropUser() + createDatabase() + createUser() + grantPermissionForUser();
Xpp3Dom pluginConfiguration = baseConfiguration();
pluginConfiguration.addChild(
element(name("sqlCommand"), sql).toDom()
);
return pluginConfiguration;
}
}
代码示例来源:origin: com.atlassian.maven.plugins/maven-amps-plugin
@Override
public Xpp3Dom getPluginConfiguration() throws MojoExecutionException
{
String sql = dropDatabase() + dropUser() + createDatabase() + createUser() + grantPermissionForUser();
Xpp3Dom pluginConfiguration = baseConfiguration();
pluginConfiguration.addChild(
element(name("sqlCommand"), sql).toDom()
);
return pluginConfiguration;
}
}
代码示例来源:origin: com.atlassian.maven.plugins/maven-amps-plugin
@Override
public Xpp3Dom getPluginConfiguration() throws MojoExecutionException
{
String sql = dropDatabase() + dropUser() + createDatabase() + createUser() + grantPermissionForUser();
Xpp3Dom pluginConfiguration = baseConfiguration();
pluginConfiguration.addChild(
element(name("sqlCommand"), sql).toDom()
);
return pluginConfiguration;
}
代码示例来源:origin: com.atlassian.maven.plugins/maven-amps-plugin
@Override
public Xpp3Dom getPluginConfiguration()
{
String sql = dropDatabase() + dropUser() + createDatabase() + createUser() + grantPermissionForUser();
Xpp3Dom pluginConfiguration = baseConfiguration();
pluginConfiguration.addChild(
element(name("sqlCommand"), sql).toDom()
);
return pluginConfiguration;
}
}
内容来源于网络,如有侵权,请联系作者删除!