Changes for page Packaging WO Applications as true WAR with Maven
Last modified by Ulrich Köster on 2009/08/02 20:26
From version 11.1
edited by Henrique Prange
on 2008/05/15 19:29
on 2008/05/15 19:29
Change comment:
There is no comment for this version
To version 20.1
edited by Greg.Brown
on 2009/08/02 18:21
on 2009/08/02 18:21
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. hprange1 +XWiki.gbrown - Content
-
... ... @@ -33,6 +33,8 @@ 33 33 34 34 <build> 35 35 ... 36 + <plugins> 37 + ... 36 36 <plugin> 37 37 <artifactId>maven-war-plugin</artifactId> 38 38 <configuration> ... ... @@ -40,6 +40,8 @@ 40 40 </configuration> 41 41 </plugin> 42 42 ... 45 + </plugins> 46 + ... 43 43 </build> 44 44 45 45 {{/noformat}} ... ... @@ -51,7 +51,7 @@ 51 51 {{noformat}} 52 52 53 53 <dependency> 54 - <groupId>com. apple.webobjects</groupId>58 + <groupId>com.webobjects</groupId> 55 55 <artifactId>JavaWOJSPServlet</artifactId> 56 56 <version>${woversion}</version> 57 57 </dependency> ... ... @@ -63,7 +63,7 @@ 63 63 {{noformat}} 64 64 65 65 <dependency> 66 - <groupId>com. apple.webobjects</groupId>70 + <groupId>com.webobjects</groupId> 67 67 <artifactId>JavaWOJSPServlet_client</artifactId> 68 68 <version>${woversion}</version> 69 69 </dependency> ... ... @@ -74,7 +74,7 @@ 74 74 75 75 == Step 5: Change the packaging type == 76 76 77 -The default maven-war-plugin can handle the war packaging correctly. You have to change the packaging of your POM to 'war' in order to use this plug-in: 81 +The default [[maven-war-plugin>>http://maven.apache.org/plugins/maven-war-plugin/]] can handle the war packaging correctly. You have to change the packaging of your POM to 'war' in order to use this plug-in: 78 78 79 79 {{noformat}} 80 80 ... ... @@ -84,9 +84,49 @@ 84 84 85 85 It's done. 86 86 91 +{{panel title="2009 Bug Warning" borderStyle="dashed" borderColor="#ccc" titleBGColor="#F7D6C1" bgColor="#FFFFCE"}} 92 + 93 +It should be done, but... 94 +The 2.0.17 archetype does not add : 95 +{noformat} 96 + <resource> 97 + <targetPath>Resources</targetPath> 98 + <directory>${basedir}/src/main/components</directory> 99 + </resource> 100 + <resource> 101 + <targetPath>WebServerResources</targetPath> 102 + <directory>${basedir}/src/main/webserver-resources</directory> 103 + </resource> 104 +{noformat} 105 +to the pom.xml file, so your war will have no components; you should add these lines. 106 + 107 +Also, it does not add a necessary WebObjects 5.3 dependency and, if using Wonder, the ERServlet.jar: 108 +{noformat} 109 + <dependency> 110 + <groupId>${webobjects.groupId}</groupId> 111 + <artifactId>JavaWOJSPServlet_client 112 + </artifactId> 113 + <version>${webobjects.version}</version> 114 + </dependency> 115 + <dependency> 116 + <groupId>wonder.core</groupId> 117 + <artifactId>ERServlet</artifactId> 118 + <version>1.0</version> 119 + </dependency> 120 +{noformat} 121 +So, you may need to add that. 122 + 123 +In addition, the archetype generated Info.plist needs fixing, as does the web.xml in the WEB-INF folder. There are values in these files like $\{project.artifactId\}, but for now, you must manually replace those values with actual values, e.g, MyProject. 124 + 125 +These probably will be fixed in the next release of plugins, but for now, watch this space, as there may be additional 126 +bugs posted here. 127 + 128 + 129 +{{/panel}} 130 + 87 87 = Running your application as true WAR = 88 88 89 -You can use the maven-jetty-plugin to run and test your application. 133 +You can use the [[maven-jetty-plugin>>http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin]] to run and test your application. 90 90 91 91 == Step 1: Configure the maven-jetty-plugin == 92 92