Examples of ArtifactHandler


Examples of org.apache.jackrabbit.vault.fs.api.ArtifactHandler

    private void processHandler(Element elem) throws ConfigurationException {
        String type = elem.getAttribute("type");
        if (type == null || type.equals("")) {
            type = "generic";
        }
        ArtifactHandler handler = Registry.getInstance().createHandler(type);
        if (handler == null) {
            fail("Handler of type " + type + " is not registered.", elem);
        }
        // finally add handler
        getHandlers().add(handler);
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.ArtifactHandler

        ctx.outdent();
        aggregatorProvider.dump(ctx, false);
        ctx.println(true, "handlers");
        ctx.indent(true);
        for (Iterator<ArtifactHandler> iter = artifactHandlers.iterator(); iter.hasNext();) {
            ArtifactHandler h = iter.next();
            h.dump(ctx, !iter.hasNext());
        }
        ctx.outdent();

        ctx.flush();
    }
View Full Code Here

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

    @Requirement( role = ArtifactHandler.class )
    private Map<String, ArtifactHandler> artifactHandlers;

    public ArtifactHandler getArtifactHandler( String type )
    {
        ArtifactHandler handler = artifactHandlers.get( type );

        if ( handler == null )
        {
            handler = new DefaultArtifactHandler( type );
        }
View Full Code Here

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

    protected void unpackBaseArtifact() throws MojoExecutionException {
        // No-op. This is JAR-specific.
    }

    private File getPrimaryArtifact() throws MojoExecutionException {
        ArtifactHandler handler = artifactHandlerManager.getArtifactHandler(project.getPackaging());

        String artifactName = project.getBuild().getFinalName() + "." + handler.getExtension();

        File file = new File(buildDirectory, artifactName);
        if (!file.exists()) {
            throw new MojoExecutionException("Project's primary artifact (" + file.getPath() + ") doesn't exist.");
        }
View Full Code Here

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

        return project;
    }

    private ArtifactHandler getMockArtifactHandler()
    {
        return new ArtifactHandler()
        {

            public String getClassifier()
            {
                return null;
View Full Code Here

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

                                 executionRootDir, executionProperties, startTime );
    }

    private Set<Artifact> getArtifacts( Artifact... artifacts )
    {
        final ArtifactHandler mockArtifactHandler = getMockArtifactHandler();
        Set<Artifact> result = new TreeSet<Artifact>( new ArtifactComparator() );
        for ( Artifact artifact : artifacts )
        {
            artifact.setArtifactHandler( mockArtifactHandler );
            result.add( artifact );
View Full Code Here

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

        {
        }

        public ArtifactHandler getArtifactHandler()
        {
            ArtifactHandler handler = new ArtifactHandler()
            {

                public String getClassifier()
                {
                    return classifier;
View Full Code Here

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

    }

    @Override
    public String pathOf( Artifact artifact )
    {
        ArtifactHandler artifactHandler = artifact.getArtifactHandler();

        StringBuilder path = new StringBuilder( 128 );

        path.append( artifact.getGroupId() ).append( '/' );
        path.append( artifactHandler.getDirectory() ).append( '/' );
        path.append( artifact.getArtifactId() ).append( '-' ).append( artifact.getVersion() );

        if ( artifact.hasClassifier() )
        {
            path.append( '-' ).append( artifact.getClassifier() );
        }

        if ( artifactHandler.getExtension() != null && artifactHandler.getExtension().length() > 0 )
        {
            path.append( '.' ).append( artifactHandler.getExtension() );
        }

        return path.toString();
    }
View Full Code Here

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

    protected void setUp()
        throws Exception
    {
        super.setUp();

        ArtifactHandler ah = new DefaultArtifactHandlerStub( "jar", null );
        VersionRange vr = VersionRange.createFromVersion( "1.1" );
        release = new DefaultArtifact( "test", "one", vr, Artifact.SCOPE_COMPILE, "jar", "sources", ah, false );
        artifacts.add( release );

        ah = new DefaultArtifactHandlerStub( "war", null );
View Full Code Here

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

        assertEquals( expectedResult, name );
    }

    public void testTestJar()
    {
        ArtifactHandler ah = new DefaultArtifactHandlerStub( "test-jar", null );
        VersionRange vr = VersionRange.createFromVersion( "1.1-SNAPSHOT" );
        Artifact artifact = new DefaultArtifact( "test", "two", vr, Artifact.SCOPE_PROVIDED, "test-jar", null, ah,
                                                 false );

        String name = DependencyUtil.getFormattedFileName( artifact, false );
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.