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+servletto 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.woaI _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
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <!-- This web.xml file by itself will allow you to run the corresponding WebObjects application in a Servlet container. If you would like to merge the WebObjects application with your existing JSP/Servlet application, you have to merge this web.xml with your existing web.xml. NOTE: This file is normally included as the template file 'web.xml.template'. During the build process, the placeholders for WOROOT, LOCALROOT, WOAINSTALLROOT, WOAppMode, WOClassPath, WOApplicationClass and WOtaglib will be replaced with the appropriate values. Other parts of the template file may be customized as required. NOTE: WEBINFROOT is added to the WOClassPath at build time, but the replacement value is replaced at runtime to be the path to the WEB-INF directory. --> <web-app> <display-name>MavenWOApp</display-name> <context-param> <param-name>WOJarBundle</param-name> <param-value>YES</param-value> <description> Whether this app is a "true" WAR, rather than a "stub" WAR or SSDD Note that WOROOT, LOCALROOT, WOAINSTALLROOT, WOClassPath are ignored if this is true However, if this is true, WOMainBundle must be set to the main bundle name </description> </context-param> <context-param> <param-name>WOMainBundle</param-name> <param-value>MavenWOApp</param-value> <description> Sets the name of the main bundle. Only used if WOJarBundle is true </description> </context-param> <!-- Indicates if application is development or deployment mode. In development mode, images are vended by the application directly from frameworks. In deployment mode, images are vended by the webserver. --> <context-param> <param-name>WOAppMode</param-name> <param-value>development</param-value> </context-param> <!-- Class name of the WOApplication subclass that defines the WebObjects application. --> <context-param> <param-name>WOApplicationClass</param-name> <param-value> my.wo.tests.mavenwoapp.app.Application </param-value> </context-param> <!-- The WebObjects Servlet that interfaces between the Servlet container world and the WebObjects world. --> <servlet> <servlet-name>WOServletAdaptor</servlet-name> <servlet-class> er.extensions.jspservlet.ERXServletAdaptor </servlet-class> <load-on-startup>5</load-on-startup> </servlet> <!-- URLs starting with 'WebObjects' use the WebObjects Servlet adaptor. --> <servlet-mapping> <servlet-name>WOServletAdaptor</servlet-name> <url-pattern>/WebObjects/*</url-pattern> </servlet-mapping> </web-app>
build.properties
Description: Binary data
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>my.wo.tests</groupId> <artifactId>MavenWOApp</artifactId> <packaging>war</packaging> <version>0.0.1-SNAPSHOT</version> <name>MavenWOApp WebObjects App</name> <url>http://maven.apache.org</url> <properties> <woversion>5.4.3</woversion> </properties> <build> <finalName>MavenWOApp</finalName> <plugins> <plugin> <groupId>org.objectstyle.woproject.maven2</groupId> <artifactId>maven-wolifecycle-plugin</artifactId> <version>2.0.17-SNAPSHOT</version> <extensions>true</extensions> </plugin> <plugin> <artifactId>maven-war-plugin</artifactId> <configuration> <archiveClasses>true</archiveClasses> </configuration> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>com.webobjects</groupId> <artifactId>JavaFoundation</artifactId> </dependency> <dependency> <groupId>com.webobjects</groupId> <artifactId>JavaWebObjects</artifactId> </dependency> <dependency> <groupId>com.webobjects</groupId> <artifactId>JavaEOAccess</artifactId> </dependency> <dependency> <groupId>com.webobjects</groupId> <artifactId>JavaWOJSPServlet</artifactId> </dependency> <dependency> <groupId>wonder.core</groupId> <artifactId>ERExtensions</artifactId> </dependency> </dependencies> <dependencyManagement> <dependencies> <dependency> <groupId>com.webobjects</groupId> <artifactId>JavaFoundation</artifactId> <version>${woversion}</version> </dependency> <dependency> <groupId>com.webobjects</groupId> <artifactId>JavaWebObjects</artifactId> <version>${woversion}</version> </dependency> <dependency> <groupId>com.webobjects</groupId> <artifactId>JavaEOAccess</artifactId> <version>${woversion}</version> </dependency> <dependency> <groupId>com.webobjects</groupId> <artifactId>JavaWOJSPServlet</artifactId> <version>${woversion}</version> </dependency> <dependency> <groupId>wonder.core</groupId> <artifactId>ERExtensions</artifactId> <version>5.0.0-SNAPSHOT</version> </dependency> </dependencies> </dependencyManagement> </project>
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
