本文整理汇总了Java中org.apache.maven.model.ActivationFile类的典型用法代码示例。如果您正苦于以下问题:Java ActivationFile类的具体用法?Java ActivationFile怎么用?Java ActivationFile使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ActivationFile类属于org.apache.maven.model包,在下文中一共展示了ActivationFile类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeActivation
import org.apache.maven.model.ActivationFile; //导入依赖的package包/类
private void writeActivation(Activation activation, String tagName, XmlSerializer serializer)
throws java.io.IOException {
serializer.startTag(NAMESPACE, tagName);
flush(serializer);
StringBuffer b = b(serializer);
int start = b.length();
if (activation.isActiveByDefault() != false) {
writeValue(serializer, "activeByDefault", String.valueOf(activation.isActiveByDefault()), activation);
}
if (activation.getJdk() != null) {
writeValue(serializer, "jdk", activation.getJdk(), activation);
}
if (activation.getOs() != null) {
writeActivationOS((ActivationOS) activation.getOs(), "os", serializer);
}
if (activation.getProperty() != null) {
writeActivationProperty((ActivationProperty) activation.getProperty(), "property", serializer);
}
if (activation.getFile() != null) {
writeActivationFile((ActivationFile) activation.getFile(), "file", serializer);
}
serializer.endTag(NAMESPACE, tagName).flush();
logLocation(activation, "", start, b.length());
}
示例2: visitProfileActivation
import org.apache.maven.model.ActivationFile; //导入依赖的package包/类
private void visitProfileActivation( ModelVisitor visitor, Activation activation )
{
ActivationOS os = activation.getOs();
if ( os != null )
{
visitor.visitProfileActivationO( os );
os = visitor.replaceProfileActivationO( os );
activation.setOs( os );
}
ActivationProperty property = activation.getProperty();
if ( property != null )
{
visitor.visitProfileActivationProperty( property );
property = visitor.replaceProfileActivationProperty( property );
activation.setProperty( property );
}
ActivationFile file = activation.getFile();
if ( file != null )
{
visitor.visitProfileActivationFile( file );
file = visitor.replaceProfileActivationFile( file );
activation.setFile( file );
}
}
示例3: writeActivationFile
import org.apache.maven.model.ActivationFile; //导入依赖的package包/类
private void writeActivationFile(ActivationFile activationFile, String tagName, XmlSerializer serializer)
throws java.io.IOException {
serializer.startTag(NAMESPACE, tagName);
flush(serializer);
StringBuffer b = b(serializer);
int start = b.length();
if (activationFile.getMissing() != null) {
writeValue(serializer, "missing", activationFile.getMissing(), activationFile);
}
if (activationFile.getExists() != null) {
writeValue(serializer, "exists", activationFile.getExists(), activationFile);
}
serializer.endTag(NAMESPACE, tagName).flush();
logLocation(activationFile, "", start, b.length());
}
示例4: updateActivationFile
import org.apache.maven.model.ActivationFile; //导入依赖的package包/类
/**
* Method updateActivationFile
*
* @param value
* @param element
* @param counter
* @param xmlTag
*/
protected void updateActivationFile( ActivationFile value, String xmlTag, Counter counter, Element element )
{
boolean shouldExist = value != null;
Element root = updateElement( counter, element, xmlTag, shouldExist );
if ( shouldExist )
{
Counter innerCount = new Counter( counter.getDepth() + 1 );
findAndReplaceSimpleElement( innerCount, root, "missing", value.getMissing(), null );
findAndReplaceSimpleElement( innerCount, root, "exists", value.getExists(), null );
}
}
示例5: createModelActivation
import org.apache.maven.model.ActivationFile; //导入依赖的package包/类
private org.apache.maven.model.Activation createModelActivation(
Activation activation) {
org.apache.maven.model.Activation modelActivation = new org.apache.maven.model.Activation();
modelActivation.setActiveByDefault(activation.isActiveByDefault());
if (activation.getFile() != null) {
ActivationFile activationFile = new ActivationFile();
activationFile.setExists(activation.getFile().getExists());
activationFile.setMissing(activation.getFile().getMissing());
modelActivation.setFile(activationFile);
}
modelActivation.setJdk(activation.getJdk());
if (activation.getOs() != null) {
ActivationOS os = new ActivationOS();
os.setArch(activation.getOs().getArch());
os.setFamily(activation.getOs().getFamily());
os.setName(activation.getOs().getName());
os.setVersion(activation.getOs().getVersion());
modelActivation.setOs(os);
}
if (activation.getProperty() != null) {
ActivationProperty property = new ActivationProperty();
property.setName(activation.getProperty().getName());
property.setValue(activation.getProperty().getValue());
modelActivation.setProperty(property);
}
return modelActivation;
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:28,代码来源:MavenSettings.java
示例6: convertToMavenActivationFile
import org.apache.maven.model.ActivationFile; //导入依赖的package包/类
private static ActivationFile convertToMavenActivationFile(MavenActivationFile file) {
if (file != null) {
ActivationFile result = new ActivationFile();
result.setExists(file.getExist());
result.setMissing(file.getMissing());
return result;
}
return null;
}
示例7: replaceProfileActivationFile
import org.apache.maven.model.ActivationFile; //导入依赖的package包/类
@Override
public ActivationFile replaceProfileActivationFile( ActivationFile file )
{
return file;
}
示例8: visitProfileActivationFile
import org.apache.maven.model.ActivationFile; //导入依赖的package包/类
@Override
public void visitProfileActivationFile( ActivationFile file )
{
}
示例9: convertFileActivation
import org.apache.maven.model.ActivationFile; //导入依赖的package包/类
private static MavenActivationFile convertFileActivation(ActivationFile file) {
if (file == null) {
return null;
}
return new MavenActivationFile(file.getExists(), file.getMissing());
}
示例10: convertToSettingsProfile
import org.apache.maven.model.ActivationFile; //导入依赖的package包/类
/**
* @param settingsProfile
* @return a profile
*/
public static Profile convertToSettingsProfile( org.apache.maven.model.Profile modelProfile )
{
Profile profile = new Profile();
profile.setId( modelProfile.getId() );
org.apache.maven.model.Activation modelActivation = modelProfile.getActivation();
if ( modelActivation != null )
{
Activation activation = new Activation();
activation.setActiveByDefault( modelActivation.isActiveByDefault() );
activation.setJdk( modelActivation.getJdk() );
org.apache.maven.model.ActivationProperty modelProp = modelActivation.getProperty();
if ( modelProp != null )
{
ActivationProperty prop = new ActivationProperty();
prop.setName( modelProp.getName() );
prop.setValue( modelProp.getValue() );
activation.setProperty( prop );
}
org.apache.maven.model.ActivationOS modelOs = modelActivation.getOs();
if ( modelOs != null )
{
ActivationOS os = new ActivationOS();
os.setArch( modelOs.getArch() );
os.setFamily( modelOs.getFamily() );
os.setName( modelOs.getName() );
os.setVersion( modelOs.getVersion() );
activation.setOs( os );
}
ActivationFile modelFile = modelActivation.getFile();
if ( modelFile != null )
{
org.apache.maven.settings.ActivationFile file = new org.apache.maven.settings.ActivationFile();
file.setExists( modelFile.getExists() );
file.setMissing( modelFile.getMissing() );
activation.setFile( file );
}
profile.setActivation( activation );
}
profile.setProperties( modelProfile.getProperties() );
List<org.apache.maven.model.Repository> repos = modelProfile.getRepositories();
if ( repos != null )
{
for ( org.apache.maven.model.Repository repo : repos )
{
profile.addRepository( convertToSettingsRepository( repo ) );
}
}
List<org.apache.maven.model.Repository> pluginRepos = modelProfile.getPluginRepositories();
if ( pluginRepos != null )
{
for ( org.apache.maven.model.Repository pluginRepo : pluginRepos )
{
profile.addPluginRepository( convertToSettingsRepository( pluginRepo ) );
}
}
return profile;
}
示例11: replaceProfileActivationFile
import org.apache.maven.model.ActivationFile; //导入依赖的package包/类
ActivationFile replaceProfileActivationFile( ActivationFile file );
示例12: visitProfileActivationFile
import org.apache.maven.model.ActivationFile; //导入依赖的package包/类
void visitProfileActivationFile( ActivationFile file );