Re: wonder deployment in war
Re: wonder deployment in war
- Subject: Re: wonder deployment in war
- From: Henrique Prange <email@hidden>
- Date: Thu, 17 Jun 2010 17:10:02 -0300
Hi Laurent,
First of, attached is a sample project prepared to be deployed as true
WAR. Could you try to build and run it in your machine?
mvn clean jetty:run-war
And then try to open in your browser:
http://localhost:8080/sample-project/WebObjects/sample-project.woa
On 17/06/10 12:36, Cros Laurent wrote:
Hi henrique,
I think I need your help to create my war, I read the wiki you
wrote.
http://wiki.objectstyle.org/confluence/display/WOL/Packaging+WO+Applications+as+true+WAR+with+Maven
One thing strange is in the Step 3: Package your classes, resources
and webserver resources :
Yes. You have to package your resources as a JAR to deploy WO
applications as true WARs. And you are alrery doing this in your pom.xml
by adding the following configuration for the maven-war-plugin:
<archiveClasses>true</archiveClasses>
You seems to have your resources on src/main/resources … but when I
change the directories location :
[...]
And when I start my application in eclipse it says this not a valid
Wolips application ….
How did you create your project? Did you use one of the available
WOProject archetypes?
*Anyway I try to create my war with my pom :*
Here is my pom.xml
[...]
<dependency>
<artifactId>erxwo54</artifactId>
<groupId>wonder.core</groupId>
<classifier>wo54</classifier>
<version>5.0.0</version>
</dependency>
Weird. Why are you adding the above dependency in your pom.xml?
[...]
<plugin>
<artifactId>_maven_-war-_plugin_</artifactId>
<version>2.0</version>
This is a very old version of maven-war-plugin. Try using a newer one.
<configuration>
<archiveClasses>true</archiveClasses>
<warSourceDirectory></warSourceDirectory>
<webappDirectory>${_basedir_}/_src_/main/_webapp_/</webappDirectory>
<outputDirectory>${_basedir_}/target</outputDirectory>
<workDirectory>${_basedir_}/target/war/work</workDirectory>
<cacheFile>${_basedir_}/target/war/work/_webapp_-cache.xml</cacheFile>
<warName>_jcommops_-_ptf_-war</warName>
<webxml>${_basedir_}/_src_/main/_webapp_/WEB-INF/</webxml>
<webResources>
<resource>
<!-- this is relative to the pom.xml directory -->
<directory>${_basedir_}/_src_/main/resources</directory>
<directory>${_basedir_}/_src_/main/components</directory>
<directory>${_basedir_}/_src_/main/_webserver_-resources</directory>
</resource>
</webResources>
</configuration>
</plugin>
Take a look at the sample-project attached. You don't need all this
configuration.
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>_maven_-_jetty_-_plugin_</artifactId>
</plugin>
</plugins>
</build>
</project>
Any way I created my war
I started my application with a tomcat 6.0.26 on windows and when I am
trying to access the URL
http://localhost:8080/jcommops-ptf/WebObjects/jcommops-ptf.woa/
I join a creen capture my war exploded !
You are using Wonder, but you are not declaring a dependency to
ERServlet dependency. The ERServlet library contains the required
classes to initialize Wonder based applications correctly.
Cheers,
Henrique
Attachment:
sample-project.zip
Description: Zip archive
_______________________________________________
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