Examples of PackagingType


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

   @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).hasEffectiveDependency(dep)
               && PackagingType.JAR.equals(packagingType);
   }
View Full Code Here

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

         facet.setProject(project);

         try
         {
            installDependencies(facet, prompt);
            PackagingType type = updatePackaging(facet);

            if (!facet.isInstalled() || !project.hasFacet(facet.getClass()))
            {
               project.installFacet(facet);
            }
View Full Code Here

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

   private PackagingType updatePackaging(final Facet facet) throws Abort
   {
      List<PackagingType> types = ConstraintInspector.getCompatiblePackagingTypes(facet.getClass());
      String facetName = ConstraintInspector.getName(facet.getClass());

      PackagingType packaging = project.getFacet(PackagingFacet.class).getPackagingType();
      if (types.isEmpty() || types.contains(packaging))
      {
         return null;
      }
      else if (shell.promptBoolean("Facet ["
View Full Code Here

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();
         FileResource<?> configFile = getConfigFile(project, oldType);

         BeansDescriptor config = getConfig(project, configFile);
         saveConfig(project, config);
View Full Code Here

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

                           "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

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

      {
         // 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

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

                           "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

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

      {
         // 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

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

         facet.setProject(project);

         try
         {
            installDependencies(facet, prompt);
            PackagingType type = updatePackaging(facet);

            if (!facet.isInstalled() || !project.hasFacet(facet.getClass()))
            {
               project.installFacet(facet);
            }
View Full Code Here

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

   private PackagingType updatePackaging(final Facet facet) throws Abort
   {
      List<PackagingType> types = ConstraintInspector.getCompatiblePackagingTypes(facet.getClass());
      String facetName = ConstraintInspector.getName(facet.getClass());

      PackagingType packaging = project.getFacet(PackagingFacet.class).getPackagingType();
      if (types.isEmpty() || types.contains(packaging))
      {
         return null;
      }
      else if (shell.promptBoolean("Facet ["
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.