Examples of Artifact


Examples of org.jfrog.build.api.Artifact

        File artifactFile = new File(file);
        Map<String, String> checksums = calculateFileChecksum(artifactFile);
        String md5 = checksums.get(MD5);
        String sha1 = checksums.get(SHA1);
        artifactBuilder.md5(md5).sha1(sha1);
        Artifact artifact = artifactBuilder.build();
        if (excludeArtifactsFromBuild && PatternMatcher.pathConflicts(fullPath, patterns)) {
            module.getExcludedArtifacts().add(artifact);
        } else {
            module.getArtifacts().add(artifact);
        }
View Full Code Here

Examples of org.mevenide.idea.repository.Artifact

        //
        //iterate the pom dependencies and collect the artifacts that go in the classpath
        //ignoring everything that has a type that differs from "jar" (empty type is
        //ok, since the default is "jar")
        //
        final Artifact fullArtifact = pArtifact.getCompleteArtifact();
        for (int row = 0; row < deps.getRowCount(); row++) {
            final Artifact artifact = new Artifact();
            artifact.setGroupId(deps.getGroupId(row));
            artifact.setArtifactId(deps.getArtifactId(row));
            artifact.setType(deps.getType(row));
            artifact.setVersion(deps.getVersion(row));
            artifact.setExtension(deps.getExtension(row));
            if (artifact.getCompleteArtifact().equals(fullArtifact))
                return true;
        }

        //
        //if the pom extends another pom, aggregate it as well
View Full Code Here

Examples of org.mevenide.idea.repository.Artifact

        for (int row = 0; row < deps.getRowCount(); row++) {
            final String type = deps.getType(row);
            if (type != null && !"jar".equalsIgnoreCase(type))
                continue;

            final Artifact artifact = new Artifact();
            artifact.setGroupId(deps.getGroupId(row));
            artifact.setArtifactId(deps.getArtifactId(row));
            artifact.setType(type);
            artifact.setVersion(deps.getVersion(row));
            artifact.setExtension(deps.getExtension(row));
            artifacts.add(artifact);
        }

        //
        //if the pom extends another pom, aggregate it as well
View Full Code Here

Examples of org.mevenide.idea.repository.Artifact

            //
            //if a library with the name of the dependency already exists,
            //use it. Otherwise, create a new one
            //
            final Artifact artifact = problem.getArtifact();
            Library lib = IDEUtils.findLibrary(project, artifact);
            if (lib == null)
                lib = libTable.createLibrary(artifact.toString());

            //
            //get the library's modifiable model
            //
            final Library.ModifiableModel model = lib.getModifiableModel();
View Full Code Here

Examples of org.mevenide.idea.repository.Artifact

    public PsiProject getParent() {
        return project;
    }

    public Artifact getArtifact(int pRow) {
        final Artifact artifact = new Artifact();
        artifact.setGroupId(getGroupId(pRow));
        artifact.setArtifactId(getArtifactId(pRow));
        artifact.setType(getType(pRow));
        artifact.setVersion(getVersion(pRow));
        artifact.setExtension(getExtension(pRow));
        return artifact;
    }
View Full Code Here

Examples of org.mevenide.idea.repository.Artifact

        artifact.setExtension(getExtension(pRow));
        return artifact;
    }

    public int findRow(final Artifact pArtifact) {
        final Artifact artifact = pArtifact.getCompleteArtifact();
        for (int row = 0; row < getRowCount(); row++) {
            if (!artifact.getGroupId().equals(getGroupId(row)))
                continue;

            if (!artifact.getArtifactId().equals(getArtifactId(row)))
                continue;

            String type = getType(row);
            if (type == null || type.trim().length() == 0) type = "jar";
            if (!artifact.getType().equals(type))
                continue;

            String version = getVersion(row);
            if (version == null || version.trim().length() == 0) version = "SNAPSHOT";
            if (!artifact.getVersion().equalsIgnoreCase(version))
                continue;

            String extension = getExtension(row);
            if (extension == null || extension.trim().length() == 0)
                extension = type;
            if (!artifact.getExtension().equalsIgnoreCase(extension))
                continue;

            return row;
        }
View Full Code Here

Examples of org.mule.module.launcher.artifact.Artifact

        @Override
        public void propertyChange(PropertyChangeEvent event)
        {
            if (event instanceof ElementAddedEvent)
            {
                Artifact artifactAdded = (T) event.getNewValue();
                artifactConfigResourcesTimestaps.put(artifactAdded.getArtifactName(), new ArtifactResourcesTimestamp<T>(artifactAdded));
            }
            else if (event instanceof ElementRemovedEvent)
            {
                Artifact artifactRemoved = (T) event.getNewValue();
                artifactConfigResourcesTimestaps.remove(artifactRemoved.getArtifactName());
            }
        }
View Full Code Here

Examples of org.opensaml.saml2.core.Artifact

*/
public class ArtifactUnmarshaller extends AbstractSAMLObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processElementContent(XMLObject samlObject, String elementContent) {
        Artifact artifact = (Artifact) samlObject;

        artifact.setArtifact(elementContent);
    }
View Full Code Here

Examples of org.rioproject.resolver.Artifact

        Assert.assertTrue(a.getVersion().equals("2.0"));
    }

    @Test
    public void createGoodArtifactWithType() {
        Artifact a = new Artifact("org.foo:bar:oar:2.0");
        Assert.assertTrue(a.getGroupId().equals("org.foo"));
        Assert.assertTrue(a.getArtifactId().equals("bar"));
        Assert.assertTrue(a.getVersion().equals("2.0"));
        Assert.assertTrue(a.getType().equals("oar"));
    }
View Full Code Here

Examples of org.sonatype.aether.artifact.Artifact

    public VersionResult resolveVersion( RepositorySystemSession session, VersionRequest request )
        throws VersionResolutionException
    {
        RequestTrace trace = DefaultRequestTrace.newChild( request.getTrace(), request );

        Artifact artifact = request.getArtifact();

        String version = artifact.getVersion();

        VersionResult result = new VersionResult( request );

        Key cacheKey = null;
        RepositoryCache cache = session.getCache();
        if ( cache != null && !ConfigurationProperties.get( session, "aether.versionResolver.noCache", false ) )
        {
            cacheKey = new Key( session, request );

            Object obj = cache.get( session, cacheKey );
            if ( obj instanceof Record )
            {
                Record record = (Record) obj;
                result.setVersion( record.version );
                result.setRepository( CacheUtils.getRepository( session, request.getRepositories(), record.repoClass,
                                                                record.repoId ) );
                return result;
            }
        }

        Metadata metadata;

        if ( RELEASE.equals( version ) )
        {
            metadata =
                new DefaultMetadata( artifact.getGroupId(), artifact.getArtifactId(), MAVEN_METADATA_XML,
                                     Metadata.Nature.RELEASE );
        }
        else if ( LATEST.equals( version ) )
        {
            metadata =
                new DefaultMetadata( artifact.getGroupId(), artifact.getArtifactId(), MAVEN_METADATA_XML,
                                     Metadata.Nature.RELEASE_OR_SNAPSHOT );
        }
        else if ( version.endsWith( SNAPSHOT ) )
        {
            WorkspaceReader workspace = session.getWorkspaceReader();
            if ( workspace != null && workspace.findVersions( artifact ).contains( version ) )
            {
                metadata = null;
                result.setRepository( workspace.getRepository() );
            }
            else
            {
                metadata =
                    new DefaultMetadata( artifact.getGroupId(), artifact.getArtifactId(), version, MAVEN_METADATA_XML,
                                         Metadata.Nature.SNAPSHOT );
            }
        }
        else
        {
            metadata = null;
        }

        if ( metadata == null )
        {
            result.setVersion( version );
        }
        else
        {
            List<MetadataRequest> metadataRequests = new ArrayList<MetadataRequest>( request.getRepositories().size() );

            metadataRequests.add( new MetadataRequest( metadata, null, request.getRequestContext() ) );

            for ( RemoteRepository repository : request.getRepositories() )
            {
                MetadataRequest metadataRequest =
                    new MetadataRequest( metadata, repository, request.getRequestContext() );
                metadataRequest.setDeleteLocalCopyIfMissing( true );
                metadataRequest.setFavorLocalRepository( true );
                metadataRequest.setTrace( trace );
                metadataRequests.add( metadataRequest );
            }

            List<MetadataResult> metadataResults = metadataResolver.resolveMetadata( session, metadataRequests );

            Map<String, VersionInfo> infos = new HashMap<String, VersionInfo>();

            for ( MetadataResult metadataResult : metadataResults )
            {
                result.addException( metadataResult.getException() );

                ArtifactRepository repository = metadataResult.getRequest().getRepository();
                if ( repository == null )
                {
                    repository = session.getLocalRepository();
                }

                Versioning versioning = readVersions( session, trace, metadataResult.getMetadata(), repository, result );
                merge( artifact, infos, versioning, repository );
            }

            if ( RELEASE.equals( version ) )
            {
                resolve( result, infos, RELEASE );
            }
            else if ( LATEST.equals( version ) )
            {
                if ( !resolve( result, infos, LATEST ) )
                {
                    resolve( result, infos, RELEASE );
                }

                if ( result.getVersion() != null && result.getVersion().endsWith( SNAPSHOT ) )
                {
                    VersionRequest subRequest = new VersionRequest();
                    subRequest.setArtifact( artifact.setVersion( result.getVersion() ) );
                    if ( result.getRepository() instanceof RemoteRepository )
                    {
                        subRequest.setRepositories( Collections.singletonList( (RemoteRepository) result.getRepository() ) );
                    }
                    else
                    {
                        subRequest.setRepositories( request.getRepositories() );
                    }
                    VersionResult subResult = resolveVersion( session, subRequest );
                    result.setVersion( subResult.getVersion() );
                    result.setRepository( subResult.getRepository() );
                    for ( Exception exception : subResult.getExceptions() )
                    {
                        result.addException( exception );
                    }
                }
            }
            else
            {
                String key = SNAPSHOT + getKey( artifact.getClassifier(), artifact.getExtension() );
                merge( infos, SNAPSHOT, key );
                if ( !resolve( result, infos, key ) )
                {
                    result.setVersion( version );
                }
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.