Examples of Artifact


Examples of org.apache.maven.artifact.Artifact

        final ArrayList<File> dependencies = new ArrayList<File>();

        @SuppressWarnings("unchecked")
        final Iterator<Artifact> it = project.getArtifacts().iterator();
        while ( it.hasNext() ) {
            final Artifact declared = it.next();
            this.log.debug( "Checking artifact " + declared );
            if ( this.isJavaArtifact( declared ) ) {
                if ( Artifact.SCOPE_COMPILE.equals( declared.getScope() )
                    || Artifact.SCOPE_RUNTIME.equals( declared.getScope() )
                    || Artifact.SCOPE_PROVIDED.equals( declared.getScope() )
                    || Artifact.SCOPE_SYSTEM.equals( declared.getScope() ) ) {
                    this.log.debug( "Resolving artifact " + declared );
                    if ( declared.getFile() != null ) {
                        dependencies.add( declared.getFile() );
                    } else {
                        this.log.debug( "Unable to resolve artifact " + declared );
                    }
                } else {
                    this.log.debug( "Artifact " + declared + " has not scope compile or runtime, but "
                        + declared.getScope() );
                }
            } else {
                this.log.debug( "Artifact " + declared + " is not a java artifact, type is " + declared.getType() );
            }
        }

        return dependencies;
    }
View Full Code Here

Examples of org.apache.maven.artifact.Artifact

            throw new MojoFailureException(
                    "Unable to add target directory to classloader.");
        }

        for (final Iterator<Artifact> ai = artifacts.iterator(); ai.hasNext();) {
            final Artifact a = ai.next();
            assertMinScrAnnotationArtifactVersion(a);
            try {
                path.add(a.getFile().toURI().toURL());
            } catch (IOException ioe) {
                throw new MojoFailureException(
                        "Unable to get compile class loader.");
            }
        }
View Full Code Here

Examples of org.apache.maven.repository.Artifact

    public void setArtifacts(List artifacts) {
        this.artifacts = artifacts;
        TreeMap tree = new TreeMap();
        for (Iterator iterator = artifacts.iterator(); iterator.hasNext();) {
            Artifact artifact = (Artifact) iterator.next();
            Dependency dependency = artifact.getDependency();
            if (dependency.getProperty(PACKAGING_CONFIG_PROPERTY) != null) {
                String orderString = dependency.getProperty(PACKAGING_CONFIG_PROPERTY);
                try {
                    Integer order = Integer.decode(orderString);
                    String artifactString = dependency.getGroupId() + "/" + dependency.getArtifactId() + "/" + dependency.getVersion() + "/" + dependency.getType();
View Full Code Here

Examples of org.apache.sling.provisioning.model.Artifact

                                             artifactUrl = line.substring(0, startPos).trim();
                                             parameters = parseParameters(line.substring(startPos + 1, line.length() - 1).trim(), null);
                                         }
                                     }
                                     try {
                                         final Artifact artifact = Artifact.fromMvnUrl("mvn:" + artifactUrl);
                                         this.init(artifact);
                                         this.artifactGroup.add(artifact);
                                         artifact.getMetadata().putAll(parameters);
                                     } catch ( final IllegalArgumentException iae) {
                                         throw new IOException(exceptionPrefix + iae.getMessage() + " in line " + this.lineNumberReader.getLineNumber(), iae);
                                     }
                                     break;
                    case CONFIGURATIONS : String configId = line;
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.Artifact

     * Return an artifact builder.
     */
    static Builder<Artifact> artifact(final String uri, final Object model) {
        return new Builder<Artifact>() {
            public Artifact build(final Context ec) {
                final Artifact a = ec.cf.createArtifact();
                a.setURI(uri);
                a.setModel(model);
                return a;
            }
        };
    }
View Full Code Here

Examples of org.apache.tuscany.spi.services.artifact.Artifact

        URLClassLoader urlc = new URLClassLoader(new URL[] {warUrl});
       
        URL repoUrl = urlc.getResource("WEB-INF/tuscany/");
        WarRepositoryHelper warRepositoryHelper = new WarRepositoryHelper(repoUrl);
       
        Artifact artifact = new Artifact();
        artifact.setGroup("commons-httpclient");
        artifact.setName("commons-httpclient");
        artifact.setVersion("3.0");
       
        warRepositoryHelper.resolveTransitively(artifact);
        assertEquals(4, artifact.getUrls().size());
       
    }
View Full Code Here

Examples of org.dru.clay.respository.artifact.Artifact

      final ConfigurationContext context = resolveQueue.poll();
      final Dependency dependency = context.getDependency();
      final Group group = dependency.getGroup();
      final UnresolvedArtifact unresolved = dependency.getArtifact();

      final Artifact resolveArtifact = repository.lookup(transport, group, unresolved);

      logger.info("Resolved %s -> %s", unresolved, resolveArtifact);

      // TODO: Handle version conflicts
      if (visitedArtifacts.contains(resolveArtifact)) {
View Full Code Here

Examples of org.eclipse.aether.artifact.Artifact

    if (pkg.isPresent()) {
      return pkg;
    }
    try {

      Artifact latestArtifact = resolveLatestArtifact(name);

      if (latestArtifact == null) {
        return Optional.absent();
      }
View Full Code Here

Examples of org.eclipse.bpmn2.Artifact

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.ARTIFACT: {
            Artifact artifact = (Artifact) theEObject;
            T result = caseArtifact(artifact);
            if (result == null)
                result = caseBaseElement(artifact);
            if (result == null)
                result = defaultCase(theEObject);
View Full Code Here

Examples of org.eclipse.uml2.uml.Artifact

    for (ExecutionPath path : executionPaths) {
      for (Action action : path.getPath()) {
        try {
          ActionDecorator actionDec = (ActionDecorator) decFactory.getDecorator(action);
         
          Artifact artifact = actionDec.getImplementingArtifact();
          if (artifact != null) {
            deploymentArtifacts.add(artifact);
            ArtifactDecorator artifactDec = (ArtifactDecorator) decFactory.getDecorator(artifact);
            deploymentDevices.add(artifactDec.getDeploymentDevice());
          }
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.