Loading...

cactus-user@jakarta.apache.org

[Prev] Thread [Next]  |  [Prev] Date [Next]

AW: Using cactus with maven Christian.Schima Tue Jan 31 18:01:12 2012

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 have 
something like three <module> sections in your POM. These <module> sections 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 called 
"Maven: The Complete Reference".


Best regards
Christian Schima


-----Ursprüngliche Nachricht-----
Von: Juan Jose Aragones Guillen [mailto:[EMAIL PROTECTED] 
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 specific 
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, 
 JUAN JOSÉ ARAGONÉS
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 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

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
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 
<pluginManagement>  this declaration is valid for all spots in your POM where 
you reference this declared plugin.

Since you have included the <configuration> in the <pluginManagement> section, 
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 
<configuration> and therefore processes the same EAR file.

The solution would be to move the <configuration> section of your cactus plugin 
in the EAR specific sections of your POM. Only keep the general aspects 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 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) @ 
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) @ 
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

[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://www.lagan.com/resource-library.aspx> | 
KANA.COM<http://www.kana.com/home/home.php> | LAGAN.COM<http://www.lagan.com/>

[cid:image002.gif@01CCBF05.6053FB40]<http://www.lagan.com/rss/feeds.aspx>

[cid:image003.gif@01CCBF05.6053FB40]<http://www.facebook.com/home.php#%21/pages/Lagan-Technologies/174507632593437>

[cid:image004.gif@01CCBF05.6053FB40]<http://www.twitter.com/lagan_business>

[cid:image005.gif@01CCBF05.6053FB40]<http://www.linkedin.com/companies/lagan-technologies>



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]