Package org.mevenide.idea.repository

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


        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

            //
            //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

    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

        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

TOP

Related Classes of org.mevenide.idea.repository.Artifact

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.