OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | exoplatform List | April 2008 Index

<--  Date Index  --> <--  Thread Index  -->

[exoplatform] Re: new JIRA issues ?


Hi Alexey,

Alexey Zavizionov a écrit :
I have got same on WAS with ibm jdk 5? solved with jaxp jars.
Please, provide your new dependency in the pom.
My modified files are attached.

So, I must try to understand this QuartzScheduler error to solve my deployment ? that would be fine. I'll work on this tomorrow...headache tonight... thanks ;)

Cheers

Alexey Zavizionov a écrit :
Hi Steph,

comments are placed below

On Thu, Apr 10, 2008 at 4:44 PM, Steph <steph33560@xxxxxxxxx> wrote:
Hello,

Some feedbacks about my last exceptions !

Launching a browser on the URL of the portal always fails in a NullPointerException on org.exoplatform.portal.application.PortalController.init(PortalController.java:69)...

This might be due to other exception while deploying the EAR ?
I've succeeded in avoiding one exception but I can't understand the others... May the team could have a look ? ...  Please answer even if it's negative ...
 
First : RuntimeException: Cannot instantiate component class org.exoplatform.services.scheduler.impl.QuartzSheduler
    Action ="" didn't worked on that stuff since I don't know what's for

What is the cause of it?

The first error may be the cause of others.
 


Second :
  ClassNotFoundException: org.apache.commons.dbcp.BasicDataSourceFactory
    why => missing dependency ?
    Action="" added dependency to commons-dbcp in eXoProjects/kernel/trunk/container/pom.xml
    Effects => does nothing ! :(

Third : Servlet /portal threw load() exception java.lang.NullPointerException
    Why => unexpected null object : org.exoplatform.portal.application.PortalController.init() : portalContainer is null : rootContainer.getPortalContainer("portal") returns null !!
    Action ="" None !! Can't understand more because RootContainer.getPortalContainer() calls DefaultPicoContainer.getComponentInstance() (no source found !)

The portal container didn't start.
 


Fourth : ClassNotFoundException: com.sun.org.apache.xerces.internal.dom.DOMInputImpl
    Action ="" replace internal DOMInputImpl by the one in xerces : modified eXoProjects/portlet-container/trunk/component/plugins/pc/src/main/java/org/exoplatform/services/portletcontainer/impl/servlet/PortletApplicationListener.java         Action ="" added Xerces dependency in eXoProjects/portlet-container/trunk/component/plugins/pc/pom.xml
    Effects => solved the problem :) Maybe it sould be committed in SVN if it does not breaks other things...
 
I have got same on WAS with ibm jdk 5? solved with jaxp jars.
Please, provide your new dependency in the pom.



Fifth : SkinService.processMergeRecursively : Problem while merging CSS : /skin/PortletThemes/Stylesheet.css
Why => What's wrong with portletThemes/Stylesheet.css ? others works properly but scontext.getResourceAsStream("/skin/PortletThemes/Stylesheet.css") seems to thow nullpointer

eXoResources.war must be deployed first

Regards,
Alexey
 


Sixth : Servlet /cometd threw load() exception
java.lang.IncompatibleClassChangeError org.exoplatform.services.scheduler.impl.QuartzSheduler
Action ="" don't know what's for, didn't look at it
Effects => none

Steph a écrit :
Hello,

eXoPortal seems now correctly build on JOnAS 5.0.2 with JDK 1.6.

However, I've got 6 exceptions that I don't know how to remove (see below, full log attached to this mail).
Please note that I've updated my workspace yesterday, 08/04/2008.

First :

008-04-09 13:46:50,725 : QuartzScheduler.<init> : Quartz Scheduler v.1.5.0-RC2 created.
java.lang.RuntimeException: Cannot instantiate component class org.exoplatform.services.scheduler.impl.QuartzSheduler
[...]
Caused by: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.quartz.impl.StdScheduler.setJobFactory(Lorg/quartz/spi/JobFactory;)V" the class loader (instance of org/ow2/easybeans/loader/EasyBeansClassLoader) of the current class, org/quartz/impl/StdScheduler, and the class loader (instance of org/apache/felix/framework/searchpolicy/ContentClassLoader) for interface org/quartz/Scheduler have different Class objects for the type org/quartz/spi/JobFactory used in the signature

==> is it grave doctor ?

Second :

2008-04-09 13:46:59,047 : InitialContextInitializer.addPlugin : Reference bound: jdbcexo
ERROR: cannot create portal container. ServletContext: org.apache.catalina.core.ApplicationContextFacade@48c85b
java.lang.RuntimeException: Cannot instantiate component class org.exoplatform.services.jcr.ext.hierarchy.impl.NodeHierarchyCreatorImpl
[...]
Caused by: java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSourceFactory

==> However, commons-dbcp-1.2.1.jar is in EAR's dir (/exo-jonas/deploy/exoplatform.ear/lib)

Third :

2008-04-09 11:56:11,177 : StandardContext.loadOnStartup : Servlet /portal threw load() exception
java.lang.NullPointerException
    at org.exoplatform.portal.application.PortalController.init(PortalController.java:67)

=> while reading the code, i think it is because rootContainer.createPortalContainer(config.getServletContext())  did not succed.


Fourth : (happened more than one time)
2008-04-09 11:56:11,707 : StandardContext.listenerStart : Exception sending context initialized event to listener instance of class org.exoplatform.services.portletcontainer.impl.servlet.PortletApplicationListener
java.lang.NoClassDefFoundError: com/sun/org/apache/xerces/internal/dom/DOMInputImpl
[...]
Caused by: java.lang.ClassNotFoundException: com.sun.org.apache.xerces.internal.dom.DOMInputImpl

==> even if xercesImpl-2.8.1.jar would be in EAR's lib dir, DOMInputImpl's package is org.apache.xerces.dom (no internal). What library does it refers to ?

Fitfh : (happened more than one time)

2008-04-09 11:56:12,499 : SkinService.processMergeRecursively : Problem while merging CSS : /skin/PortletThemes/Stylesheet.css
java.lang.NullPointerException
    at org.exoplatform.portal.webui.skin.SkinService.processMergeRecursively(SkinService.java:155)

==> The file /skin/PortletThemes/Stylesheet.css exists ?! Why BufferReader fails ?

Sixth :

2008-04-09 11:56:15,184 : StandardContext.loadOnStartup : Servlet /cometd threw load() exception
java.lang.IncompatibleClassChangeError: Implementing class

==> Cometd won't work,  grave ?

Thanks for the support :)

Steph a écrit :
Hello,

I've successfully build jonas environment in version osgi-5.0.1, with
JDK 1.6.

However, there's something wrong with librairies ; in the log, I've got
some ClassNotFoundException so that the EAR can be correctly deployed :

[...]

Any issue about this, knowing that here are all jars in jonas lib dir :

[...]

Many thanks !

 - Stéphane





  




--
You receive this message as a subscriber of the exoplatform@xxxxxxx mailing list.
To unsubscribe: mailto:exoplatform-unsubscribe@xxxxxxx
For general help: mailto:sympa@xxxxxxx?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws



/*
 * Copyright (C) 2003-2007 eXo Platform SAS.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Affero General Public License
 * as published by the Free Software Foundation; either version 3
 * of the License, or (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program; if not, see<http://www.gnu.org/licenses/>.
 */
package org.exoplatform.services.portletcontainer.impl.servlet;

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.xml.transform.stream.StreamSource;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
import javax.xml.validation.Validator;

import org.apache.commons.logging.Log;
import org.exoplatform.commons.xml.ExoXPPParser;
import org.exoplatform.container.ExoContainer;
import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.portletcontainer.PortletApplicationRegister;
import org.exoplatform.services.portletcontainer.pci.model.PortletApp;
import org.exoplatform.services.portletcontainer.pci.model.XMLParser;
import org.w3c.dom.ls.LSInput;
import org.w3c.dom.ls.LSResourceResolver;
import org.xml.sax.SAXException;
import org.xmlpull.v1.XmlPullParser;

import org.apache.xerces.dom.DOMInputImpl;

/**
 * Created by the Exo Development team.
 * Author : Mestrallet Benjamin
 * benjmestrallet@xxxxxxxxxxxxxxxxxxxxx
 * Date: 10 nov. 2003
 * Time: 12:58:52
 */
public class PortletApplicationListener implements ServletContextListener {

  /**
   * Logger.
   */
  private static Log log = ExoLogger.getLogger("org.exoplatform.services.portletcontainer");

  /**
   * WebXML.
   */
  private static String fileWebXML = "/WEB-INF/web.xml";

  /**
   * PortletXML.
   */
  private static String filePortletXML = "/WEB-INF/portlet.xml";

  /**
   * XMLXSD.
   */
  private static String fileXMLXSD = "javax/servlet/resources/" + "xml.xsd";

  /**
   * XMLSchemaDTD.
   */
  private static String fileXMLSchemaDTD = "javax/servlet/resources/" + "XMLSchema.dtd";

  /**
   * DatatypesDTD.
   */
  private static String fileDatatypesDTD = "javax/servlet/resources/" + "datatypes.dtd";

  /**
   * Servlet context.
   */
  protected ServletContext hServletContext;

  /**
   * Overridden method.
   *
   * @param servletContextEvent servlet context event
   * @see javax.servlet.ServletContextListener#contextInitialized(javax.servlet.ServletContextEvent)
   */
  public final void contextInitialized(final ServletContextEvent servletContextEvent) {

    ExoContainer manager = ExoContainerContext.getTopContainer();

    if (log.isDebugEnabled())
      log.debug("Getting context path");

    String portletAppName = getContextPath(servletContextEvent);

    if (log.isDebugEnabled())
      log.debug("Context path:" + portletAppName);

    ServletContext servletContext = servletContextEvent.getServletContext();
    hServletContext = servletContextEvent.getServletContext();
    log.info("DEPLOY PORTLET APPLICATION: " + portletAppName);
    if (log.isDebugEnabled())
      log.debug("Real path : " + servletContext.getRealPath(""));

    InputStream is = null;
    String oldParser = System.getProperty("javax.xml.parsers.DocumentBuilderFactory");

    try {

      String spec = validationPortletXML(servletContext);
      if (spec == null)
        return;

      is = servletContext.getResourceAsStream(filePortletXML);
      log.info("The portlet.xml file valid portlet spec " + spec);
      PortletApp portletApp = XMLParser.parse(is, spec.equalsIgnoreCase("2") ? Boolean.TRUE
          : Boolean.FALSE);
      is = servletContext.getResourceAsStream(fileWebXML);
      Collection<String> roles = new ArrayList<String>();

      ExoXPPParser xpp = ExoXPPParser.getInstance();
      xpp.setInput(is, "UTF8");
      xpp.mandatoryNode("web-app");
      while (!xpp.node("security-role")) {
        if (xpp.getEventType() == XmlPullParser.END_DOCUMENT)
          break;
        xpp.next();
      }
      if (xpp.node("role-name")) {
        roles.add(xpp.getContent());
        while (xpp.node("security-role"))
          roles.add(xpp.mandatoryNodeContent("role-name"));
      }
      log.info("  -- read: " + portletApp.getPortlet().size() + " portlets");
      PortletApplicationRegister service = (PortletApplicationRegister) manager
          .getComponentInstanceOfType(PortletApplicationRegister.class);
      service.registerPortletApplication(servletContext, portletApp, roles, portletAppName);
    } catch (Exception e) {
      log.error("Cannot deploy " + portletAppName, e);
    } finally {
      if (oldParser != null)
        System.setProperty("javax.xml.parsers.DocumentBuilderFactory", oldParser);
    }
  }

  /**
   * Overridden method.
   *
   * @param servletContextEvent servlet context event
   * @see javax.servlet.ServletContextListener#contextDestroyed(javax.servlet.ServletContextEvent)
   */
  public final void contextDestroyed(final ServletContextEvent servletContextEvent) {
    ServletContext servletContext = servletContextEvent.getServletContext();
    String portletAppName = getContextPath(servletContextEvent);
    ExoContainer manager = ExoContainerContext.getTopContainer();
    log.info("UNDEPLOY PORTLET APPLICATION: " + portletAppName);
    try {
      PortletApplicationRegister service = (PortletApplicationRegister) manager
          .getComponentInstanceOfType(PortletApplicationRegister.class);
      service.removePortletApplication(servletContext, portletAppName);
    } catch (Exception e) {
      log.error("UNDEPLOY PORTLET APPLICATION: " + e);
    }
  }

  /**
   * @param servletContextEvent servlet context event
   * @return context path
   */
  private String getContextPath(final ServletContextEvent servletContextEvent) {

    String portletAppName = null;
    try {
      portletAppName = (String) ServletContext.class.getMethod("getContextPath", new Class[0])
          .invoke(servletContextEvent.getServletContext(), new Class[0]);
      portletAppName = portletAppName.substring(portletAppName.lastIndexOf("/") + 1);
      return portletAppName;
    } catch (Exception e) {
      log
          .warn("Servlet api 2.4 or below detected. Unable to find method getContextPath on ServletContext.");
      //e.printStackTrace();
    }
    if (portletAppName == null)
      try {
        java.net.URL webXmlUrl = servletContextEvent.getServletContext().getResource(fileWebXML);
        portletAppName = webXmlUrl.toExternalForm();
        portletAppName = portletAppName.substring(0, portletAppName.indexOf(fileWebXML));
        int id = portletAppName.indexOf(".war");
        if (id > 0)
          portletAppName = portletAppName.substring(0, id);
        portletAppName = portletAppName.substring(portletAppName.lastIndexOf("/") + 1);
        return portletAppName;
      } catch (java.net.MalformedURLException e) {
        log.error("Erorr getting web.xml from ServletContext.");
        //e.printStackTrace();
      }
    return portletAppName;
  }

  /**
   * @param servletContext servlet context
   * @return version of portlet app
   */
  private String validationPortletXML(final ServletContext servletContext) {

    InputStream is = servletContext.getResourceAsStream(filePortletXML);
    if (is == null) {
      log.info("PORTLET CONFIGURATION IS NOT FOUND, IGNORE THE PACKAGE");
      return null;
    }
    try {
      is.close();
    } catch (IOException e) {
      log.error(e.getCause());
    }

    String specErr1 = null;
    String specErr2 = null;

    if (log.isDebugEnabled())
      log.debug("Defining portlet specification");
    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    StreamSource source = null;
    //      long time = java.lang.System.currentTimeMillis();
    try {
      if (log.isDebugEnabled())
        log.debug("validation 1-st portlet spec");
      source = new StreamSource(servletContext.getResourceAsStream(filePortletXML));
      SchemaFactory factory = SchemaFactory
          .newInstance(javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI);
      StreamSource schemaFile = new StreamSource(cl.getResourceAsStream("portlet-app_1_0.xsd"));
      factory.setResourceResolver(new PCResourceResolverImpl());
      Schema schema = factory.newSchema(schemaFile);
      Validator validator = schema.newValidator();
      validator.validate(source);
      return "1";
    } catch (SAXException e) {
      specErr1 = e.getMessage();
    } catch (IOException e) {
      specErr1 = e.getMessage();
    }
    //      System.out.println(java.lang.System.currentTimeMillis()-time + " - time 1-st portlet spec validation");
    //      time = java.lang.System.currentTimeMillis();
    try {
      if (log.isDebugEnabled())
        log.debug("validation 2-nd portlet spec");
      source = new StreamSource(servletContext.getResourceAsStream(filePortletXML));
      SchemaFactory factory = SchemaFactory
          .newInstance(javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI);
      StreamSource schemaFile = new StreamSource(cl.getResourceAsStream("portlet-app_2_0.xsd"));
      factory.setResourceResolver(new PCResourceResolverImpl());
      Schema schema = factory.newSchema(schemaFile);
      Validator validator = schema.newValidator();
      validator.validate(source);
      return "2";
    } catch (SAXException e) {
      specErr2 = e.getMessage();
    } catch (IOException e) {
      specErr2 = e.getMessage();
    }
    //      System.out.println(java.lang.System.currentTimeMillis()-time + " - time 2-nd portlet spec validation");

    if (log.isDebugEnabled())
      log.debug("Checking that was the error reason internet connection problem.");
    String errWithoutInet = "src-resolve: Cannot resolve the name 'xml:lang' to a(n) 'attribute declaration' component.";
    if (specErr1.contains(errWithoutInet) && specErr2.contains(errWithoutInet)) {
      log.info("Validation portlet.xml warning: please check your internet connection.");
      StringBuffer out = new StringBuffer();
      byte[] b = new byte[4096];
      try {
        is = servletContext.getResourceAsStream(filePortletXML);
        for (int n; (n = is.read(b)) != -1;)
          out.append(new String(b, 0, n));
        is.close();
      } catch (IOException e) {
        e.printStackTrace();
      }
      String str = out.toString();
      int i1 = str.indexOf("portlet-app");
      int i2 = str.indexOf(">", i1);
      String s = str.substring(i1, i2);
      int res1 = s.indexOf("portlet-app_1_0.xsd");
      if (res1 > 0)
        return "1";
      int res2 = s.indexOf("portlet-app_2_0.xsd");
      if (res2 > 0)
        return "2";
    }

    log.error("The portlet.xml doesn't valid portlet spec 1 and 2");
    if (specErr1 != null)
      log.error("Validation 1-st portlet spec: " + specErr1);
    if (specErr2 != null)
      log.error("Validation 2-nd portlet spec: " + specErr2);
    return null;
  }

  /**
   * Class to resolve resources.
   */
  class PCResourceResolverImpl implements LSResourceResolver {

    /**
     * Logger.
     */
    private final Log log = ExoLogger.getLogger("org.exoplatform.services.portletcontainer");

    /**
     * Simple constructor.
     */
    public PCResourceResolverImpl() {
    }

    /**
     * Overridden method.
     *
     * @param type type
     * @param namespaceURI namespace uri
     * @param publicId public id
     * @param systemId system id
     * @param baseURI base uri
     * @return ls input
     * @see org.w3c.dom.ls.LSResourceResolver#resolveResource(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
     */
    public final LSInput resolveResource(final String type, // 'http://www.w3.org/2001/XMLSchema'
        final String namespaceURI, // 'http://www.w3.org/XML/1998/namespace'
        final String publicId, // 'null'
        final String systemId, // 'http://www.w3.org/2001/xml.xsd' <- this one require for us
        final String baseURI) // 'null'
    {
      try {

        if (systemId.equals("http://www.w3.org/2001/xml.xsd";)) {
          // return a special input source for http://www.w3.org/2001/xml.xsd
          LSInput lsInput = new DOMInputImpl();
          InputStream is = null;
          ClassLoader cl = Thread.currentThread().getContextClassLoader();
          Collection c = Collections.list(cl.getResources(fileXMLXSD));
          Iterator i = c.iterator();
          while (i.hasNext()) {
            URL url = (URL) i.next();
            is = url.openStream();
            if (is != null) {
              if (log.isDebugEnabled())
                log.debug("Have got the : " + fileXMLXSD + ", url = " + url + ", key = "
                    + url.toString());
              break;
            }
          }
          lsInput.setByteStream(is);
          return lsInput;
        }

        if (systemId.equals("XMLSchema.dtd")) {
          // return a special input source for XMLSchema.dtd
          LSInput lsInput = new DOMInputImpl();
          InputStream is = null;
          ClassLoader cl = Thread.currentThread().getContextClassLoader();
          Collection c = Collections.list(cl.getResources(fileXMLSchemaDTD));
          Iterator i = c.iterator();
          while (i.hasNext()) {
            URL url = (URL) i.next();
            is = url.openStream();
            if (is != null) {
              if (log.isDebugEnabled())
                log.debug("Have got the : " + fileXMLSchemaDTD + ", url = " + url + ", key = "
                    + url.toString());
              break;
            }
          }
          lsInput.setByteStream(is);
          return lsInput;
        }

        if (systemId.equals("datatypes.dtd")) {
          // return a special input source for datatypes.dtd
          LSInput lsInput = new DOMInputImpl();
          InputStream is = null;
          ClassLoader cl = Thread.currentThread().getContextClassLoader();
          Collection c = Collections.list(cl.getResources(fileDatatypesDTD));
          Iterator i = c.iterator();
          while (i.hasNext()) {
            URL url = (URL) i.next();
            is = url.openStream();
            if (is != null) {
              if (log.isDebugEnabled())
                log.debug("Have got the : " + fileDatatypesDTD + ", url = " + url + ", key = "
                    + url.toString());
              break;
            }
          }
          lsInput.setByteStream(is);
          return lsInput;
        }

      } catch (Exception e) {
        System.out.println(e.getCause());
      }

      return null;
    }

  }

}
<project>
  <parent>
    <groupId>org.exoplatform.portletcontainer</groupId>
    <artifactId>config</artifactId>
    <version>trunk</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>exo.pc.component.plugins.pc</artifactId>
  <packaging>jar</packaging>
  <name>eXo Portlet Container 2 Plugins PC (actual impl)</name>
  <description>eXo Portlet Container 2 plugins.pc (actual impl)</description>

  <dependencies>

    <dependency>
      <groupId>org.exoplatform.portletcontainer</groupId>
      <artifactId>exo.pc.component.core</artifactId>
      <version>${org.exoplatform.pc.version}</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.exoplatform.kernel</groupId>
      <artifactId>exo.kernel.commons</artifactId>
      <version>${org.exoplatform.kernel.version}</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.exoplatform.kernel</groupId>
      <artifactId>exo.kernel.container</artifactId>
      <version>${org.exoplatform.kernel.version}</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.exoplatform.core</groupId>
      <artifactId>exo.core.component.xml-processing</artifactId>
      <version>${org.exoplatform.core.version}</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.exoplatform.kernel</groupId>
      <artifactId>exo.kernel.component.cache</artifactId>
      <version>${org.exoplatform.kernel.version}</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.exoplatform.core</groupId>
      <artifactId>exo.core.component.resources.api</artifactId>
      <version>${org.exoplatform.core.version}</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.exoplatform.core</groupId>
      <artifactId>exo.core.component.organization.api</artifactId>
      <version>${org.exoplatform.core.version}</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.exoplatform.core</groupId>
      <artifactId>exo.core.component.organization.jdbc</artifactId>
      <version>${org.exoplatform.core.version}</version>
      <scope>compile</scope>
    </dependency>

    <!-- *************************** -->

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jsp-api</artifactId>
      <version>2.0</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>2.8.1</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>javax.portlet</groupId>
      <artifactId>portlet-api</artifactId>
      <version>2.0</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>javax.ccpp</groupId>
      <artifactId>ccpp</artifactId>
      <version>1.0</version>
      <scope>compile</scope>
    </dependency>

    <!-- for javax.xml.bind.JAXBContext; -->

    <dependency>
      <groupId>javax.xml.bind</groupId>
      <artifactId>jaxb-api</artifactId>
      <version>2.0</version>
    </dependency>

    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-impl</artifactId>
      <version>2.0.2</version>
    </dependency>

    <dependency>
      <groupId>commons-pool</groupId>
      <artifactId>commons-pool</artifactId>
      <version>1.2</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <groupId>xml-apis</groupId>
          <artifactId>xml-apis</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>xml-apis</groupId>
      <artifactId>xml-apis</artifactId>
      <version>1.0.b2</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <properties>
    <war.dir>${basedir}/war_template</war.dir>
  </properties>

  <build>
    <plugins>

      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.2-SNAPSHOT</version>
        <executions>
          <execution>
            <phase>generate-test-sources</phase>
            <configuration>
              <tasks>
                <!-- JSR 168 portlets -->
                <mkdir dir="${basedir}/target/test-classes/" />
                <copy todir="${basedir}/target/test-classes/">
                  <fileset dir="${basedir}/war_template/src">
                    <include name="**/*.properties" />
                  </fileset>
                </copy>
                <javac
                  fork="true"
                  srcdir="${basedir}/war_template/src"
                  destdir="${basedir}/target/test-classes/"
                  debug="${maven.compile.debug}"
                  deprecation="${maven.compile.deprecation}"
                  optimize="${maven.compile.optimize}">
                  <classpath>
                    <path refid="maven.dependency.classpath" />
                    <pathelement path="${maven.build.dest}" />
                  </classpath>
                </javac>
                <!-- JSR 286 portlets -->
                <mkdir dir="${basedir}/target/test-classes/" />
                <copy todir="${basedir}/target/test-classes/">
                  <fileset dir="${basedir}/war_template2/src">
                    <include name="**/*.properties" />
                  </fileset>
                </copy>
                <javac
                  fork="true"
                  srcdir="${basedir}/war_template2/src"
                  destdir="${basedir}/target/test-classes/"
                  debug="${maven.compile.debug}"
                  deprecation="${maven.compile.deprecation}"
                  optimize="${maven.compile.optimize}">
                  <classpath>
                    <path refid="maven.dependency.classpath" />
                    <pathelement path="${maven.build.dest}" />
                  </classpath>
                </javac>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <systemProperties>
            <property>
              <name>testPath</name>
              <value>${basedir}</value>
            </property>
            <property>
              <name>mock.portal.dir</name>
              <value></value>
            </property>
            <property>
              <name>maven.exoplatform.dir</name>
              <value></value>
            </property>
            <property>
              <name>emma.coverage.out.file</name>
              <value>target/emma/coverage.ec</value>
            </property>
          </systemProperties>
          <includes>
            <include>**/AllTestsPortlet.java</include>
            <!-- include>**/TestFilters.java</include -->
            <!-- include>**/Test*.java</include -->
          </includes>
          <skip>false</skip>
        </configuration>
      </plugin>

    </plugins>
  </build>

</project>


<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 2006-2007, OW2 Consortium | contact | webmaster.