Examples of AssemblerConfig


Examples of org.apache.pluto.util.assemble.AssemblerConfig

        super.tearDown();
        this.earFile = null;
    }
   
    public void testEarAssemblyToTempDir() throws Exception {
        AssemblerConfig config = new AssemblerConfig();
        config.setSource( earFile );
        File assembledEar = File.createTempFile( earFile.getName(), ".ear" );
        config.setDestination( assembledEar );
        EarAssembler assembler = new EarAssembler();
        assembler.assemble( config );
        validateEarAssembly( assembledEar );
        assembledEar.delete();
    }
View Full Code Here

Examples of org.apache.pluto.util.assemble.AssemblerConfig

        // copy the test ear file to a temp directory, so we don't overwrite the
        // test ear file distributed with Pluto.
        File inplaceEarFile = File.createTempFile( earFile.getName(), ".ear" );
        FileUtils.copyFile( earFile, inplaceEarFile );
       
        AssemblerConfig config = new AssemblerConfig();
        config.setSource( inplaceEarFile );
        config.setDestination( inplaceEarFile );
        EarAssembler assembler = new EarAssembler();
        assembler.assemble( config );
        validateEarAssembly( inplaceEarFile );
       
        inplaceEarFile.delete();       
View Full Code Here

Examples of org.apache.pluto.util.assemble.AssemblerConfig

       
        assertTrue( "Source ear file doesn't exist! [" + earFile + "]", earFile.exists() );
        assertTrue( "Destination directory doesn't exist! [" + destDir + "]",
                destDir.exists() && destDir.isDirectory() );
       
        AssemblerConfig config = new AssemblerConfig();
        config.setSource( earFile );
        config.setDestination( destDir );
        EarAssembler assembler = new EarAssembler();
       
        assembler.assemble( config );
       
        File destFile = new File( destDir, earFile.getName() );
View Full Code Here

Examples of org.apache.pluto.util.assemble.AssemblerConfig

    protected void tearDown() throws Exception {
        this.portletFile = null;
    }

    public void testAssembleToNewDirectory() throws Exception {
        AssemblerConfig config = new AssemblerConfig();

        config.setSource(this.portletFile);

        final File tempDir = getTempDir();
        config.setDestination(tempDir);

        WarAssembler assembler = new WarAssembler();
        assembler.assemble(config);

        //How to validate it worked?
View Full Code Here

Examples of org.apache.pluto.util.assemble.AssemblerConfig

        //How to validate it worked?
    }

    public void testAssembleOverSelf() throws Exception {
        AssemblerConfig config = new AssemblerConfig();

        final File portletCopy = File.createTempFile(this.portletFile.getName() + ".", ".war");
        portletCopy.deleteOnExit();
        FileUtils.copyFile(this.portletFile, portletCopy);

        config.setSource(portletCopy);
        config.setDestination(portletCopy.getParentFile());

        WarAssembler assembler = new WarAssembler();
        assembler.assemble(config);

        //How to validate it worked?
View Full Code Here

Examples of org.apache.pluto.util.assemble.AssemblerConfig

       
        final File warNoManifest = new File( this.getClass().getResource(portletResourceNoManifest).getFile() );
        assertNotNull( "Unable to locate the test war file with no manifest.", warNoManifest );
       
        final File tempDir = getTempDir();
        final AssemblerConfig config = new AssemblerConfig();
        config.setSource( warNoManifest );
        config.setDestination(tempDir);
       
        WarAssembler assembler = new WarAssembler();
        assembler.assemble(config);       
    }
View Full Code Here

Examples of org.apache.pluto.util.assemble.AssemblerConfig

        this.webXmlFile = null;
        this.portletXmlFile = null;
    }

    public void testAssembleToNewDirectory() throws Exception {
        AssemblerConfig config = new AssemblerConfig();

        final File webXmlFileDest = File.createTempFile(this.webXmlFile.getName() + ".", ".xml");
        webXmlFileDest.deleteOnExit();

        config.setWebappDescriptor(this.webXmlFile);
        config.setPortletDescriptor(this.portletXmlFile);
        config.setDestination(webXmlFileDest);

        FileAssembler assembler = new FileAssembler();
        assembler.assemble(config);

        assertXMLEqual(new FileReader(this.assembledWebXmlFile), new FileReader(webXmlFileDest));
View Full Code Here

Examples of org.apache.pluto.util.assemble.AssemblerConfig

        assertXMLEqual(new FileReader(this.assembledWebXmlFile), new FileReader(webXmlFileDest));
    }

    public void testAssembleOverSelf() throws Exception {
        AssemblerConfig config = new AssemblerConfig();

        final File webXmlFileCopy = File.createTempFile(this.webXmlFile.getName() + ".", ".source.xml");
        webXmlFileCopy.deleteOnExit();

        FileUtils.copyFile(this.webXmlFile, webXmlFileCopy);

        config.setWebappDescriptor(webXmlFileCopy);
        config.setPortletDescriptor(this.portletXmlFile);
        config.setDestination(webXmlFileCopy);

        FileAssembler assembler = new FileAssembler();
        assembler.assemble(config);

        assertXMLEqual(new FileReader(this.assembledWebXmlFile), new FileReader(webXmlFileCopy));
View Full Code Here

Examples of org.apache.pluto.util.assemble.AssemblerConfig

    protected void tearDown() throws Exception {
        this.portletFile = null;
    }

    public void testAssembleToNewDirectory() throws Exception {
        AssemblerConfig config = new AssemblerConfig();

        config.setSource(this.portletFile);

        final File tempDir = getTempDir();
        config.setDestination(tempDir);

        WarAssembler assembler = new WarAssembler();
        assembler.assemble(config);

        //How to validate it worked?
View Full Code Here

Examples of org.apache.pluto.util.assemble.AssemblerConfig

        //How to validate it worked?
    }

    public void testAssembleOverSelf() throws Exception {
        AssemblerConfig config = new AssemblerConfig();

        final File portletCopy = File.createTempFile(this.portletFile.getName() + ".", ".war");
        portletCopy.deleteOnExit();
        FileUtils.copyFile(this.portletFile, portletCopy);

        config.setSource(portletCopy);
        config.setDestination(portletCopy.getParentFile());

        WarAssembler assembler = new WarAssembler();
        assembler.assemble(config);

        //How to validate it worked?
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.