Package org.apache.maven.model

Examples of org.apache.maven.model.Model.addProfile()


      plugin.addExecution(execution);

      build.addPlugin(plugin);
      profile.setBuild(build);
      Model pom = mvn.getPOM();
      pom.addProfile(profile);
      mvn.setPOM(pom);
   }

   @Override
   public JavaClass from(final Project project, final Class<?> clazz)
View Full Code Here


      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);
View Full Code Here

    Profile profile = MavenModelUtil.getProfileById(name, pom.getProfiles());

    if (profile == null) {
      profile = new Profile();
      profile.setId(name);
      pom.addProfile(profile);
    }

    for (DependencyBuilder dep : deps) {
      if (!hasDependency(profile, dep)) {
        if (!versionOracle.isManaged(dep)) {
View Full Code Here

    Profile profile = MavenModelUtil.getProfileById(name, pom.getProfiles());

    if (profile == null) {
      profile = new Profile();
      profile.setId(name);
      pom.addProfile(profile);
    }

    for (DependencyBuilder dep : deps) {
      if (!hasDependency(profile, dep)) {
        if (!versionFacet.isManaged(dep)) {
View Full Code Here

      {
         // preserve existing id
         profile.setId(existingProfile.getId());
         pom.removeProfile(existingProfile);
      }
      pom.addProfile(profile);

      facet.setPOM(pom);
   }

   private Object buildConfiguration(String profileId) {
View Full Code Here

      }

      build.addPlugin(new MavenPluginAdapter(pluginBuilder));
      containerProfile.setBuild(build);
      pom.removeProfile(containerProfile);
      pom.addProfile(containerProfile);

      mavenCoreFacet.setPOM(pom);

   }
View Full Code Here

      plugin.addExecution(execution);

      build.addPlugin(plugin);
      profile.setBuild(build);
      Model pom = mvn.getPOM();
      pom.addProfile(profile);
      mvn.setPOM(pom);
   }

   @Override
   public JavaClass from(final Project project, final Class<?> clazz)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.