Last modified by Lachlan Deck on 2009/03/24 19:05

From version 60.1
edited by Lachlan Deck
on 2009/03/24 19:05
Change comment: Migrated to Confluence 4.0
To version 59.1
edited by Ulrich Köster
on 2007/02/09 09:31
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.ldeck
1 +XWiki.uli
Content
... ... @@ -1,89 +1,40 @@
1 -Building instructions are in the file BUILD.txt at the top level of the svn checkout.
1 +Steps 1-4 are required only once.
2 2  
3 -[[https:~~/~~/wonder.svn.sourceforge.net/svnroot/wonder/trunk/Wonder/BUILD.txt>>url:https://wonder.svn.sourceforge.net/svnroot/wonder/trunk/Wonder/BUILD.txt||rel="nofollow" shape="rect" class="external-link"]]
3 +~1. Install maven http:~/~/maven.apache.org
4 +
5 +2. Open a terminal and cd into the wonder root directory.
4 4  
5 -{{note}}
6 -These Maven built directory frameworks are slightly different than the ant built directory frameworks. For example, the Ajax framework has dependencies on json, and the ant built Ajax.framework includes a jabsorb-1.2.2.jar, whereas the Maven built Ajax.framework does not include this jabsorb-1.2.2.jar. This is, of course, because Maven dependencies are detailed in the pom.xml, and will be pulled in via standard Maven mechanisms. The frameworks are not interchangeable~-~-at least without manipulating dependencies. There are also a different number of frameworks.
7 -{{/note}}
7 +3. Import the webobjects frameworks as jars into the local repository:
8 +mvn ---non--recursive org.objectstyle.woproject.maven2.wobootstrap:bootstrap
8 8  
9 -Currently (February 2009) the wonder frameworks, applications, etc, can be built for WebObjects 5.3.x or 5.4.x; the choice is made by using a "profile" which has the value of wo53 or wo54, e.g.:
10 +4. Import some jars into the local maven repository:
10 10  
11 -{{code}}
12 +mvn install:install-file --DgroupId=icu4j --DartifactId=icu4j --\
13 +Dversion=2.8 --Dpackaging=jar --Dfile=Common/Frameworks/ERJars/\
14 +Libraries/icu4j//2//8.jar--
12 12  
13 - mvn clean install -P wo54
16 +mvn install:install-file --DgroupId=javax --DartifactId=mailapi --\
17 +Dversion=1.1 --Dpackaging=jar --Dfile=Common/Frameworks/ERJavaMail/\
18 +Libraries/mailapi.jar--
14 14  
15 -{{/code}}
20 +mvn install:install-file --DgroupId=javax --DartifactId=activation --\
21 +Dversion=1.0.2 --Dpackaging=jar --Dfile=Common/Frameworks/ERJavaMail/\
22 +Libraries/activation--1.0.2.jar
16 16  
17 -This installs NSJarBundle frameworks for WebObjects 5.4.x into your ~~/.m2/repository. The frameworks for which the profile, or classifier, was relevant, will appear in your local repository with the profile suffix:
24 +mvn install:install-file --DgroupId=javax --DartifactId=mail --\
25 +Dversion=1.3 --Dpackaging=jar \
26 +Libraries/mail-1.3.jar
18 18  
19 -{{code}}
28 +mvn install:install-file --DgroupId=jndi --DartifactId=jndi --\
29 +Dversion=1.2.1 --Dpackaging=jar --Dfile=Common/Frameworks/\
30 +ERChangeNotificationJMS/Libraries/jndi//1.2.1.jar//--
20 20  
21 -./repository/wonder/core/ERExtensions/5.0.0-SNAPSHOT/ERExtensions-5.0.0-SNAPSHOT-wo54.jar
32 +mvn install:install-file --DgroupId=jms --DartifactId=jms --\
33 +Dversion=1.0.2 --Dpackaging=jar --Dfile=Common/Frameworks/\
34 +ERChangeNotificationJMS/Libraries/jms//1.0.2a.jar//--
22 22  
23 -{{/code}}
36 +mvn install:install-file --DgroupId=metaparadigm --DartifactId=jsonrpc \
37 +--Dversion=1.0 --Dpackaging=jar --Dfile=Ajax/Ajax/Libraries/jsonrpc.jar--
24 24  
25 -Note: currently the only frameworks that make use of the classifier, having differing classes and resources for them, are ERExtensions and WOOgnl.
26 -
27 -So, in your project for both ERExtensions and WOOgnl you'll need to define these as dependencies in the following form:
28 -
29 -{{code 0="xml"}}
30 -
31 -<dependency>
32 - <artifactId>Foo</artifactId>
33 - <groupId>wonder.core</groupId>
34 - <classifier>bar</classifier>
35 - <version>baz</version>
36 -</dependency>
37 -
38 -{{/code}}
39 -
40 -Where //Foo// is either ERExtensions or WOOgnl, //bar// is either wo53, wo54, or wo55 etc, and //baz// is either 5.0.0-SNAPSHOT or some fixed release version.
41 -
42 -For all other wonder frameworks you either leave out the classifier definition or leave it blank. Here's a complete example showing the two frameworks that require a classifier in the dependency declaration together with another that doesn't.
43 -
44 -{{code 0="xml"}}
45 -<dependencies>
46 - <dependency>
47 - <artifactId>ERExtensions</artifactId>
48 - <groupId>wonder.core</groupId>
49 - <classifier>wo54</classifier>
50 - <version>5.0.0-SNAPSHOT</version>
51 - </dependency>
52 - <dependency>
53 - <artifactId>WOOgnl</artifactId>
54 - <groupId>wonder.core</groupId>
55 - <classifier>wo54</classifier>
56 - <version>5.0.0-SNAPSHOT</version>
57 - </dependency>
58 - <dependency>
59 - <artifactId>Ajax</artifactId>
60 - <groupId>wonder.ajax</groupId>
61 - <version>5.0.0-SNAPSHOT</version>
62 - </dependency>
63 -</dependencies>
64 -{{/code}}
65 -
66 -{{info title="Useful Information: declaring dependencies"}}
67 -It is important to understand how dependencies are uniquely resolved when defining your dependencies.
68 -
69 -If you've utilised a dependency management section in your pom (or uppermost parent pom) then, according to [[Maven's Dependency Management>>url:http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Management||shape="rect"]], the minimal set of information for matching a dependency reference against a dependencyManagement section is actually **groupId, artifactId, type, classifier**. In many cases, these dependencies will refer to jar artifacts with no classifier. This allows us to shorthand the identity set to **groupId, artifactId**, since the default for the type field is jar, and the default classifier is null.
70 -
71 -Thus, for those wonder dependencies that require a classifier, the set of information required is: **group, artifactId, classifier** which accepts the default type of jar. For those that have no need for a classifier, you'll only need **group, artifactId**.
72 -
73 -(% style="color: red;" %)If you've not used a dependency management section then you'll additionally need to specify the **version** of the dependency in order for it to be resolved.
74 -
75 -You'll notice that the qualifier / classifier is part of the basic artifact coordinate system that the wonder team has chosen to follow:
76 - <major version>.<minor version>.<incremental version>-<qualifier>
77 -
78 -For ERExtensions, this is: 5 . 0 . 0-SNAPSHOT - wo54;
79 -{{/info}}
80 -
81 -{{note title="Don't trip yourself up"}}
82 -Java, of course, can work with anything you choose to place on your classpath. However, it's surely wise to avoid tripping yourself right?! If you're using maven to determine your classpath then I (ldeck) advise – though nothing will stop the unwilling – not additionally using the standard WOLips ant-based dependency management in conjunction with mavens.
83 -
84 -That is to say, you need to understand why this would be a bad idea. Ant-based builds from wonder include their transitive dependencies in their final build; maven's do not because maven is able to resolve dependencies during your build whereas the ant-based builds won't (unless they add ivy or something similar to the mix). WOLips ant-based dependency management has quite entirely different means for resolving its dependencies and as such unless you know what your doing you should avoid mixing and matching systems.
85 -{{/note}}
86 -
87 -See the [[Quick Start Guide>>url:http://wiki.objectstyle.org/confluence/display/WOL/Quick+Start||shape="rect"]] for further information on setting up your environment and getting started. Also see [[WOLips Tutorials ~> Maven>>url:http://wiki.objectstyle.org/confluence/display/WOL/Tutorials||shape="rect"]] and other guides for creating applications and frameworks from within eclipse, with or without wonder support, utilizing the maven standard project layout
88 -
89 -See also the [[WOProject-maven2>>url:http://wiki.objectstyle.org/confluence/display/WOL/WOProject-Maven2||shape="rect"]] for various other related wiki pages.
39 +5. Build wonder
40 +mvn install