Map<String, Object> ruleMetaDataMap = rule.getMetaData(); activationList.add(new Activation(ruleName)); StringBuilder sb = new StringBuilder("Rule fired: " + ruleName);
public static Activation cloneActivation( Activation src ) { if ( src == null ) { return null; } Activation result = new Activation(); result.setActiveByDefault( src.isActiveByDefault() ); result.setFile( cloneActivationFile( src.getFile() ) ); result.setJdk( src.getJdk() ); result.setOs( cloneActivationOs( src.getOs() ) ); result.setProperty( cloneActivationProperty( src.getProperty() ) ); return result; }
Activation activation = new Activation(); for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
Activation activation = new Activation(); InputLocation _location; _location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
private Activation getActivation() { if (getProfile().getActivation() == null) { getProfile().setActivation(new Activation()); } return getProfile().getActivation(); }
Activation activation = new Activation();
org.apache.maven.model.Activation activation = new org.apache.maven.model.Activation();
Activation activation = new Activation(); for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
/** * Creates an Activation object that contains the ActivationOS information. * * @return a properly populated Activation object. */ private Activation createActivation() { Activation activation = new Activation(); activation.setActiveByDefault( false ); activation.setOs( createOsBean() ); return activation; }
/** * Creates an Activation object that contains the ActivationOS information. * * @return a properly populated Activation object. */ private Activation createActivation() { Activation activation = new Activation(); activation.setActiveByDefault( false ); activation.setOs( createOsBean() ); return activation; }
/** * @return A map of the profile activations that were replaced. */ private Map<String, Activation> setBlacklistProfilesToInactive(final Model pom) { final Map<String, Activation> profileActivationMap = new HashMap<String, Activation>(pom.getProfiles().size()); final Activation inactive = new Activation(); inactive.setActiveByDefault(false); for (final Profile profile : pom.getProfiles()) { if (ArtifactVault.getBlacklistProfiles().contains(profile.getId())) { profileActivationMap.put(profile.getId(), profile.getActivation()); profile.setActivation(inactive); } } return profileActivationMap; }
final Activation replacement = new Activation(); final ActivationProperty replacementProp = new ActivationProperty(); replacementProp.setName( "!disableProfileActivation" );
public ProfileAdapter(final org.apache.maven.settings.Profile profile) { setId(profile.getId()); Activation activation = new Activation(); setActivation(activation); for (org.apache.maven.settings.Repository repository : profile.getRepositories()) { Repository mavenRepository = new Repository(); mavenRepository.setId(repository.getId()); mavenRepository.setUrl(repository.getUrl()); getRepositories().add(mavenRepository); } setProperties(profile.getProperties()); }
public ProfileAdapter(final Profile profile) { setId(profile.getId()); Activation activation = new Activation(); activation.setActiveByDefault(profile.isActiveByDefault()); setActivation(activation); for (Dependency dependency : profile.listDependencies()) { getDependencies().add(new MavenDependencyAdapter(dependency)); } for (DependencyRepository repository : profile.listRepositories()) { Repository mavenRepository = new Repository(); mavenRepository.setId(repository.getId()); mavenRepository.setUrl(repository.getUrl()); getRepositories().add(mavenRepository); } setProperties(profile.getProperties()); }
private static Activation asActivation(org.apache.maven.settings.Activation activation) { Activation mavenActivation = new Activation(); if (activation != null) { mavenActivation.setActiveByDefault(activation.isActiveByDefault()); mavenActivation.setJdk(activation.getJdk()); if (activation.getFile() != null) { mavenActivation.setFile(asActivationFile(activation.getFile())); } if (activation.getOs() != null) { mavenActivation.setOs(asActivationOS(activation.getOs())); } if (activation.getProperty() != null) { mavenActivation.setProperty(asActivationProperty(activation.getProperty())); } } return mavenActivation; }
private static Activation asActivation(org.apache.maven.settings.Activation activation) { Activation mavenActivation = new Activation(); if (activation != null) { mavenActivation.setActiveByDefault(activation.isActiveByDefault()); mavenActivation.setJdk(activation.getJdk()); if (activation.getFile() != null) { mavenActivation.setFile(asActivationFile(activation.getFile())); } if (activation.getOs() != null) { mavenActivation.setOs(asActivationOS(activation.getOs())); } if (activation.getProperty() != null) { mavenActivation.setProperty(asActivationProperty(activation.getProperty())); } } return mavenActivation; }
@Override public boolean install() { if (super.install()) { // Set main profile to be active by default final MavenFacet coreFacet = getProject().getFacet(MavenFacet.class); final Model pom = coreFacet.getModel(); Profile profile = MavenModelUtil.getProfileById(MAIN_PROFILE, pom.getProfiles()); if (profile == null) { profile = new Profile(); profile.setId(MAIN_PROFILE); pom.addProfile(profile); } if (profile.getActivation() == null) profile.setActivation(new Activation()); profile.getActivation().setActiveByDefault(true); coreFacet.setModel(pom); return true; } else { return false; } } }
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; }
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; }
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; }