Examples of PackagingType


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

   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

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

            }
         }
         if (split.length > 4)
         {
            String trimmed = split[4].trim();
            PackagingType packaging = PackagingType.from(trimmed);
            if (PackagingType.OTHER.equals(packaging))
            {
               dependencyBuilder.setPackagingType(trimmed == null ? null : trimmed);
            }
            else
View Full Code Here

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

   @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

Examples of org.jboss.metadata.ejb.jboss.jndipolicy.spi.PackagingType

       * Determine the packaging type (JAR or EAR, Standalone File not
       * supported by this deployer)
       */
     
      // Initialize to JAR
      PackagingType packagingType = PackagingType.JAR;
     
      // Determine if EAR
      boolean isEar = unit != unit.getTopLevel();
      if(isEar)
      {
View Full Code Here

Examples of org.jboss.metadata.ejb.jboss.jndipolicy.spi.PackagingType

         baseName.append(summary.getBeanMD().getEjbName());
      }
     
      // Determine if packaged in an EAR
      boolean isEar = false;
      PackagingType packagingType = summary.getPackagingType();
      if (packagingType != null)
      {
         isEar = packagingType.equals(PackagingType.EAR);
      }

      // Prepend the deployment scope base name, if defined for an EAR
      String deploymentScopeBaseName = summary.getDeploymentScopeBaseName();
      if (isEar && deploymentScopeBaseName != null && deploymentScopeBaseName.trim().length() > 0)
View Full Code Here

Examples of org.jboss.shrinkwrap.resolver.api.maven.PackagingType

    public static String toCanonicalForm(final Artifact artifact) {
        final StringBuilder sb = new StringBuilder();
        sb.append(artifact.getGroupId()).append(":");
        sb.append(artifact.getArtifactId()).append(":");

        final PackagingType packaging = PackagingType
                .of(artifact.getProperty(ArtifactProperties.TYPE, artifact.getExtension()));
        final String classifier = artifact.getClassifier().length() == 0 ? packaging.getClassifier() : artifact.getClassifier();

        sb.append(packaging.getId()).append(":");
        if (classifier.length() != 0) {
            sb.append(classifier).append(":");
        }
        sb.append(artifact.getVersion());
View Full Code Here

Examples of org.jboss.shrinkwrap.resolver.api.maven.PackagingType

    }

    public static MavenDependency fromDependency(final Dependency dependency) {
        final Artifact artifact = dependency.getArtifact();

        final PackagingType packaging = PackagingType
                .of(artifact.getProperty(ArtifactProperties.TYPE, artifact.getExtension()));
        final String classifier = artifact.getClassifier().length() == 0 ? packaging.getClassifier() : artifact.getClassifier();

        final MavenCoordinate coordinate = MavenCoordinates.createCoordinate(artifact.getGroupId(),
                artifact.getArtifactId(), artifact.getVersion(), packaging, classifier);

        // SHRINKRES-143 lets ignore invalid scope
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.