• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Maven, War and Wonder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Maven, War and Wonder


  • Subject: Re: Maven, War and Wonder
  • From: Lachlan Deck <email@hidden>
  • Date: Tue, 27 Jan 2009 09:04:37 +1100

Hi Henrique,

are you able to share your experiences with wars? I'm not familiar with this.

On 27/01/2009, at 7:38 AM, William Hatch wrote:

On Jan 26, 2009, at 8:15 AM, Lachlan Deck wrote:

Just testing this, it appears you might need to configure the pom for the resources:
<packaging>war</packaging>
<build>
<finalName>MavenWOApp</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*</include>
</includes>
</resource>
<resource>
<directory>src/main/components</directory>
<includes>
<include>**/*.wo/**/*</include>
<include>**/*.api</include>
</includes>
</resource>
</resources>

OK, I did this and now the resources are showing up in top level of the built app jar; the properties files also. But, the app is still trying to connect to an app named JavaWebObjects, so it's thinking the url is:


http://localhost/MWWTest/WebObjects/JavaWebObjects.woa

So, wrong name and it's looking for a built .woa which also isn't there. Hmmm....

Looking at the catalina logs on start up, I came across this interesting line:

Jan 26 15:03:33 JavaWebObjects[-1] (ERXFileUtilities.java:540) WARN er.extensions.foundation.ERXFileUtilities - Can't get path when run as jar: app - Properties.bill

Perhaps part of this is due to Wonder not being able to correctly initialize on start up due to not being able to reach the Properties file? Pure speculation on my part; perhaps somebody else may know better. I'll post a separate question on the wonder list.

So I guess the lesson here is that the default war packaging plug in doesn't work correctly for WO apps. Bummer.

Any idea on how I can make this part of my own Viet Nam by contributing towards fixing it? I'd be happy to, and I understand it's not a top priority for most WO people. I'm really liking Maven over all, especially with all the nice possible integrations such as Hudson and Nexus. Thanks Lachlan.





I'm not getting anything under WEB-INF that I'd expect, including the app.woa, which would normally contain the contents and resources stuff;

If the default output dir isn't correct for servlets then configure that also for each resource above also.


all I'm seeing is a lib directory LICENSE, classes (file) and web.xml. Nothing from the resources directory under src/main/ resources is included either.

See above. After building - check the contents of lib/ YourProject.jar OR set <archiveClasses>false</archiveClasses>.


Let me know how you get on...

Can anybody confirm that they're able to build a useable war using the new plug in? Thanks

included from my earlier reply as I'd incorrectly stated I was using the original woapplication-archetype plug in. These are two different plug ins, correct?

Sorry, I incorrectly referred to the woapplication-archetype; I'm actually using the newer maven-wolifecycle-plugin. To restate the essence of the original question, I'm trying to determine how properties possibly required by maven or one of the plugs ins should be set as I'm having one problem with getting the app to resolve to the proper jar within the built war. And another issue is that none of the original Properties files, containing stuff required by Wonder and a whole lot more, are now included in the war built by maven. I would think this is something simple and obvious... please please tell me that's the case;-) So, anybody know how we're supposed to make this happen? Thanks.



Bill



On Jan 25, 2009, at 9:47 PM, Lachlan Deck wrote:

On 26/01/2009, at 6:41 AM, William Hatch wrote:

Using latest Eclipse, WOLips (largely irrelevant here), the woapplication-archetype and the m2Eclipse plug in, I'm able to easily create wo apps, set them up for war packaging, get them to build and install into the local maven repos. So, experimenting with the next steps, decided to try automating the deployment to my local tomcat using the cargo plug in. I had to follow the instructions here:

http://wiki.objectstyle.org/confluence/display/WONDER/Creating+a+wonder+app+to+deploy+as+a+servlet

to create the subclass of ERXServletAdaptor in order to avoid the dreaded WOServletAdaptor not found exception, but then I get another exception as the generated classpath seems to be pointing to an app named "JavaWebObjects" and not my app, although the first part of the url (context path) is correct, so it's trying to find components and other resources using this url:

http://localhost/MWWTest/WebObjects/JavaWebObjects.woa

I _think that build.properties used to have all this stuff, but now that I'm not using ant here how do I convey the right properties values in this environment?

afaik the woproject-maven plugin still uses the build.properties. I've attached what I get when creating a new app.


Where should I put them, and what should they be called? Thanks.

Disclaimer: I don't currently deploy to servlets - but I'd suggest checking the resulting web.xml.


with regards,
--

Lachlan Deck


<web.xml><build.properties><pom.xml>



with regards, --

Lachlan Deck





with regards, --

Lachlan Deck



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Maven, War and Wonder (From: William Hatch <email@hidden>)
 >Re: Maven, War and Wonder (From: Lachlan Deck <email@hidden>)
 >Re: Maven, War and Wonder (From: William Hatch <email@hidden>)
 >Re: Maven, War and Wonder (From: Lachlan Deck <email@hidden>)
 >Re: Maven, War and Wonder (From: William Hatch <email@hidden>)

  • Prev by Date: Re: Sometime WebObjects drives me a little crazy!
  • Next by Date: Re: Sometime WebObjects drives me a little crazy!
  • Previous by thread: Re: Maven, War and Wonder
  • Next by thread: ERXRssPage
  • Index(es):
    • Date
    • Thread