Examples of ArtifactInstaller


Examples of org.apache.felix.fileinstall.ArtifactInstaller

        contextDeployerService = new ContextDeployerService();
    }

    @Test
    public void testContextDeployerService_isAnArtifactListener() throws Exception {
        ArtifactInstaller contextDeployerService = new ContextDeployerService();

        assertThat(contextDeployerService, is(notNullValue()));
    }
View Full Code Here

Examples of org.apache.maven.artifact.installer.ArtifactInstaller

    /**
     * Installs the artifact to the local Maven repository.
     */
    public void install(MavenEmbedder embedder) throws MavenEmbedderException, IOException, ComponentLookupException, ArtifactInstallationException {
        ArtifactHandlerManager handlerManager = embedder.lookup(ArtifactHandlerManager.class);
        ArtifactInstaller installer = embedder.lookup(ArtifactInstaller.class);
        ArtifactFactory factory = embedder.lookup(ArtifactFactory.class);

        Artifact main = mainArtifact.toArtifact(handlerManager,factory,parent);
        if(!isPOM())
            main.addMetadata(new ProjectArtifactMetadata(main,pomArtifact.getFile(parent)));
        installer.install(mainArtifact.getFile(parent),main,embedder.getLocalRepository());

        for (MavenArtifact aa : attachedArtifacts)
            installer.install(aa.getFile(parent), aa.toArtifact(handlerManager, factory, parent), embedder.getLocalRepository());
    }
View Full Code Here

Examples of org.apache.maven.artifact.installer.ArtifactInstaller

        {
            ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, pom.getFile() );
            artifact.addMetadata( metadata );
        }

        ArtifactInstaller installer = (ArtifactInstaller) lookup( ArtifactInstaller.ROLE );
        try
        {
            if ( !isPomArtifact )
            {
                installer.install( file, artifact, localRepo );
            }
            else
            {
                installer.install( pom.getFile(), artifact, localRepo );
            }

            // Install any attached artifacts
            if ( attachedArtifacts != null )
            {
                Iterator iter = pom.getAttachedArtifacts().iterator();

                while ( iter.hasNext() )
                {
                    Artifact attachedArtifact = (Artifact) iter.next();
                    installer.install( attachedArtifact.getFile(), attachedArtifact, localRepo );
                }
            }
        }
        catch ( ArtifactInstallationException e )
        {
View Full Code Here

Examples of org.apache.maven.artifact.installer.ArtifactInstaller

        {
            ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, pom.getFile() );
            artifact.addMetadata( metadata );
        }

        ArtifactInstaller installer = (ArtifactInstaller) lookup( ArtifactInstaller.ROLE );
        try
        {
            if ( file != null )
            {
                if ( !isPomArtifact )
                {
                    installer.install( file, artifact, localRepo );
                }
                else
                {
                    installer.install( pom.getFile(), artifact, localRepo );
                }
            }

            // Install any attached artifacts
            if ( attachedArtifacts != null )
            {
                for ( Artifact attachedArtifact : pom.getAttachedArtifacts() )
                {
                    installer.install( attachedArtifact.getFile(), attachedArtifact, localRepo );
                }
            }
        }
        catch ( ArtifactInstallationException e )
        {
View Full Code Here

Examples of org.apache.maven.artifact.installer.ArtifactInstaller

        {
            ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, pom.getFile() );
            artifact.addMetadata( metadata );
        }

        ArtifactInstaller installer = (ArtifactInstaller) lookup( ArtifactInstaller.ROLE );
        try
        {
            if ( !isPomArtifact )
            {
                installer.install( file, artifact, localRepo );
            }
            else
            {
                installer.install( pom.getFile(), artifact, localRepo );
            }
        }
        catch ( ArtifactInstallationException e )
        {
            throw new BuildException(
                "Error installing artifact '" + artifact.getDependencyConflictId() + "': " + e.getMessage(), e );
        }

        // Install any attached artifacts
        if (attachedArtifacts != null) {
            Iterator iter = attachedArtifacts.iterator();

            while (iter.hasNext()) {
                AttachedArtifact attached = (AttachedArtifact)iter.next();
                Artifact attachedArtifact = createArtifactFromAttached(attached, artifact);

                try {
                    installer.install( attachedArtifact.getFile(), attachedArtifact, localRepo );
                }
                catch (ArtifactInstallationException e) {
                    throw new BuildException(
                        "Error installing attached artifact '" + attachedArtifact.getDependencyConflictId() + "': " + e.getMessage(), e );
                }
View Full Code Here

Examples of org.apache.maven.artifact.installer.ArtifactInstaller

        {
            ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, pom.getFile() );
            artifact.addMetadata( metadata );
        }

        ArtifactInstaller installer = (ArtifactInstaller) lookup( ArtifactInstaller.ROLE );
        try
        {
            if ( !isPomArtifact )
            {
                if ( file == null )
                {
                    throw new BuildException( "You must specify a file to install to the local repository." );
                }

                installer.install( file, artifact, localRepo );
            }
            else
            {
                installer.install( pom.getFile(), artifact, localRepo );
            }

            // Install any attached artifacts
            if ( attachedArtifacts != null )
            {
                Iterator iter = pom.getAttachedArtifacts().iterator();

                while ( iter.hasNext() )
                {
                    Artifact attachedArtifact = (Artifact) iter.next();
                    installer.install( attachedArtifact.getFile(), attachedArtifact, localRepo );
                }
            }
        }
        catch ( ArtifactInstallationException e )
        {
View Full Code Here

Examples of org.apache.maven.artifact.installer.ArtifactInstaller

        {
            ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, pom.getFile() );
            artifact.addMetadata( metadata );
        }

        ArtifactInstaller installer = (ArtifactInstaller) lookup( ArtifactInstaller.ROLE );
        try
        {
            if ( !isPomArtifact )
            {
                installer.install( file, artifact, localRepo );
            }
            else
            {
                installer.install( pom.getFile(), artifact, localRepo );
            }
        }
        catch ( ArtifactInstallationException e )
        {
            throw new BuildException(
View Full Code Here

Examples of org.apache.maven.artifact.installer.ArtifactInstaller

        {
            ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, pom.getFile() );
            artifact.addMetadata( metadata );
        }

        ArtifactInstaller installer = (ArtifactInstaller) lookup( ArtifactInstaller.ROLE );
        try
        {
            if ( file != null )
            {
                if ( !isPomArtifact )
                {
                    installer.install( file, artifact, localRepo );
                }
                else
                {
                    installer.install( pom.getFile(), artifact, localRepo );
                }
            }

            // Install any attached artifacts
            if ( attachedArtifacts != null )
            {
                Iterator iter = pom.getAttachedArtifacts().iterator();

                while ( iter.hasNext() )
                {
                    Artifact attachedArtifact = (Artifact) iter.next();
                    installer.install( attachedArtifact.getFile(), attachedArtifact, localRepo );
                }
            }
        }
        catch ( ArtifactInstallationException e )
        {
View Full Code Here

Examples of org.appfuse.tool.ArtifactInstaller

        if (pojoName == null) {
            throw new MojoExecutionException("You must specify an entity name to continue.");
        }

        ArtifactInstaller installer = new ArtifactInstaller(project, pojoName, sourceDirectory, destinationDirectory, genericCore);
        installer.execute();
    }
View Full Code Here

Examples of org.appfuse.tool.ArtifactInstaller

            disableInstallation = Boolean.valueOf(System.getProperty("disableInstallation"));
        }

        // allow installation to be suppressed when testing
        if (!disableInstallation) {
            ArtifactInstaller installer = new ArtifactInstaller(getProject(), pojoName, sourceDirectory, destinationDirectory, genericCore);
            installer.execute();
        }
    }
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.