本文整理了Java中org.apache.maven.model.Model.addProperty()
方法的一些代码示例,展示了Model.addProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Model.addProperty()
方法的具体详情如下:
包路径:org.apache.maven.model.Model
类名称:Model
方法名:addProperty
[英]Method addProperty
[中]方法addProperty
代码示例来源:origin: apache/maven
model.addProperty( key, value );
代码示例来源:origin: takari/polyglot-maven
public void properties(PropertyFactory.Property... properties) {
asList(properties).forEach(prop -> {
model.addProperty(prop.getName(), prop.getValue());
});
}
代码示例来源:origin: apache/maven
_locations.setLocation( key, _location );
String value = parser.nextText().trim();
model.addProperty( key, value );
代码示例来源:origin: ru.yandex.qatools.clay/clay-maven-settings-builder
/**
* Method addProperty.
* @param key
* @param value
*/
public FluentModelBuilder withProperty(String key, String value) {
model.addProperty(key, value);
return this;
}
代码示例来源:origin: com.buschmais.jqassistant.plugin/jqassistant.plugin.m2repo
@Override
public void addProperty(String key, String value) {
delegate.addProperty(key, value);
}
代码示例来源:origin: jenkinsci/custom-war-packager
protected void addUTF8SourceEncodingProperty(Model target) {
target.addProperty("project.build.sourceEncoding", StandardCharsets.UTF_8.toString());
}
}
代码示例来源:origin: takari/polyglot-maven
model.addProperty( key, value );
代码示例来源:origin: org.codehaus.mevenide/nb-project
public void setValue(Boolean value) {
Profile prof = handle.getNetbeansPrivateProfile(false);
if (prof != null && prof.getProperties().getProperty(Constants.HINT_USE_EXTERNAL) != null) {
prof.getProperties().setProperty(Constants.HINT_USE_EXTERNAL, value == null ? "false" : value.toString());
handle.markAsModified(handle.getProfileModel());
return;
}
if (value == null || value.booleanValue() == false) {
Boolean proj = getProjectValue();
if (proj != null && proj.equals(Boolean.TRUE)) {
handle.getPOMModel().addProperty(Constants.HINT_USE_EXTERNAL, "false"); //NOI18N
} else {
handle.getPOMModel().getProperties().remove(Constants.HINT_USE_EXTERNAL);
}
} else {
handle.getPOMModel().addProperty(Constants.HINT_USE_EXTERNAL, "true"); //NOI18N
}
handle.markAsModified(handle.getPOMModel());
}
代码示例来源:origin: maven/maven-model
.trim()
model.addProperty( key, value );
代码示例来源:origin: maven/maven-model
.trim()
model.addProperty( key, value );
代码示例来源:origin: errai/errai
@Override
public boolean install() {
final MavenFacet coreFacet = getProject().getFacet(MavenFacet.class);
final Model pom = coreFacet.getModel();
Build build = pom.getBuild();
if (build == null) {
build = new Build();
pom.setBuild(build);
}
pom.addProperty(Property.JbossHome.getName(), JBOSS_HOME);
pom.addProperty(Property.DevContext.getName(), DEV_CONTEXT);
pom.addProperty(Property.ErraiVersion.getName(), getErraiVersion());
if (build.getOutputDirectory() == null)
build.setOutputDirectory("src/main/webapp/WEB-INF/classes");
Resource res = getResource(build.getSourceDirectory(), build.getResources());
if (res == null) {
res = new Resource();
res.setDirectory(build.getSourceDirectory());
}
if (build.getResources().size() < 2) {
res = getResource(DefaultValue.ResourceDirectory.getDefaultValue(), build.getResources());
if (res == null) {
res = new Resource();
res.setDirectory(DefaultValue.ResourceDirectory.getDefaultValue());
}
}
coreFacet.setModel(pom);
return true;
}
代码示例来源:origin: qoomon/maven-git-versioning-extension
virtualProjectModel.addProperty("project.commit", projectGitBasedVersion.getCommit());
virtualProjectModel.addProperty("project.tag", projectGitBasedVersion.getCommitRefType().equals("tag") ? projectGitBasedVersion.getCommitRefName() : "");
virtualProjectModel.addProperty("project.branch", projectGitBasedVersion.getCommitRefType().equals("branch") ? projectGitBasedVersion.getCommitRefName() : "");
代码示例来源:origin: maven/maven-model
.trim()
model.addProperty( key, value );
代码示例来源:origin: org.apache.maven.shared/maven-plugin-testing-tools
model.addProperty( INTEGRATION_TEST_DEPLOYMENT_REPO_URL, tmpUrl );
代码示例来源:origin: org.apache.maven.plugin-testing/maven-plugin-testing-tools
model.addProperty( INTEGRATION_TEST_DEPLOYMENT_REPO_URL, tmpUrl );
代码示例来源:origin: io.tesla.maven/maven-model
model.addProperty( key, value );
代码示例来源:origin: org.wso2.maven/org.wso2.maven.capp
protected void addMavenBundlePlugin(MavenProject artifactMavenProject,
Artifact artifact) throws FactoryConfigurationError {
artifactMavenProject.setPackaging(CAppMavenUtils.BUNDLE_PACKAGING_TYPE);
artifactMavenProject.getModel().addProperty(CAppUtils.PROPERTY_CAPP_TYPE, getArtifactType());
Plugin plugin = CAppMavenUtils.createPluginEntry(artifactMavenProject, "org.apache.felix", "maven-bundle-plugin", "2.3.4", true);
Xpp3Dom config=(Xpp3Dom)plugin.getConfiguration();
代码示例来源:origin: io.tesla.maven/maven-model
_locations.setLocation( key, _location );
String value = parser.nextText().trim();
model.addProperty( key, value );
代码示例来源:origin: org.wso2.maven/org.wso2.maven.capp
protected void addRestrictedMavenBundlePlugin(MavenProject artifactMavenProject,
Artifact artifact) throws FactoryConfigurationError {
artifactMavenProject.setPackaging(CAppMavenUtils.BUNDLE_PACKAGING_TYPE);
artifactMavenProject.getModel().addProperty(CAppUtils.PROPERTY_CAPP_TYPE, getArtifactType());
Plugin plugin = CAppMavenUtils.createPluginEntry(artifactMavenProject, "org.apache.felix", "maven-bundle-plugin", "2.3.4", true);
Xpp3Dom config=(Xpp3Dom)plugin.getConfiguration();
内容来源于网络,如有侵权,请联系作者删除!