Package org.apache.maven.repository

Examples of org.apache.maven.repository.Artifact


            throw new RuntimeException("No target directory supplied");
        }
        ServiceDocument serviceDocument = ServiceDocument.Factory.newInstance();
        ServiceType serviceType = serviceDocument.addNewService();
        for (Iterator iterator = artifacts.iterator(); iterator.hasNext();) {
            Artifact artifact = (Artifact) iterator.next();
            Dependency dependency = (Dependency) artifact.getDependency();
            if ("true".equals(dependency.getProperty(DEPENDENCY_PROPERTY))) {
                String groupId = dependency.getGroupId();
                String artifactId = dependency.getArtifactId();
                String version = dependency.getVersion();
                String type = dependency.getType();
View Full Code Here


            while(xmlCursor.toNextSibling(elementQName));
            xmlCursor.toEndToken();
            xmlCursor.toNextToken();
        }
        for (Iterator iterator = artifacts.iterator(); iterator.hasNext();) {
            Artifact artifact = (Artifact) iterator.next();
            Dependency dependency = (Dependency) artifact.getDependency();
            if ("true".equals(dependency.getProperty(artifactProperty))) {
                String groupId = dependency.getGroupId();
                String artifactId = dependency.getArtifactId();
                String version = dependency.getVersion();
                String type = dependency.getType();
View Full Code Here

    private Object getPackageBuilder() throws ClassNotFoundException, IllegalAccessException, InstantiationException, MalformedURLException {
        if (classLoader == null) {
            String repo = context.getMavenRepoLocal();
            List urls = new ArrayList();
            for (Iterator iterator = pluginArtifacts.iterator(); iterator.hasNext();) {
                Artifact artifact = (Artifact) iterator.next();
                Dependency dependency = (Dependency) artifact.getDependency();
                if ("true".equals(dependency.getProperty(PACKAGING_CLASSPATH_PROPERTY))) {
                    String urlString = artifact.getUrlPath();
                    URL url = new File(repo + urlString).toURL();
                    urls.add(url);
                }
            }
            boolean found = false;
            for (Iterator iterator = artifacts.iterator(); iterator.hasNext();) {
                Artifact artifact = (Artifact) iterator.next();
                Dependency dependency = (Dependency) artifact.getDependency();
                if ("geronimo".equals(dependency.getGroupId())
                && "geronimo-packaging-plugin".equals(dependency.getArtifactId())
                && "plugin".equals(dependency.getType())) {
                    String urlString = artifact.getUrlPath();
                    URL url = new File(repo + urlString).toURL();
                    urls.add(url);
                    found = true;
                }
            }
View Full Code Here

    }

    public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
        try {
            if (dependency.getJar() != null){
                Artifact artifact = DefaultArtifactFactory.createArtifact(dependency);
                // Munge the paths
                File jarFile = new File(dependency.getJar());
                artifact.setPath(jarFile.getAbsolutePath());
                dependency.setJar(jarFile.getName());
                // Add artifact and dependency to project
                Project project = getMavenContext().getProject();
                project.addDependency(dependency);
                project.getArtifacts().add(artifact);
View Full Code Here

TOP

Related Classes of org.apache.maven.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.