Package org.jboss.forge.project.packaging

Examples of org.jboss.forge.project.packaging.PackagingType


   public void updateConfigLocation(@Observes final PackagingChanged event)
   {
      Project project = event.getProject();
      if (project.hasFacet(CDIFacetImpl.class))
      {
         PackagingType oldType = event.getOldPackagingType();
         PackagingType newType = event.getNewPackagingType();
         shell.printlnVerbose("Packaging type change detected; moving beans.xml " +
                  "from [" + oldType + "] to [" + newType + "]");

         // FIXME this is broken...
         FileResource<?> configFile = getConfigFile(project, oldType);
View Full Code Here


   @Override
   public boolean install()
   {
      if (!isInstalled())
      {
         PackagingType type = project.getFacet(PackagingFacet.class).getPackagingType();
         if (!PackagingType.JAR.equals(type) && !PackagingType.WAR.equals(type))
         {
            printPackTypeWarning(project, type);
         }
View Full Code Here

   @Override
   public boolean isInstalled()
   {
      Dependency dep = DependencyBuilder.create("org.jboss.forge:forge-shell-api");
      PackagingType packagingType = project.getFacet(PackagingFacet.class).getPackagingType();
      return project.getFacet(DependencyFacet.class).hasDependency(dep)
               && PackagingType.JAR.equals(packagingType);
   }
View Full Code Here

   @Override
   public boolean isInstalled()
   {
      MavenCoreFacet mavenFacet = project.getFacet(MavenCoreFacet.class);
      PackagingType packagingType = project.getFacet(PackagingFacet.class).getPackagingType();

      return getWebRootDirectory().exists() && mavenFacet.isInstalled()
               && packagingType.equals(PackagingType.WAR);
   }
View Full Code Here

   private ForgeEnvironment environment;

   @Override
   public void setPackagingType(final PackagingType type)
   {
      PackagingType oldType = getPackagingType();

      if (!oldType.equals(type))
      {
         MavenCoreFacet mavenFacet = project.getFacet(MavenCoreFacet.class);
         Model pom = mavenFacet.getPOM();
         pom.setPackaging(type.getType());
         mavenFacet.setPOM(pom);
View Full Code Here

                           "Perhaps you should open a project or create a new one?");
      }
      else if (currentProject != null)
      {
         List<PackagingType> compatiblePackagingTypes = ConstraintInspector.getCompatiblePackagingTypes(type);
         PackagingType currentPackagingType = currentProject.getFacet(PackagingFacet.class).getPackagingType();
         if (!compatiblePackagingTypes.isEmpty()
                  && !compatiblePackagingTypes.contains(currentPackagingType))
         {
            throw new UnsatisfiedPackagingTypeException("Oops! The command [" + command.getName()
                     + "] requires one of the following packaging types " + compatiblePackagingTypes
View Full Code Here

      {
         // check to make sure that the project packaging type is appropriate
         List<PackagingType> compatiblePackagingTypes = ConstraintInspector.getCompatiblePackagingTypes(type);
         if (!compatiblePackagingTypes.isEmpty())
         {
            PackagingType currentPackagingType = currentProject.getFacet(PackagingFacet.class).getPackagingType();
            if (!compatiblePackagingTypes.contains(currentPackagingType))
            {
               throw new UnsatisfiedPackagingTypeException("Oops! The [" + plugin.getName()
                        + "] plugin requires one of the following packaging types " + compatiblePackagingTypes
                        + ", but the current packaging type is [" + currentPackagingType + "]");
View Full Code Here

   @Override
   public boolean isInstalled()
   {
      MavenCoreFacet mavenFacet = project.getFacet(MavenCoreFacet.class);
      PackagingType packagingType = project.getFacet(PackagingFacet.class).getPackagingType();

      return mavenFacet.isInstalled()
               && packagingType.equals(PackagingType.WAR);
   }
View Full Code Here

   private ForgeEnvironment environment;

   @Override
   public void setPackagingType(final PackagingType type)
   {
      PackagingType oldType = getPackagingType();

      if (!oldType.equals(type))
      {
         MavenCoreFacet mavenFacet = project.getFacet(MavenCoreFacet.class);
         Model pom = mavenFacet.getPOM();
         pom.setPackaging(type.getType());
         mavenFacet.setPOM(pom);
View Full Code Here

   public void updateConfigLocation(@Observes final PackagingChanged event)
   {
      Project project = event.getProject();
      if (project.hasFacet(CDIFacetImpl.class))
      {
         PackagingType oldType = event.getOldPackagingType();
         PackagingType newType = event.getNewPackagingType();
         shell.printlnVerbose("Packaging type change detected; moving beans.xml " +
                  "from [" + oldType + "] to [" + newType + "]");

         // FIXME this is broken...
         FileResource<?> configFile = getConfigFile(project, oldType);
View Full Code Here

TOP

Related Classes of org.jboss.forge.project.packaging.PackagingType

Copyright © 2018 www.massapicom. 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.