Using cactus with maven

Hello,

I know cactus have been moved to the Attic but my supervisor has given me the job to make he project work using this plugin with maven 3.0.3.

We are using Jenkins for CI and the idea is to run cactus from there (we already run junit tests as it’s possible to invoke top-level maven targets just writing the goals).

Right now I’m testing cactus with the project in which we run the junit tests (no worries, several VM’s and snapshots –and not touching the base project-  just in case I screw something). But here are several thing I don’t really understand. I’ll only write some questions and, if I get any feedback will go on with the questions:

- I’m using “mvn cactus:cactifyear” as the idea is to create an EAR and get it deployed in Websphere using WAS6 plugin for maven. The thing is I don’t really understand what does cactifyear do or how it works. I have no idea what to use as srcfile. Here you have what I have in my pom.xml:

<project>

   ...

    <dependencies>

        <dependency>

          <groupId>org.apache.cactus</groupId>

          <artifactId>cactus.integration.maven2</artifactId>

          <version>1.8.1</version>

        </dependency>

      ...

    </dependencies>

     ....

    <build>

       ...

        <pluginManagement>

           ...

            <plugin>

                <groupId>org.apache.cactus</groupId>

                <artifactId>cactus.integration.maven2</artifactId>

                <version>1.8.1</version>

                <configuration>

                   <srcFile>/PATH/TO/FILE/file.ear</srcFile>

                   <desttFile>cactifiedByMaven2.ear</destFile>

                   <cactusWar>

                       <context>/</context>

                       <version>2.3</version>

                   </cactusWar>

                </configuration>

                <executions>

                    <execution>

                      <id>cactus-cactifyear</id>

                       <phase>pre-integration-test</phase>

                       <goals>

                          <goal>cactifyear</goal>

                       </goals>

                    </execution>

                </executions>

            </plugin>

           ...

        </pluginManagement>

       ...

    </build>

    ...

</project>

 

For what is the /PATH/TO/FILE/file.ear used? I tried with one EAR in my project and got one cactifiedByMaven2.ear in each of the modules of my project plus one cactifiedByMaven2.ear and one empty folder named cactusAND_A_NUMBER.dir for each module in the project root directory. The output while running was something like this:

[INFO] Building application1 1.0-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- cactus.integration.maven2:1.8.1:cactifyear (default-cli) <at> my.company.application1 ---

[info] Adding: aspectjrt-1.5.3.jar

[info] Adding: cactus.core.framework.uberjar.javaEE.14-1.8.1.jar

[info] Adding: commons-logging-1.1.jar

[info] Adding: commons-httpclient-3.1.jar

[info] Adding: junit-3.8.2.jar

[INFO] Building war: /PROJECT/ROOT//DIRECTORY/application1/cactus892519517cactus.war

[INFO] Building ear: /PROJECT/ROOT//DIRECTORY/application1/cactifiedByMaven2.ear

[INFO]                                                                        

[INFO] ------------------------------------------------------------------------

[INFO] Building application2 1.0-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- cactus.integration.maven2:1.8.1:cactifyear (default-cli) <at> com.kana.sem.applications2 ---

[info] Adding: aspectjrt-1.5.3.jar

[info] Adding: cactus.core.framework.uberjar.javaEE.14-1.8.1.jar

[info] Adding: commons-logging-1.1.jar

[info] Adding: commons-httpclient-3.1.jar

[info] Adding: junit-3.8.2.jar

[INFO] Building war: /PROJECT/ROOT//DIRECTORY/application1/cactus892519517cactus.war

[INFO] Building ear: /PROJECT/ROOT//DIRECTORY/application1/cactifiedByMaven2.ear

[INFO]                                                                         

[INFO] ------------------------------------------------------------------------

[INFO] Building application3 1.0-SNAPSHOT

[INFO] ------------------------------------------------------------------------

 

The srcfile is like a schema to create an EAR for each module?

 

Thanks,

 JUAN JOSÉ ARAGONÉS

BUILD'N'RELEASE ENGINEER

e : jaragones <at> kana.com

EMEA Headquarters

209 Airport Road West
Belfast, Northern Ireland BT3 9EZ

SOLUTIONS | CASE STUDIES | KANA.COM | LAGAN.COM

The information in this email and any attachments is confidential and intended solely for the attention and use of the named addressee(s). It may be subject to legal, professional or other privilege and further distribution of it is strictly prohibited without our authority. If you are not the intended recipient, you are not authorized to and must not disclose, copy, distribute, or retain this message or any part of it, and should notify us immediately

 

Vinay Nagrik | 21 Nov 20:22
Picon

Failed to recognize cactifywar

Hello group,

I am working on cactus and running test remotely on TeamCity server.  I get
following errors.  Could someone please help me with these, so that I can
remove them and run my tests successfully.

BUILD FAILED
/homes/build-jmp/JMP/release-branches/R11.4/CEMS/buildSpace.xml:262: The
following error occurred while executing this line:
/homes/build-jmp/JMP/release-branches/R11.4/CEMS/remoteTestSetup.xml:131:
Problem: failed to create task or type cactifywar
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

--

-- 
Thanks

Nagrik
Vinay Nagrik | 18 Nov 23:04
Picon

failed to create cactify war

Hello group,

I am working on cactus and running test remotely on TeamCity server.  I get
following errors.  Could someone please help me with these, so that I can
remove them and run my tests successfully.

BUILD FAILED
/homes/build-jmp/JMP/release-branches/R11.4/CEMS/buildSpace.xml:262: The
following error occurred while executing this line:
/homes/build-jmp/JMP/release-branches/R11.4/CEMS/remoteTestSetup.xml:131:
Problem: failed to create task or type cactifywar
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

--

-- 
Thanks

Nagrik
Ramakrishna Dulam | 18 Oct 18:38

Need pointers on Cactus integration with Webshphere commerce server.

Hi,

 

I am using Cactus for the first time and finding it difficult for
setting up cactus and integrating with websphere commerce server.

Any pointers/documentation on the same will be very helpful.

 

Appreciate you help on this aspect.

 

Thanks,

Ram.



-----------------------------------------
This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or
entity to which it is addressed. If the reader of this e-mail is
not the intended recipient or his or her authorized agent, the
reader is hereby notified that any dissemination, distribution or
copying of this e-mail is prohibited. If you have received this
e-mail in error, please notify the sender by replying to this
message and delete this e-mail immediately.
Henri Yandell | 6 Aug 09:25
Picon

Jakarta Cactus moving to the Attic

A heads up for the Jakarta Cactus user community that the Cactus project has
been 'moved to the Attic'. This means that the Jakarta developers (more
formally its Project Management Committee) have voted to retire Cactus
and move the responsibility for its oversight over to the Attic project.

Loosely speaking this means that the projects resources will be moved to a
read-only state.

You can read more about the Apache Attic and the process of moving to the
Attic at http://attic.apache.org.

You can follow this process in JIRA:

  https://issues.apache.org/jira/browse/ATTIC-120

Thanks,

Henri Yandell on behalf of Jakarta Cactus + the Attic.
K Hein | 9 May 04:59
Picon

Cactus Ant Task - unable to look up data source

Hi everyone,

I am using Cactus Ant Task to execute the unit testing classes and I am
facing the problem with data source look up. The tests are failed with
exception saying unable to look up the data source. However, if I invoke the
tests from the browser manually, everything is fine and all the tests are
executed successfully. Does anyone have encounter this problem before? Could
anybody provide any solution. Thanks.

Regards,

Kyi Hein
Jakub 1983 | 21 Apr 14:47
Picon

tests in separate ear

Can test be put into separate ear, or they should be put in the same ear as
tested ejb3 ?

Can I access local session beans from separate ear (but deployed in the same
jboss) ?
Shay Thompson | 27 Feb 22:07
Picon
Favicon

Cactus issues with JBoss 5.1.0


Hi fellow Cactus users.  We've been using Cactus 1.7.2 running in JBoss 4.2.1 for a couple years now without
any problems.  We recently upgraded to JBoss 5.1.0 and now our ear is failing to deploy.  We use the Ant target
cactifyear to modify our product ear to include the cactus.war with our tests.  The ear deploys fine if we
don't cactify it.  We haven't changed anything with regards to cactus.

I was wondering if anyone else has moved to JBoss 5.1.0 and has some suggestions on steps I can take to get our
ear working?

Errors I see in the JBoss log:

2011-02-25 18:20:59,969 ERROR [org.apache.catalina.core.StandardContext] (main) Context
[/cactus] startup failed due to previous errors
java.lang.RuntimeException: could not find <ejb-local-ref>'s local interface
com.adobe.idp.um.businesslogic.directoryservices.DirectorySynchronizationManager in web.xml
of cactus.war
..
2011-02-25 18:20:59,969 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController]
(main) Error installing to Start: name=jboss.web.deployment:war=/cactus state=Create mode=Manual requiredState=Installed
org.jboss.deployers.spi.DeploymentException: URL
file:/C:/JBoss/jboss-eap-5.1/jboss-as/server/all/tmp/49w4e61-bha6j0-gklwl62p-1-gklwmczu-av/cactus.war/
deployment failed
..
2011-02-25 18:21:03,282 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController]
(main) Error installing to Real:
name=vfszip:/C:/JBoss/jboss-eap-5.1/jboss-as/server/all/deploy/TitanCactusTests_Platform.ear/
state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: URL
file:/C:/JBoss/jboss-eap-5.1/jboss-as/server/all/tmp/49w4e61-bha6j0-gklwl62p-1-gklwmczu-av/cactus.war/
deployment failed
..

Thanks for any assistance,
Shay

______________________________________________________________________________

Shay Thompson - Lead Computer Scientist
Adobe Systems, Inc. - AES Foundation

Matti Simperi | 18 Jan 15:19
Picon
Picon
Favicon

Problem with Cookie Manager: Not adding all cookies to next request

Hello!

I'm having a problem with cookie manager, which I can't understand. The
cookie manager is working well in all other situation, but once it is not
"parsing" all cookies for the next request. The only different I can see is
that that cookie is much longer then other cookies. I tried to change cookie
policies, but without any help. The only different is that this
missing cookie is set to different path then others. My next URL address is
still to that path.

Any ideas what could be the problem?

Best regards,
Matti

*Response from url X*

Response headers:
HTTP/1.1 302 Moved Temporarily
Date: Tue, 18 Jan 2011 14:10:57 GMT
Server: Apache-Coyote/1.1
Cache-Control: private
Cache-Control: no-cache
Cache-Control: no-store
Cache-Control: must-revalidate
Cache-Control: max-age=0
Pragma: no-cache
Expires: 0
Set-Cookie: uas.master=_8539ca8a89456809f7478481447a10bdca9faf8c; Path=/has;
Secure
Set-Cookie:
a3b51706c02ca92e=LQVEOrnybFdHdNaC43ozMdEKhbcIp8oRwUHL5LbpOHCTNbJhw4r0-O5UafBgWsE1FlQ0BfFRZNZvbGPXJLXqI5MPh94ilfcXG9s2GBv1TPzgLMO3o_mPx4uFgXAhW5bapeQH7Ufe5C2X47B_lr7Ww9DjKtvZbMky88PCtmjv99TSLlCxB-B5k-0dPXAqreje0Jaox9vHLD7YIAe-V-o_LmkgZVLNiG7iR4BnWrmW6VQAy02e-XakKKoPVxQSkCC6IOTlGvFnciC6xYsUkCxNS1Aeoil2nR6LfqnFJfJT3qNSG4TCKN1LpPUcLSoA2oK5f6p-Ej3l-HtKSbqf5I-INHtO2kpMWMPie-f6HSMx5_Pg2Rd1BP7rhM6eorMaU25VGy76l-FYsofr8GYs9H2ftp1zljJzPwL3H9DoVnELN5mKdHC3MOvhco-gsByOmGjzUNn-77umim2FbEn9INGtuS73oo2QZWv2Tk68JwMp_uG8mGLmpcS7xMbHj1_sahzLNULCRaXHh4JfVwXNKrro7YbFrFNeUyIgLQcbg3cyA_hXZLKlr0ygViZMgL_dP337DKit2oMm4dLI7t_6nNoDAlWEUzd8_lLjEZ0tBYqNLSrFTyJ37rU6-MP7Hy8pOy8cZ8SdeWEqYDVBS2PDilauFK_1luH7FtbCxKA7r7zlJA7jg_MFbIPcJcTx47p1-9VYmmlG8mn3KW_ff8B9h4MlTG2v5nCC2lanJxBHnHJEyK7XsyP6_6XJnFoCCcHjl57PaeVTB--lauumxMOto472SV7fokNgP5HLnpcftnPLa-AhdF-t8X5pfUpAOdKIv-eyxf2IkdM9I5V769ncdCBwegEplz02xdb6dUah2qgmr-eb2lkwo9B_SaYDMt0Rrk-r3XN4dW29HSMvChq2QovzEaE6C2Ll0OCz;
Path=/has/s2/a3b51706c02ca92e; Secure
Set-Cookie: JSESSIONID=C8FEC1DADA71CDA008A6B662B095A285; Path=/has; Secure
Location:
https://XXX.YYY/has/s2/a3b51706c02ca92e/select?method=password.sql.1
Content-Type: text/html;charset=utf-8
Content-Length: 0

*Request for url Y after url X*

GET https://XXX.YYY/has/s2/a3b51706c02ca92e/select?method=password.sql.1
Cookie Data:
$Version=0; has.master=_8539ca8a89456809f7478481447a10bdca9faf8c;
$Path=/has; JSESSIONID=C8FEC1DADA71CDA008A6B662B095A285; $Path=/has
---MISSING cookie "a3b51706c02ca92e"---

Request Headers:
Accept-Language: fi-FI,en-GB;q=0.7,en-US;q=0.3
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0;
SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media
Center PC 6.0; .NET CLR 1.1.4322; Tablet PC 2.0; MS-RTC LM 8)
Accept: */*
Pragma: no-cache
Jim Babka | 10 Nov 01:00
Picon
Favicon

Cactus tutorial needs updating

The Cactus tutorial needs to be updated. It talks about Tomcat 4 (which 
you can't even get anymore). The real issue, though, is it says this:

----------------------------
Copy the following jars to [tomcat-root]/common/lib: 
cactus.jar 
commons-httpclient.jar 
commons-logging.jar 
junit.jar 
aspectjrt.jar 
----------------------------

First, there is no common/lib directory in Tomcat 6, and second, those 
JARs do not exist in the Cactus 1.8.1 distribution. Here are the JARs that 
are there now:

aspectjrt-1.5.3.jar
cactus.core.framework.uberjar.javaEE.14-1.8.1.jar
cactus.integration.ant-1.8.1.jar
cactus.integration.shared.api-1.8.1.jar
cargo-ant-1.0-beta-2.jar
cargo-core-container-jonas-1.0-beta-2.jar
cargo-core-uberjar-1.0-beta-2.jar
commons-discovery-0.4.jar
commons-httpclient-3.1.jar
commons-logging-1.1.jar
geronimo-ejb_2.1_spec-1.1.jar
geronimo-j2ee-management_1.0_spec-1.1.jar
httpunit-1.6.jar
jasper-compiler-5.5.9.jar
jasper-runtime-5.5.9.jar
junit-3.8.2.jar
mx4j-3.0.2.jar
mx4j-remote-3.0.2.jar
nekohtml-1.9.6.jar
org.mortbay.jetty-5.1.9.jar
servlet-api-2.4.jar

I can guess the right JARs to use for everything but "cactus.jar". Can 
someone please explain what JARs are needed for Cactus now, and where they 
should go?

Jim Babka
Senior S/W Engineer and Team Lead, Context Aware Dynamic Selection
(512)286-5195, tie line 363-5195
babka at us.ibm.com
Cory Lum | 21 Oct 16:16
Picon

Cactus 1.8.0 & HttpComponents (HttpClient 4.0)

Hi,

I've upgraded to HttpComponents in my application http://hc.apache.org/ since
Commons HttpClient 3.x is nearing the end of life. All my cactus tests are
failing with the exception, java.lang.NoClassDefFoundError:
org/apache/commons/httpclient/HttpMethod. Is there a way to get cactus
running with HttpComponents?
I doubt it's safe to have both HttpComponents and HttpClient 3.x in my
classpath. Please help.

Thanks,
Cory

Gmane