Package org.apache.maven.artifact.handler

Examples of org.apache.maven.artifact.handler.DefaultArtifactHandler


    {
        ArtifactHandler handler = artifactHandlers.get( type );

        if ( handler == null )
        {
            handler = new DefaultArtifactHandler( type );
        }

        return handler;
    }
View Full Code Here


                FileOutputStream fos = new FileOutputStream(tmpFile);

                try {
                    IOUtils.copy(in, fos);
                    Artifact jarArtifact = new DefaultArtifact(groupId, artifactId, version, "", fileExtension, "",
                            new DefaultArtifactHandler());
                    dai.install(tmpFile, jarArtifact, maven.getLocalRepository());
                } finally {
                    IOUtils.closeQuietly(in);
                    IOUtils.closeQuietly(fos);
                    FileUtils.deleteQuietly(tmpFile);
View Full Code Here

  private Artifact getArtifact(MavenProject parent) {
      Artifact art = parent.getArtifact();
      if (art == null) {
          // happens for Maven 2.x
          DefaultArtifactHandler artifactHandler = new DefaultArtifactHandler("pom");
          art = new DefaultArtifact(parent.getGroupId(), parent.getArtifactId(), VersionRange.createFromVersion(parent.getVersion()),
                  null, "pom", "", artifactHandler);
      }
        return art;
    }
View Full Code Here

                                   dependency.getArtifactId(),
                                   VersionRange.createFromVersion(dependency.getVersion()),
                                   dependency.getScope(),
                                   dependency.getType(),
                                   dependency.getClassifier(),
                                   new DefaultArtifactHandler(project.getArtifact().getType()));
    }
View Full Code Here

        MockArtifact artifact = new MockArtifact();
        artifact.setGroupId( "org.apache.dummy" );
        artifact.setArtifactId( "dummy" );
        artifact.setVersion( "0.1" );
        artifact.setType( "jar" );
        artifact.setArtifactHandler( new DefaultArtifactHandler( "jar" ) );
        project.setArtifact( artifact );

        Set<Artifact> artifacts = getArtifacts( getMockArtifact1Release(), getMockArtifact2(), getMockArtifact3() );
        project.setArtifacts( artifacts );
View Full Code Here

        MockArtifact artifact = new MockArtifact();
        artifact.setGroupId( "org.apache.dummy" );
        artifact.setArtifactId( "dummy" );
        artifact.setVersion( "0.1" );
        artifact.setType( "jar" );
        artifact.setArtifactHandler( new DefaultArtifactHandler( "jar" ) );
        project.setArtifact( artifact );

        Set<Artifact> artifacts = getArtifacts( getMockArtifact1(), getMockArtifact2(), getMockArtifact3() );

        project.setArtifacts( artifacts );
View Full Code Here

        final Plugin thisPlugin = (Plugin) project.getBuild().getPluginsAsMap().get("org.apache.openejb:spi-helper-maven-plugin");
        if (thisPlugin != null && thisPlugin.getDependencies() != null) {
            for (Dependency artifact : thisPlugin.getDependencies()) {
                final Artifact resolved = new DefaultArtifact(
                        artifact.getGroupId(), artifact.getArtifactId(), VersionRange.createFromVersion(artifact.getVersion()),
                        artifact.getScope(), artifact.getType(), artifact.getClassifier(), new DefaultArtifactHandler());
                try {
                    resolver.resolve(resolved, remotePluginRepositories, local);
                    urls.add(resolved.getFile().toURI().toURL());
                } catch (ArtifactResolutionException e) {
                    getLog().warn("can't resolve " + artifact.getArtifactId());
View Full Code Here

                                                        "test",
                                                        VersionRange.createFromVersion( "1.0" ),
                                                        null,
                                                        "jar",
                                                        "",
                                                        new DefaultArtifactHandler() ) );

        File file = new File( repo.getBasedir() + "/" + path + ".jar" );
        file.getParentFile().mkdirs();
        buildResourceBundle( "default-simplebundles-create",
                             null,
View Full Code Here

                                                        "test",
                                                        VersionRange.createFromVersion( "1.0" ),
                                                        null,
                                                        "war",
                                                        "",
                                                        new DefaultArtifactHandler() ) );
   
        File file = new File( repo.getBasedir() + "/" + path + ".war" );
        file.getParentFile().mkdirs();
        buildResourceBundle( "default-simplebundles-create",
                             null,
View Full Code Here

                                                        "test",
                                                        VersionRange.createFromVersion( "1.0" ),
                                                        null,
                                                        "jar",
                                                        "test",
                                                        new DefaultArtifactHandler() ) );
   
        File file = new File( repo.getBasedir() + "/" + path + ".jar" );
        file.getParentFile().mkdirs();
        buildResourceBundle( "default-simplebundles-create",
                             null,
View Full Code Here

TOP

Related Classes of org.apache.maven.artifact.handler.DefaultArtifactHandler

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.