本文整理了Java中org.apache.maven.model.Extension.<init>()
方法的一些代码示例,展示了Extension.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Extension.<init>()
方法的具体详情如下:
包路径:org.apache.maven.model.Extension
类名称:Extension
方法名:<init>
暂无
代码示例来源:origin: org.apache.maven/maven-project
public static Extension cloneExtension( Extension src )
{
Extension rExt = new Extension();
rExt.setArtifactId( src.getArtifactId() );
rExt.setGroupId( src.getGroupId() );
rExt.setVersion( src.getVersion() );
return rExt;
}
代码示例来源:origin: apache/maven
Extension extension = new Extension();
for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
代码示例来源:origin: takari/polyglot-maven
public default Extension extension(NamedValue... keyValuePairs) {
return NamedValueProcessor.namedToObject(new Extension(), keyValuePairs);
}
代码示例来源:origin: takari/polyglot-maven
public Object newInstance(FactoryBuilderSupport builder, Object name, Object value, Map attrs) throws InstantiationException, IllegalAccessException {
Extension node;
if (value != null) {
node = parse(value);
if (node == null) {
throw new NodeValueParseException(this, value);
}
} else {
node = new Extension();
}
return node;
}
代码示例来源:origin: apache/maven
Extension extension = new Extension();
InputLocation _location;
_location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
代码示例来源:origin: takari/polyglot-maven
public default Extension extension(String classifier) {
Extension extension = new Extension();
String[] parts = classifier.split(":");
if (parts.length == 2) {
extension.setGroupId(parts[0]);
extension.setArtifactId(parts[1]);
} else if (parts.length == 3) {
extension.setVersion(parts[2]);
}
return extension;
}
代码示例来源:origin: takari/polyglot-maven
public default Extension extension(String groupId, String artifactId, String version) {
Extension extension = new Extension();
extension.setGroupId(groupId);
extension.setArtifactId(artifactId);
extension.setVersion(version);
return extension;
}
代码示例来源:origin: takari/polyglot-maven
@Override
public Object construct(Node node) {
ScalarNode scalar = (ScalarNode) node;
Coordinate coord = Coordinate.createCoordinate(scalar.getValue());
return coord.mergeExtension(new Extension());
}
}
代码示例来源:origin: takari/polyglot-maven
public static Extension parse(final Object value) {
assert value != null;
if (value instanceof String) {
Extension node = new Extension();
String[] items = ((String) value).split(":");
switch (items.length) {
case 2:
node.setGroupId(items[0]);
node.setArtifactId(items[1]);
return node;
case 3:
node.setGroupId(items[0]);
node.setArtifactId(items[1]);
node.setVersion(items[2]);
return node;
}
}
return null;
}
}
代码示例来源:origin: takari/polyglot-maven
Extension extension = new Extension();
for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
代码示例来源:origin: io.takari.polyglot/polyglot-groovy
public Object newInstance(FactoryBuilderSupport builder, Object name, Object value, Map attrs) throws InstantiationException, IllegalAccessException {
Extension node;
if (value != null) {
node = parse(value);
if (node == null) {
throw new NodeValueParseException(this, value);
}
} else {
node = new Extension();
}
return node;
}
代码示例来源:origin: io.takari.polyglot/polyglot-yaml
@Override
public Object construct(Node node) {
ScalarNode scalar = (ScalarNode) node;
Coordinate coord = Coordinate.createCoordinate(scalar.getValue());
return coord.mergeExtension(new Extension());
}
}
代码示例来源:origin: io.takari.polyglot/polyglot-groovy
public static Extension parse(final Object value) {
assert value != null;
if (value instanceof String) {
Extension node = new Extension();
String[] items = ((String) value).split(":");
switch (items.length) {
case 2:
node.setGroupId(items[0]);
node.setArtifactId(items[1]);
return node;
case 3:
node.setGroupId(items[0]);
node.setArtifactId(items[1]);
node.setVersion(items[2]);
return node;
}
}
return null;
}
}
代码示例来源:origin: apache/maven-release
private List<Extension> createReleaseExtensions( ReleaseDescriptor releaseDescriptor,
MavenProject project )
throws ReleaseFailureException
{
List<Extension> releaseExtensions = null;
// Use original - don't want the lifecycle introduced ones
Build build = project.getOriginalModel().getBuild();
if ( build != null )
{
List<Extension> extensions = build.getExtensions();
if ( extensions != null )
{
releaseExtensions = new ArrayList<>();
for ( Extension extension : extensions )
{
String id = ArtifactUtils.versionlessKey( extension.getGroupId(), extension.getArtifactId() );
Artifact artifact = project.getExtensionArtifactMap().get( id );
String version = getReleaseVersion( releaseDescriptor, artifact );
Extension releaseExtension = new Extension();
releaseExtension.setGroupId( extension.getGroupId() );
releaseExtension.setArtifactId( extension.getArtifactId() );
releaseExtension.setVersion( version );
releaseExtensions.add( releaseExtension );
}
}
}
return releaseExtensions;
}
代码示例来源:origin: org.sonatype.maven.archetype/archetype-common
Extension extension = new Extension();
extension.setGroupId("org.sonatype.maven.archetype");
extension.setArtifactId("archetype-packaging");
代码示例来源:origin: apache/maven-archetype
Extension extension = new Extension();
extension.setGroupId( "org.apache.maven.archetype" );
extension.setArtifactId( "archetype-packaging" );
代码示例来源:origin: io.tesla.maven/maven-model
Extension extension = new Extension();
for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
代码示例来源:origin: io.fabric8.forge/devops
Extension extension = new Extension();
extension.setGroupId(EXTENSION_DAV_GROUP_ID);
extension.setArtifactId(EXTENSION_DAV_ARTIFACT_ID);
代码示例来源:origin: io.tesla.maven/maven-model
Extension extension = new Extension();
InputLocation _location;
_location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
内容来源于网络,如有侵权,请联系作者删除!