AW: Using cactus with maven

<[email protected]> Tue, 20 Dec 2011 14:21:08 +0100
Newsgroups gmane.comp.jakarta.cactus.user
Message-ID <864A0E3D60C29349BA08BF1B2B1050CFE75BCAC3E2@HE111489.emea1.cds.t-internal.com>
Hello

Your console output shows three EARs being built (application 1 - 3). So I =
assume you have set up a multi module build. Therefore I would guess you ha=
ve something like three <module> sections in your POM. These <module> secti=
ons are the EAR specific parts I was talking of.

Make sure you clearly understand the difference between <pluginManagement> =
and <plugin>. Module specific parts should go in a <plugin> section under <=
module>.

If you need some explanation on this, there is a free online Maven book cal=
led "Maven: The Complete Reference".


Best regards
Christian Schima


-----Urspr=FCngliche Nachricht-----
Von: Juan Jose Aragones Guillen [mailto:[email protected]]=20
Gesendet: Dienstag, 20. Dezember 2011 13:10
An: Cactus Users List
Betreff: RE: Using cactus with maven

Hello
Thanks for answering. I understand everything but the last part. EAR specif=
ic sections of my POM? Don't have any. Can you put an example (or a link to=
 one)? Also if you can which section should they go in...

Thanks,=20
=A0JUAN JOS=C9 ARAGON=C9S
BUILD'N'RELEASE ENGINEER
e : [email protected]
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 inten=
ded solely for the attention and use of the named addressee(s). It may be s=
ubject to legal, professional or other privilege and further distribution o=
f it is strictly prohibited without our authority. If you are not the inten=
ded recipient, you are not authorized to and must not disclose, copy, distr=
ibute, or retain this message or any part of it, and should notify us immed=
iately

-----Original Message-----
From: [email protected] [mailto:[email protected]=
]=20
Sent: 20 December 2011 12:04
To: [email protected]
Subject: AW: Using cactus with maven

Hello

When you declare your cactus.integration.maven2 plugin in the section <plug=
inManagement>  this declaration is valid for all spots in your POM where yo=
u reference this declared plugin.

Since you have included the <configuration> in the <pluginManagement> secti=
on, this configuration is used everywhere in your POM unless you overwrite =
it (obviously you haven't).

This means each of your EAR builds is using the same Cactus plugin <configu=
ration> and therefore processes the same EAR file.

The solution would be to move the <configuration> section of your cactus pl=
ugin in the EAR specific sections of your POM. Only keep the general aspect=
s of your cactus plugin in the <pluginManagement> section.


Best regards
Christian Schima

________________________________
Von: Juan Jose Aragones Guillen [mailto:[email protected]]
Gesendet: Dienstag, 20. Dezember 2011 12:36
An: [email protected]
Betreff: Using cactus with maven

Hello,
I know cactus have been moved to the Attic but my supervisor has given me t=
he 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 al=
ready run junit tests as it's possible to invoke top-level maven targets ju=
st writing the goals).
Right now I'm testing cactus with the project in which we run the junit tes=
ts (no worries, several VM's and snapshots -and not touching the base proje=
ct-  just in case I screw something). But here are several thing I don't re=
ally 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 pro=
ject and got one cactifiedByMaven2.ear in each of the modules of my project=
 plus one cactifiedByMaven2.ear and one empty folder named cactusAND_A_NUMB=
ER.dir for each module in the project root directory. The output while runn=
ing was something like this:
[INFO] Building application1 1.0-SNAPSHOT
[INFO] --------------------------------------------------------------------=
----
[INFO]
[INFO] --- cactus.integration.maven2:1.8.1:cactifyear (default-cli) @ my.co=
mpany.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/cactus892519517c=
actus.war
[INFO] Building ear: /PROJECT/ROOT//DIRECTORY/application1/cactifiedByMaven=
2.ear
[INFO]
[INFO] --------------------------------------------------------------------=
----
[INFO] Building application2 1.0-SNAPSHOT
[INFO] --------------------------------------------------------------------=
----
[INFO]
[INFO] --- cactus.integration.maven2:1.8.1:cactifyear (default-cli) @ com.k=
ana.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/cactus892519517c=
actus.war
[INFO] Building ear: /PROJECT/ROOT//DIRECTORY/application1/cactifiedByMaven=
2.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=C9 ARAGON=C9S

[Lagan]<http://www.lagan.com/>BUILD'N'RELEASE ENGINEER

e : [email protected]<mailto:[email protected]>

EMEA Headquarters
209 Airport Road West
Belfast, Northern Ireland BT3 9EZ


SOLUTIONS<http://www.lagan.com/our-solutions.aspx> | CASE STUDIES<http://ww=
w.lagan.com/resource-library.aspx> | KANA.COM<http://www.kana.com/home/home=
.php> | LAGAN.COM<http://www.lagan.com/>

[cid:[email protected]]<http://www.lagan.com/rss/feeds.aspx>

[cid:[email protected]]<http://www.facebook.com/home.php#%21/p=
ages/Lagan-Technologies/174507632593437>

[cid:[email protected]]<http://www.twitter.com/lagan_business>

[cid:[email protected]]<http://www.linkedin.com/companies/laga=
n-technologies>



The information in this email and any attachments is confidential and inten=
ded solely for the attention and use of the named addressee(s). It may be s=
ubject to legal, professional or other privilege and further distribution o=
f it is strictly prohibited without our authority. If you are not the inten=
ded recipient, you are not authorized to and must not disclose, copy, distr=
ibute, or retain this message or any part of it, and should notify us immed=
iately


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]