Examples of Dependency


Examples of org.apache.geronimo.kernel.repository.Dependency

        ArrayList<Dependency> missingPrereqs = new ArrayList<Dependency>();
        for (PrerequisiteType prereq : prereqs) {
            Artifact artifact = toArtifact(prereq.getId());
            try {
                if (getServerInstance("default", servers).getArtifactResolver().queryArtifacts(artifact).length == 0) {
                    missingPrereqs.add(new Dependency(artifact, ImportType.ALL));
                }
            } catch (NoServerInstanceException e) {
                throw new RuntimeException("Invalid setup, no default server instance registered");
            }
        }
View Full Code Here

Examples of org.apache.geronimo.kernel.repository.Dependency

    private static Dependency[] getDependencies(Repository repo, Artifact artifact) {
        Set<Artifact> set = repo.getDependencies(artifact);
        Dependency[] results = new Dependency[set.size()];
        int index = 0;
        for (Artifact dep : set) {
            results[index] = new Dependency(dep, ImportType.CLASSES);
            ++index;
        }
        return results;
    }
View Full Code Here

Examples of org.apache.geronimo.kernel.repository.Dependency

    }
    private void toDependencies(List<String> artifacts, List<DependencyType> result) {
        result.clear();
        for (String artifact : artifacts) {
            //TODO this is wrong.... need to encode import type as well
            result.add(PluginInstallerGBean.toDependencyType(new Dependency(Artifact.create(artifact), ImportType.ALL), true));
        }
    }
View Full Code Here

Examples of org.apache.geronimo.kernel.repository.Dependency

        target.setName("Sample Application");
        target.setCategory("Samples");
        target.setDescription("A sample application");
        PluginArtifactType instance = new PluginArtifactType();
        target.getPluginArtifact().add(instance);
        instance.getDependency().add(PluginInstallerGBean.toDependencyType(new Dependency(Artifact.create(moduleIdName), ImportType.ALL), true));
        PluginListType list = new PluginListType();
        list.getPlugin().add(target);
//        list.getDefaultRepository().add(repo.toString());
        //todo this is surely wrong
        list.getDefaultRepository().add("http://www.ibiblio.org/maven2/");
View Full Code Here

Examples of org.apache.geronimo.kernel.repository.Dependency

        return false;
    }

    protected boolean matchesDefaultEnvironment(Environment environment) {
        for (Iterator iterator = defaultEnvironment.getDependencies().iterator(); iterator.hasNext();) {
            Dependency defaultDependency = (Dependency) iterator.next();
            boolean matches = false;
            for (Iterator iterator1 = environment.getDependencies().iterator(); iterator1.hasNext();) {
                Dependency actualDependency = (Dependency) iterator1.next();
                if (matches(defaultDependency, actualDependency)) {
                    matches = true;
                    break;
                }
            }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.hooks.LineageInfo.Dependency

      Operator<? extends Serializable> op = (Operator<? extends Serializable>)nd;
      Operator<? extends Serializable> inpOp = getParent(stack);

      // Create a single dependency list by concatenating the dependencies of all
      // the cols
      Dependency dep = new Dependency();
      DependencyType new_type = LineageInfo.DependencyType.SCRIPT;
      dep.setType(LineageInfo.DependencyType.SCRIPT);
      // TODO: Fix this to a non null value.
      dep.setExpr(null);

      LinkedHashSet<BaseColumnInfo> col_set = new LinkedHashSet<BaseColumnInfo>();
      for(ColumnInfo ci : inpOp.getSchema().getSignature()) {
        Dependency d = lCtx.getIndex().getDependency(inpOp, ci);
        if (d != null) {
          new_type = LineageCtx.getNewDependencyType(d.getType(), new_type);
          col_set.addAll(d.getBaseCols());
        }
      }

      dep.setType(new_type);
      dep.setBaseCols(new ArrayList<BaseColumnInfo>(col_set));
View Full Code Here

Examples of org.apache.karaf.features.Dependency

            }
        }

        private void addMissingDependenciesToRepo() {
            for (ListIterator<Dependency> iterator = missingDependencies.listIterator(); iterator.hasNext(); ) {
                Dependency dependency = iterator.next();
                Feature depFeature = lookupFeature(dependency);
                if (depFeature == null) {
                    continue;
                }
                localRepoFeatures.add(depFeature);
View Full Code Here

Examples of org.apache.karaf.features.internal.model.Dependency

                    Bundle bundle = objectFactory.createBundle();
                    bundle.setLocation(b.getLocation());
                    feature.getBundle().add(bundle);
                }
                for (Dependency d : f.getFeature()) {
                    Dependency dependency = objectFactory.createDependency();
                    dependency.setName(d.getName());
                    feature.getFeature().add(dependency);
                }
            }

            Collections.sort(feature.getBundle(), new Comparator<Bundle>() {

                public int compare(Bundle bundle, Bundle bundle1) {
                    return bundle.getLocation().compareTo(bundle1.getLocation());
                }
            });
            Collections.sort(feature.getFeature(), new Comparator<Dependency>() {
                public int compare(Dependency dependency, Dependency dependency1) {
                    return dependency.getName().compareTo(dependency1.getName());
                }
            });

            if (dependencyCache.exists()) {
                //filter dependencies file
View Full Code Here

Examples of org.apache.maven.archiva.model.Dependency

        Iterator it = depsParent.elementIterator( "dependency" );
        while ( it.hasNext() )
        {
            Element elemDependency = (Element) it.next();
            Dependency dependency = new Dependency();

            dependency.setGroupId( elemDependency.elementTextTrim( "groupId" ) );
            dependency.setArtifactId( elemDependency.elementTextTrim( "artifactId" ) );
            dependency.setVersion( elemDependency.elementTextTrim( "version" ) );

            dependency.setClassifier( StringUtils.defaultString( elemDependency.elementTextTrim( "classifier" ) ) );
            dependency.setType( StringUtils.defaultIfEmpty( elemDependency.elementTextTrim( "type" ), "jar" ) );
            dependency.setScope( StringUtils.defaultIfEmpty( elemDependency.elementTextTrim( "scope" ), "compile" ) );
            // Not for v4.0.0 -> dependency.setUrl( elemDependency.elementTextTrim("url") );
            dependency.setOptional( toBoolean( elemDependency.elementTextTrim( "optional" ), false ) );
            if ( DependencyScope.isSystemScoped( dependency ) )
            {
                dependency.setSystemPath( elemDependency.elementTextTrim( "systemPath" ) );
            }

            dependency.setExclusions( getExclusions( elemDependency ) );

            if ( dependencyList.contains( dependency ) )
            {
                // TODO: throw into monitor as issue.
            }
View Full Code Here

Examples of org.apache.maven.bootstrap.model.Dependency

        File bootDirectory = new File( dir, "boot" );
        bootDirectory.mkdir();

        for ( Iterator i = mavenCoreModel.getAllDependencies().iterator(); i.hasNext(); )
        {
            Dependency dep = (Dependency) i.next();

            File artifactFile = bootstrapper.getArtifactFile( dep );
            if ( dep.getArtifactId().equals( "classworlds" ) )
            {
                FileUtils.copyFileToDirectory( artifactFile, bootDirectory );
            }
            else
            {
                FileUtils.copyFileToDirectory( artifactFile, libDirectory );
            }
        }

        Dependency coreAsDep = new Dependency( mavenCoreModel.getGroupId(), mavenCoreModel.getArtifactId(),
                                               mavenCoreModel.getVersion(), mavenCoreModel.getPackaging(),
                                               Collections.EMPTY_LIST );

        FileUtils.copyFileToDirectory( bootstrapper.getArtifactFile( coreAsDep ), libDirectory );
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.