Vincent,
Thanks for the quick turnaround.
I added some logic to the maven plugin to push the
cactus.weblogic7x.config property to ant:
RCS file: /home/cvspublic/jakarta-cactus/integration/maven/plugin.jelly,v
retrieving revision 1.9
diff -w -r1.9 plugin.jelly
386a387,389
> <j:if test="${context.getVariable('cactus.weblogic7x.config')
!= null}">
> <ant:setProperty name="configxml"
value="${cactus.weblogic7x.config}"/>
> </j:if>
581a585,587
> <j:if test="${context.getVariable('cactus.weblogic7x.config')
!= null}">
> <ant:setProperty name="configxml"
value="${cactus.weblogic7x.config}"/>
> </j:if>
715a722,724
> <j:if test="${context.getVariable('cactus.weblogic7x.config')
!= null}">
> <ant:setProperty name="configxml"
value="${cactus.weblogic7x.config}"/>
> </j:if>
894a904,906
> <j:if test="${context.getVariable('cactus.weblogic7x.config')
!= null}">
> <ant:setProperty name="configxml"
value="${cactus.weblogic7x.config}"/>
> </j:if>
Enhancement idea:
The integration/ant tools do token replacement on the
config.xml/serverl.xml files if you use the default configs. However if
you override, you lose that benefit. It would be cool if the override file
could still be run through the filter.
Testing:
Running maven cactus:test-ear now uses the override config.xml and my ear
deploys successfully. I'm currently running into the java.lang.VerifyError
that is mentioned in a previous post. I'm wondering if that was ever
resolved. I've tried building my own cactus-13 cactus-ant-13 and
building/installing the plugin off of those. Everything looks in synch in
my local repo. I'm running jdk1.4, but hopefully that's not the issue.
One oddity I noticed is that the war that is being created has all of the
ejb class files under WEB-INF/classes. Seems like class files that are in
the ejb-jar should not be in the war.
I'll take a look at the automagic stuff once I get the test running...
Happy New Year,
Tony
"Vincent Massol" <[EMAIL PROTECTED]>
12/30/2003 03:04 AM
To: "'Cactus Users List'" <[EMAIL PROTECTED]>
cc: "'Tony Czupryna'" <[EMAIL PROTECTED]>
Subject: RE: Maven-Cactus Plugin EJB testing
Hi Tony,
Note: I'm responding to the cactus user list (please use this list for
anything related to Cactus).
See embedded.
-----Original Message-----
From: Tony Czupryna [mailto:[EMAIL PROTECTED]
Sent: 30 December 2003 01:03
To: [EMAIL PROTECTED]
Subject: Maven-Cactus Plugin EJB testing
Vincent,
I have a few questions about the maven cactus plugin. It seems like you
are the appropriate person to ask since you do most of the checkins. If
you have some time, your help would be greatly appreciated.
I've got the latest from tip and am trying to integrate with our source to
do a cactus:test-ear. Currently we're trying to test an ejb project (no
war) with weblogic8. I believe the weblogic7 tools will work fine.
I noticed that tomcat and resin have a mechanism to override the
config.xml/server.xml. Is there a way to do something similar for
weblogic? I need to add some db connection pools to the test server in
order to deploy the ejbs. There may already be a way to do this that is
eluding me.
Yeah. It was missing (there was a bug report for this item:
http://issues.apache.org/bugzilla/show_bug.cgi?id=23016). I've just committed a fix
for you in CVS. There's now a new configXml
attribute for the <weblogic7x> container.
Also, in trying to mavenize some of our projects, we are breaking them
down by ejb, war, and ear. Maven has a way to specify in
project.properties (maven.multiproject.type) and I believe they are
planning on adding something to pom 4 where you specify if a particular
sub-project is a jar/ejb/war/ear.
Yep, that is true. Actually, I proposed the new <type> element in POM v4
(and I've already implemented it in Maven CVS HEAD) J
It would be great if the cactus plugin could automagically run the
appropriate cactus tests on a subproject based on that same property. With
this property it should be possible to kick off cactus:test-XXX based on
the type. An ejb type would trigger a cactified ear to be built and an war
type would trigger a cactified war.
Good idea. Could you please add a bug request for this feature so that we
don't forget it? (even better would be a patch of course ;-)).
There seems to be an extra '=' in the weblogic startup call. It's in the
java.security.policy property. It doesn't seem to break anything however.
I just noticed it when the lack of the connection pool was causing ejbs to
not deploy:
RCS file:
/home/cvspublic/jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/container/weblogic/WebLogic7xContainer.java,v
retrieving revision 1.10
diff -w -r1.10 WebLogic7xContainer.java
217c217
< "=./server/lib/weblogic.policy"));
---
> "./server/lib/weblogic.policy"));
Hmm? I believe it's ok. I've added the following comment to the source:
// Note: The "=" in the call below is on purpose. It is left so that
// we end up with:
// -Djava.security.policy==./server/lib/weblogic.policy
// (otherwise, we would end up with:
// -Djava.security.policy=./server/lib/weblogic.policy, which
// will not add to the security policy but instead replace it).
java.addSysproperty(
createSysProperty("java.security.policy",
"=./server/lib/weblogic.policy"));
Let me know if it makes sense.
If you'd could use a hand writing and testing weblogic specific stuff I've
got some time. If you just want me to throw some enhancement requests in
bugzilla that's cool too. If you'd like to chat sometime I've got AIM and
Yahoo. I've only been working with Maven for a couple of weeks but I'm
pretty comfortable with it. It is suprising I haven't jumped out the
window yet though. I should have read all the known bugs before
starting...
Hey that's cool. Of course we always need help! J Implementing the Maven automagic
feature would be quite nice (that could
be the default behavior for cactus:test).
I'll create a nightly build of Cactus tonight if you wish to test the
configXml change (I could not test it as my WL 7.x license has expired).
Thanks
-Vincent
________________________
Tony Czupryna
Orbitz, Inc
(312) 894-4820