Examples of MavenFacet


Examples of org.jboss.forge.addon.maven.projects.MavenFacet

   }

   @Override
   public String removeDirectProperty(final String name)
   {
      MavenFacet maven = getFaceted().getFacet(MavenFacet.class);
      Model pom = maven.getModel();

      Properties properties = pom.getProperties();
      String result = (String) properties.remove(name);
      maven.setModel(pom);
      return result;
   }
View Full Code Here

Examples of org.jboss.forge.addon.maven.projects.MavenFacet

   }

   @Override
   public DirectoryResource getResourceDirectory()
   {
      MavenFacet mavenFacet = getFaceted().getFacet(MavenFacet.class);
      Build build = mavenFacet.getModel().getBuild();
      final String resFolderName;
      if (build != null && !build.getResources().isEmpty() && build.getResources().get(0).getDirectory() != null)
      {
         resFolderName = build.getResources().get(0).getDirectory();
      }
View Full Code Here

Examples of org.jboss.forge.addon.maven.projects.MavenFacet

   }

   @Override
   public List<String> getModules()
   {
      MavenFacet facet = getFaceted().getFacet(MavenFacet.class);
      return facet.getModel().getModules();
   }
View Full Code Here

Examples of org.jboss.forge.maven.projects.MavenFacet

   @Override
   public DependencyRepository removeRepository(final String url)
   {
      if (url != null)
      {
         MavenFacet maven = getOrigin().getFacet(MavenFacet.class);
         Model pom = maven.getPOM();
         List<Repository> repos = pom.getRepositories();
         for (Repository repo : repos)
         {
            if (repo.getUrl().equals(url.trim()))
            {
               repos.remove(repo);
               maven.setPOM(pom);
               return new DependencyRepository(repo.getId(), repo.getUrl());
            }
         }
      }
      return null;
View Full Code Here

Examples of org.jboss.forge.maven.projects.MavenFacet

   }

   @Override
   public void setProjectName(final String name)
   {
      MavenFacet mvn = getOrigin().getFacet(MavenFacet.class);
      Model pom = mvn.getPOM();
      pom.setArtifactId(name);
      mvn.setPOM(pom);
   }
View Full Code Here

Examples of org.jboss.forge.maven.projects.MavenFacet

   }

   @Override
   public void setTopLevelPackage(final String groupId)
   {
      MavenFacet mvn = getOrigin().getFacet(MavenFacet.class);
      Model pom = mvn.getPOM();
      pom.setGroupId(groupId);
      mvn.setPOM(pom);
   }
View Full Code Here

Examples of org.jboss.forge.maven.projects.MavenFacet

   {
      String oldType = getPackagingType();

      if (!oldType.equals(type))
      {
         MavenFacet mavenFacet = getOrigin().getFacet(MavenFacet.class);
         Model pom = mavenFacet.getPOM();
         pom.setPackaging(type);
         mavenFacet.setPOM(pom);

         event.fire(new PackagingChanged(getOrigin(), oldType, type));
      }
   }
View Full Code Here

Examples of org.jboss.forge.maven.projects.MavenFacet

   }

   @Override
   public String getPackagingType()
   {
      MavenFacet mavenFacet = getOrigin().getFacet(MavenFacet.class);
      Model pom = mavenFacet.getPOM();
      return pom.getPackaging();
   }
View Full Code Here

Examples of org.jboss.forge.maven.projects.MavenFacet

   }

   @Override
   public String getFinalName()
   {
      MavenFacet mavenFacet = getOrigin().getFacet(MavenFacet.class);
      Model pom = mavenFacet.getPOM();
      return pom.getBuild().getFinalName();
   }
View Full Code Here

Examples of org.jboss.forge.maven.projects.MavenFacet

   }

   @Override
   public void setFinalName(final String finalName)
   {
      MavenFacet mavenFacet = getOrigin().getFacet(MavenFacet.class);
      Model pom = mavenFacet.getPOM();
      Build build = pom.getBuild();
      if (build == null)
      {
         build = new Build();
         pom.setBuild(build);
      }
      pom.getBuild().setFinalName(finalName);
      mavenFacet.setPOM(pom);
   }
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.