4 Replies Latest reply on Jun 11, 2008 4:40 PM by Chris Laprun

    Maven cmd to test PortletContainer2.0 portlets

    Seema Gupta Newbie

      Hello there,

      I have downloaded and compiled the PortletContainer2.0 from source using maven as per the command (mvn -Dmaven.test.skip=true install ) provided on the Wiki site : http://wiki.jboss.org/wiki/JBPC_Home.

      How do I run the test suite? What is the Maven command to do that?

      thank you.

        • 1. Re: Maven cmd to test PortletContainer2.0 portlets
          Chris Laprun Master

          The -Dmaven.skip.test=true option skips the tests (as its name implies). To run the testsuite, simply run: mvn install

          • 2. Re: Maven cmd to test PortletContainer2.0 portlets
            Seema Gupta Newbie

            thanks, but I need to provide the location of my JBoss App Server right (As I did not get the bundled container)?

            Here is the command that I'm using:

            mvn -e -Dvariable=C:\jboss-portal-2.6.4-From-src\jboss-4.2.2.GA\bin install

            I'm using Maven 2.0.7.

            The JBoss Wiki Site has following information to test the Portlet Container.


            Running the test suite
            Portlet Container comes with an extensive test suite that can run on JBoss AS 4.2.x and Tomcat 6.0.x. You will therefore need to have either of these servlet containers installed. The Portlet Container test suite will launch the tests on several different servlet containers at once depending on the status of several environment variables, which can be set or passed to Maven using the -Dvariable=value command line argument:
            


            Am I messing up with the maven basics? Can somebody please help?

            thank you.


            • 3. Re: Maven cmd to test PortletContainer2.0 portlets
              Seema Gupta Newbie

              This is the error i'm getting:

              C:\jboss-portletcontainer2.0\jboss-portletcontainer-2.0.0.CR2-src\portlet\src\main\java\org\jboss\portal\portlet\impl\jsr168\DispatchedHttpS
              ervletResponse.java:[283,23] [deprecation] encodeUrl(java.lang.String) in javax.servlet.http.HttpServletResponse has been deprecated
              
              C:\jboss-portletcontainer2.0\jboss-portletcontainer-2.0.0.CR2-src\portlet\src\main\java\org\jboss\portal\portlet\impl\info\ContainerInfoBuil
              der.java:[690,11] cannot find symbol
              symbol : class EventDefinitionReferenceMetaData
              location: class org.jboss.portal.portlet.impl.info.ContainerInfoBuilder
              
              C:\jboss-portletcontainer2.0\jboss-portletcontainer-2.0.0.CR2-src\portlet\src\main\java\org\jboss\portal\portlet\impl\info\ContainerInfoBuil
              der.java:[708,11] cannot find symbol
              symbol : class EventDefinitionReferenceMetaData
              location: class org.jboss.portal.portlet.impl.info.ContainerInfoBuilder
              
              C:\jboss-portletcontainer2.0\jboss-portletcontainer-2.0.0.CR2-src\portlet\src\main\java\org\jboss\portal\portlet\impl\container\PortletAppli
              cationLifeCycle.java:[89,11] cannot find symbol
              symbol : variable NullManagedObjectRegistryEventListener
              location: class org.jboss.portal.portlet.impl.container.PortletApplicationLifeCycle
              
              C:\jboss-portletcontainer2.0\jboss-portletcontainer-2.0.0.CR2-src\portlet\src\main\java\org\jboss\portal\portlet\aspects\portlet\SecureTrans
              portInterceptor.java:[73,20] cannot find symbol
              symbol : class InsufficientTransportGuaranteeResponse
              location: class org.jboss.portal.portlet.aspects.portlet.SecureTransportInterceptor
              
              
              [INFO] ------------------------------------------------------------------------
              [INFO] Trace
              org.apache.maven.BuildFailureException: Compilation failure
               at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:560)
               at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
               at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
               at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
               at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
               at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
               at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
               at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
               at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:585)
               at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
               at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
               at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
               at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
              Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
               at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516)
               at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
               at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
               at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
               ... 16 more
              [INFO] ------------------------------------------------------------------------
              [INFO] Total time: 10 seconds
              [INFO] Finished at: Wed Jun 11 10:31:29 PDT 2008
              [INFO] Final Memory: 16M/39M
              [INFO] ------------------------------------------------------------------------
              


              • 4. Re: Maven cmd to test PortletContainer2.0 portlets
                Chris Laprun Master

                The easiest way is to set the JBOSS_HOME variable in your shell environment to point to your JBoss home directory, not bin.