Examples of MavenArtifact


Examples of org.drools.guvnor.client.rpc.MavenArtifact

        assertNotNull(result.getV1());
        assertNotNull(result.getV2());
        assertEquals(2, result.getV1().size());
        assertEquals(2, result.getV2().size());

        result.getV1().iterator().next().equals(new MavenArtifact("org.drools:knowledge-api:jar:5.5.0-SNAPSHOT:compile"));
    }
View Full Code Here

Examples of org.drools.guvnor.client.rpc.MavenArtifact

        assertNotNull(result.getV2());
        assertEquals(8, result.getV2().size());
        assertEquals(2, result.getV1().size());

        for (final MavenArtifact artifact : result.getV1()) {
            if (artifact.equals(new MavenArtifact("org.drools:drools-camel:jar:5.5.0-SNAPSHOT:compile"))) {
                validateDroolsCamel(artifact);
            } else if (artifact.equals(new MavenArtifact("org.apache.camel:camel-core:jar:2.4.0:compile"))) {
                assertFalse(artifact.hasChild());
            } else {
                fail();
            }
        }
View Full Code Here

Examples of org.drools.guvnor.client.rpc.MavenArtifact

    private void validateDroolsCamel(final MavenArtifact artifact) {
        assertEquals(2, artifact.getChild().size());

        final Iterator<MavenArtifact> droolsCamelChildIterator =  artifact.getChild().iterator();
        final MavenArtifact shouldBeSpringAOP = droolsCamelChildIterator.next();

        assertEquals(new MavenArtifact("org.springframework:spring-aop:jar:2.5.6:compile"), shouldBeSpringAOP);
        assertEquals(0, shouldBeSpringAOP.getChild().size());

        final MavenArtifact shouldBeCxfRtFrontendJaxws = droolsCamelChildIterator.next();

        assertEquals(new MavenArtifact("org.apache.cxf:cxf-rt-frontend-jaxws:jar:2.4.4:compile"), shouldBeCxfRtFrontendJaxws);
        assertEquals(2, shouldBeCxfRtFrontendJaxws.getChild().size());

        final Iterator<MavenArtifact> cxfRtFrontendJaxwsChildIterator =  shouldBeCxfRtFrontendJaxws.getChild().iterator();
        final MavenArtifact shouldXmlResolver = cxfRtFrontendJaxwsChildIterator.next();
        assertEquals(new MavenArtifact("xml-resolver:xml-resolver:jar:1.2:compile"), shouldXmlResolver);
        assertEquals(2, shouldXmlResolver.getChild().size());

        final Iterator<MavenArtifact> xmlResolverChildIterator =  shouldXmlResolver.getChild().iterator();

        final MavenArtifact shouldCxfToolsCommon = xmlResolverChildIterator.next();
        assertEquals(new MavenArtifact("org.apache.cxf:cxf-tools-common:jar:2.4.4:compile"), shouldCxfToolsCommon);
        assertEquals(0, shouldCxfToolsCommon.getChild().size());

        final MavenArtifact shouldcxfRtDatabindingJaxb = xmlResolverChildIterator.next();
        assertEquals(new MavenArtifact("org.apache.cxf:cxf-rt-databinding-jaxb:jar:2.4.4:compile"), shouldcxfRtDatabindingJaxb);
        assertEquals(0, shouldcxfRtDatabindingJaxb.getChild().size());


        final MavenArtifact shouldJbossSomething = cxfRtFrontendJaxwsChildIterator.next();
        assertEquals(new MavenArtifact("org.jboss:something:jar:2.4.4:compile"), shouldJbossSomething);
        assertEquals(0, shouldJbossSomething.getChild().size());
    }
View Full Code Here

Examples of org.gradle.api.publish.maven.MavenArtifact

        this.publicationName = publicationName;
        this.mavenArtifactParser = mavenArtifactParser;
    }

    public MavenArtifact artifact(Object source) {
        MavenArtifact artifact = mavenArtifactParser.parseNotation(source);
        add(artifact);
        return artifact;
    }
View Full Code Here

Examples of org.gradle.api.publish.maven.MavenArtifact

        add(artifact);
        return artifact;
    }

    public MavenArtifact artifact(Object source, Action<? super MavenArtifact> config) {
        MavenArtifact artifact = artifact(source);
        config.execute(artifact);
        return artifact;
    }
View Full Code Here

Examples of org.jetbrains.idea.maven.model.MavenArtifact

      // flatten the tree while taking care of endless recursions
      LinkedList<MavenArtifactNode> nodes = new LinkedList<MavenArtifactNode>(project.getDependencyTree());
      while (!nodes.isEmpty()) {
        MavenArtifactNode node = nodes.pop();
        MavenArtifact artifact = node.getArtifact();
        if (!processed.contains(artifact)) {
          processed.add(artifact);
          nodes.addAll(node.getDependencies());
        }
      }
View Full Code Here

Examples of org.owasp.dependencycheck.data.nexus.MavenArtifact

     * Test of addAsEvidence method, of class Dependency.
     */
    @Test
    public void testAddAsEvidence() {
        Dependency instance = new Dependency();
        MavenArtifact mavenArtifact = new MavenArtifact("group", "artifact", "version", "url");
        instance.addAsEvidence("pom", mavenArtifact, Confidence.HIGH);
        assertTrue(instance.getEvidence().contains(Confidence.HIGH));
        assertFalse(instance.getEvidence().getEvidence("pom", "groupid").isEmpty());
        assertFalse(instance.getEvidence().getEvidence("pom", "artifactid").isEmpty());
        assertFalse(instance.getEvidence().getEvidence("pom", "version").isEmpty());
View Full Code Here

Examples of org.owasp.dependencycheck.data.nexus.MavenArtifact

     * Test of addAsEvidence method, of class Dependency.
     */
    @Test
    public void testAddAsEvidenceWithEmptyArtefact() {
        Dependency instance = new Dependency();
        MavenArtifact mavenArtifact = new MavenArtifact(null, null, null, null);
        instance.addAsEvidence("pom", mavenArtifact, Confidence.HIGH);
        assertFalse(instance.getEvidence().contains(Confidence.HIGH));
        assertTrue(instance.getEvidence().getEvidence("pom", "groupid").isEmpty());
        assertTrue(instance.getEvidence().getEvidence("pom", "artifactid").isEmpty());
        assertTrue(instance.getEvidence().getEvidence("pom", "version").isEmpty());
View Full Code Here

Examples of org.owasp.dependencycheck.data.nexus.MavenArtifact

    public void analyzeFileType(Dependency dependency, Engine engine) throws AnalysisException {
        if (!isEnabled()) {
            return;
        }
        try {
            final MavenArtifact ma = searcher.searchSha1(dependency.getSha1sum());
            dependency.addAsEvidence("nexus", ma, Confidence.HIGH);
        } catch (IllegalArgumentException iae) {
            //dependency.addAnalysisException(new AnalysisException("Invalid SHA-1"));
            LOGGER.info(String.format("invalid sha-1 hash on %s", dependency.getFileName()));
        } catch (FileNotFoundException fnfe) {
View Full Code Here

Examples of org.owasp.dependencycheck.data.nexus.MavenArtifact

                        LOGGER.finest(String.format("GroupId: %s", g));
                        final String a = xpath.evaluate("./str[@name='a']", docs.item(i));
                        LOGGER.finest(String.format("ArtifactId: %s", a));
                        final String v = xpath.evaluate("./str[@name='v']", docs.item(i));
                        LOGGER.finest(String.format("Version: %s", v));
                        result.add(new MavenArtifact(g, a, v, url.toString()));
                    }

                    return result;
                }
            } catch (Throwable e) {
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.