Package org.jboss.forge.addon.dependencies.builder

Examples of org.jboss.forge.addon.dependencies.builder.DependencyBuilder


   public List<Dependency> getDirectDependencies()
   {
      List<Dependency> dependencies = new ArrayList<Dependency>();
      for (org.apache.maven.model.Dependency pluginDependency : getDependencies())
      {
         DependencyBuilder builder = DependencyBuilder.create()
                  .setArtifactId(pluginDependency.getArtifactId())
                  .setGroupId(pluginDependency.getGroupId())
                  .setVersion(pluginDependency.getVersion())
                  .setPackaging(pluginDependency.getType())
                  .setScopeType(pluginDependency.getScope());
View Full Code Here


      List<Coordinate> result = new ArrayList<Coordinate>();
      Predicate<Dependency> filter = query.getDependencyFilter();
      for (Version v : r.getVersions())
      {
         CoordinateBuilder coord = CoordinateBuilder.create(query.getCoordinate()).setVersion(v.toString());
         DependencyBuilder versionedDep = DependencyBuilder.create().setCoordinate(coord);
         if (filter == null || filter.accept(versionedDep))
         {
            result.add(coord);
         }
      }
View Full Code Here

         int numberOfGavsFound = 0;
         int numberOfGavs = 0;
         for (Dependency gav : arguments.getValue())
         {
            numberOfGavs++;
            DependencyBuilder dep = DependencyBuilder.create(gav);
            if(effective.getValue()) {
               if(deps.hasEffectiveManagedDependency(gav)) {
                  numberOfGavsFound++;
               }
            } else {
View Full Code Here

         int numberOfGavsFound = 0;
         int numberOfGavs = 0;
         for (Dependency gav : arguments.getValue())
         {
            numberOfGavs++;
            DependencyBuilder dep = DependencyBuilder.create(gav);
            if(effective.getValue()) {
               if(deps.hasEffectiveDependency(gav)) {
                  numberOfGavsFound++;
               }
            } else {
View Full Code Here

      project.getFacet(FurnaceVersionFacet.class).setVersion(furnace.getVersion().toString());

      facetFactory.install(project, AddonTestFacet.class);
      for (AddonId addonId : addonDependencies.getValue())
      {
         DependencyBuilder dependency = DependencyBuilder.create(addonId.getName())
                  .setVersion(addonId.getVersion().toString()).setScopeType("test");
         if (!dependencyInstaller.isInstalled(project, dependency))
         {
            dependencyInstaller.install(project, dependency);
         }
View Full Code Here

   {
      if (addons != null)
         for (AddonId addon : addons)
         {
            String[] mavenCoords = addon.getName().split(":");
            DependencyBuilder dependency = DependencyBuilder.create().setGroupId(mavenCoords[0])
                     .setArtifactId(mavenCoords[1])
                     .setVersion(addon.getVersion().toString()).setClassifier(FORGE_ADDON_CLASSIFIER);
            if (managed)
            {
               dependencyInstaller.installManaged(project, dependency);
View Full Code Here

         int numberOfGavsFound = 0;
         int numberOfGavs = 0;
         for (Dependency gav : arguments.getValue())
         {
            numberOfGavs++;
            DependencyBuilder dep = DependencyBuilder.create(gav);
            if(effective.getValue()) {
               if(deps.hasEffectiveDependency(gav)) {
                  numberOfGavsFound++;
               }
            } else {
View Full Code Here

         int numberOfGavsFound = 0;
         int numberOfGavs = 0;
         for (Dependency gav : arguments.getValue())
         {
            numberOfGavs++;
            DependencyBuilder dep = DependencyBuilder.create(gav);
            if (effective.getValue())
            {
               if (deps.hasEffectiveManagedDependency(gav))
               {
                  numberOfGavsFound++;
View Full Code Here

  protected ProjectFactory getProjectFactory() {
    return projectFactory;
  }

  protected void addTestScopedDependency(final Project project, final DependencyArtifact artifact) {
    final DependencyBuilder depBuilder = DependencyBuilder.create(artifact.toString());
    final MavenDependencyFacet dependencyFacet = project.getFacet(MavenDependencyFacet.class);
    final VersionOracle versionOracle = new VersionOracle(dependencyFacet);
   
    if (!dependencyFacet.hasDirectDependency(depBuilder)) {
      if (!versionOracle.isManaged(depBuilder)) {
        depBuilder.setVersion(versionOracle.resolveVersion(GwtMockito));
      }
      dependencyFacet.addDirectDependency(depBuilder);
    }
  }
View Full Code Here

   @Override
   public Dependency resolveProperties(final Dependency dependency)
   {
      MavenFacet mvn = getFaceted().getFacet(MavenFacet.class);
      DependencyBuilder builder = DependencyBuilder.create(dependency);

      builder.setGroupId(mvn.resolveProperties(dependency.getCoordinate().getGroupId()));
      builder.setArtifactId(mvn.resolveProperties(dependency.getCoordinate().getArtifactId()));
      builder.setVersion(mvn.resolveProperties(dependency.getCoordinate().getVersion()));
      builder.setClassifier(mvn.resolveProperties(dependency.getCoordinate().getClassifier()));
      builder.setPackaging(mvn.resolveProperties(dependency.getCoordinate().getPackaging()));
      builder.setScopeType(mvn.resolveProperties(dependency.getScopeType()));

      return builder;
   }
View Full Code Here

TOP

Related Classes of org.jboss.forge.addon.dependencies.builder.DependencyBuilder

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.