Examples of EarArchive


Examples of org.codehaus.cargo.module.application.EarArchive

    private ApplicationXml getOriginalApplicationXml()
    {
        ApplicationXml appXml = null;
        try
        {
            EarArchive ear = new DefaultEarArchive(
                new FileInputStream(this.srcFile));
            appXml = ear.getApplicationXml();
            if (appXml == null)
            {
                throw new BuildException("The EAR source file does not "
                    + "contain a META-INF/application.xml "
                    + "deployment descriptor");
View Full Code Here

Examples of org.codehaus.cargo.module.application.EarArchive

     */
    private void addEjbReferencesToWar(File theWar)
    {
        try
        {
            EarArchive ear = new DefaultEarArchive(
                new FileInputStream(srcFile));
            ApplicationXml appXml = ear.getApplicationXml();
            Iterator ejbModules = appXml.getEjbModules();
            while (ejbModules.hasNext())
            {
                String module = (String) ejbModules.next();
                EjbArchive ejbArchive = ear.getEjbModule(module);
                EjbJarXml descr = ejbArchive.getEjbJarXml();
                Iterator vendorDescrIterator = descr.getVendorDescriptors();
                if (vendorDescrIterator == null
                    || !vendorDescrIterator.hasNext())
                {
View Full Code Here

Examples of org.codehaus.cargo.module.application.EarArchive

        try
        {
            deployable.setFile(theDeployableFile);

            EarArchive earArchive = new DefaultEarArchive(
                new FileInputStream(theDeployableFile));
            String webUri = getUriOfCactifiedWebModule(earArchive);
            if (webUri == null)
            {
                throw new BuildException("Could not find cactified web "
                    + "module in the [" + theDeployableFile + "] EAR.");
            }

            WarArchive warArchive = earArchive.getWebModule(webUri);
            if (warArchive == null)
            {
                throw new BuildException("Could not find the WAR [" + webUri
                    + "] in the [" + theDeployableFile + "] EAR.");
            }
View Full Code Here

Examples of org.codehaus.cargo.module.application.EarArchive

    public void testCanAddCactifiedWar() throws Exception
    {  
        executeTestTarget();
       
        File destFile = getProject().resolveFile("work/cactified.ear");
        EarArchive destEar = new DefaultEarArchive(destFile);
        ApplicationXml appXml = destEar.getApplicationXml();
        assertEquals("/cactus", appXml.getWebModuleContextRoot("cactus.war"));
        WarArchive cactusWar = destEar.getWebModule("cactus.war");
        WebXml webXml = cactusWar.getWebXml();
        assertNotNull(webXml.getServlet("ServletRedirector"));
    }
View Full Code Here

Examples of org.codehaus.cargo.module.application.EarArchive

    public void testCustomCactusWarContext() throws Exception
    {
        executeTestTarget();

        File destFile = getProject().resolveFile("work/cactified.ear");
        EarArchive destEar = new DefaultEarArchive(destFile);
        ApplicationXml appXml = destEar.getApplicationXml();
        assertEquals("/myTestFramework",
            appXml.getWebModuleContextRoot("cactus.war"));
    }
View Full Code Here

Examples of org.codehaus.cargo.module.application.EarArchive

    public void testAddEjbReferences() throws Exception
    {
        executeTestTarget();
       
        File destFile = getProject().resolveFile("work/cactified.ear");
        EarArchive destEar = new DefaultEarArchive(destFile);
        WarArchive cactusWar = destEar.getWebModule("cactus.war");
       
        // test web.xml
        WebXml webXml = cactusWar.getWebXml();
        Iterator i = webXml.getElements(WebXmlTag.EJB_LOCAL_REF);
        assertEjbRef((Element) i.next(), "ejb/Session2", "Session",
View Full Code Here

Examples of org.codehaus.cargo.module.application.EarArchive

                            throws JDOMException, MojoExecutionException
    {
        ApplicationXml appXml = null;
        try
        {
            EarArchive ear = new DefaultEarArchive(
                new FileInputStream(this.srcFile));
           
            appXml = ear.getApplicationXml();
            if (appXml == null)
            {
                throw new MojoExecutionException("The EAR source file does not "
                    + "contain a META-INF/application.xml "
                    + "deployment descriptor");
View Full Code Here

Examples of org.codehaus.cargo.module.application.EarArchive

    private void addEjbReferencesToWar(File theWar)
                    throws JDOMException, MojoExecutionException
    {
        try
        {
            EarArchive ear = new DefaultEarArchive(
                new FileInputStream(srcFile));
            ApplicationXml appXml = ear.getApplicationXml();
            Iterator ejbModules = appXml.getEjbModules();
            while (ejbModules.hasNext())
            {
                String module = (String) ejbModules.next();
                EjbArchive ejbArchive = ear.getEjbModule(module);
                EjbJarXml descr = ejbArchive.getEjbJarXml();
                Iterator vendorDescrIterator = descr.getVendorDescriptors();
                if (vendorDescrIterator == null
                    || !vendorDescrIterator.hasNext())
                {
View Full Code Here

Examples of org.codehaus.cargo.module.application.EarArchive

    private ApplicationXml getOriginalApplicationXml() throws JDOMException
    {
        ApplicationXml appXml = null;
        try
        {
            EarArchive ear = new DefaultEarArchive(
                new FileInputStream(this.srcFile));
            appXml = ear.getApplicationXml();
            if (appXml == null)
            {
                throw new BuildException("The EAR source file does not "
                    + "contain a META-INF/application.xml "
                    + "deployment descriptor");
View Full Code Here

Examples of org.codehaus.cargo.module.application.EarArchive

     */
    private void addEjbReferencesToWar(File theWar) throws JDOMException
    {
        try
        {
            EarArchive ear = new DefaultEarArchive(
                new FileInputStream(srcFile));
            ApplicationXml appXml = ear.getApplicationXml();
            Iterator ejbModules = appXml.getEjbModules();
            while (ejbModules.hasNext())
            {
                String module = (String) ejbModules.next();
                EjbArchive ejbArchive = ear.getEjbModule(module);
                EjbJarXml descr = ejbArchive.getEjbJarXml();
                Iterator vendorDescrIterator = descr.getVendorDescriptors();
                if (vendorDescrIterator == null
                    || !vendorDescrIterator.hasNext())
                {
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.