Examples of AssemblerConfig


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

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

        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

        }
       
        try {
            // Assemble portlet app by updating web.xml.
            if (archives == null || archives.isEmpty()) {       
                AssemblerConfig config = createAssemblerConfig();
                Assembler assembler = AssemblerFactory.getFactory()
                    .createAssembler(config);
                assembler.assemble(config);
            } else {
                for (Iterator i = archives.iterator(); i.hasNext();) {
                    File archive = new File(i.next().toString());
                    if (log.isInfoEnabled()) {
                        log.info("Assembling archive file " + archive.getAbsolutePath() +
                                " to directory " + assemblyOutputDirectory.getAbsolutePath());
                    }               
                    AssemblerConfig config = createArchiveAssemblerConfig(archive, assemblyOutputDirectory);
                    Assembler assembler = AssemblerFactory.getFactory()
                        .createAssembler(config);
                    assembler.assemble(config);
                }
            }
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.