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

From version 26.1
edited by Lachlan Deck
on 2009/03/24 19:02
Change comment: Extra note
To version 28.1
edited by Greg.Brown
on 2009/03/23 11:20
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.ldeck
1 +XWiki.gbrown
Content
... ... @@ -3,7 +3,7 @@
3 3  https:~/~/wonder.svn.sourceforge.net/svnroot/wonder/trunk/Wonder/BUILD.txt
4 4  
5 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.
6 + These Maven built frameworks are slightly different than the ant built 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.
7 7  
8 8  {{/note}}
9 9  
... ... @@ -15,7 +15,7 @@
15 15  
16 16  {{/code}}
17 17  
18 -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:,,
18 +This installs frameworks for WebObjects 5.4.x, some of which appear in your local repository with the wo54 qualifier:
19 19  
20 20  {{code}}
21 21  
... ... @@ -23,74 +23,25 @@
23 23  
24 24  {{/code}}
25 25  
26 -Note: currently the only frameworks that make use of the classifier, having differing classes and resources for them, are ERExtensions and WOOgnl.
26 +and most frameworks are the same for either version of WebObjects, and have nor need any qualifier.
27 27  
28 -So, in your project for both ERExtensions and WOOgnl you'll need to define these as dependencies in the following form:
28 +To utilize these frameworks in a wonder supported project, one must add the correct dependency, and this will depend on which profile you want to link to. This is done by a maven "classifier", which is used to select the correct qualifier. A qualifier is part of the basic artifact coordinate system:
29 29  
30 -{{code value="xml"}}
30 +<major version>.<minor version>.<incremental version>-<qualifier>
31 31  
32 -<dependency>
33 - <artifactId>Foo</artifactId>
34 - <groupId>wonder.core</groupId>
35 - <classifier>bar</classifier>
36 - <version>baz</version>
37 -</dependency>
32 +For ERExtensions, this is: 5 . 0 . 0-SNAPSHOT - wo54; which selects the correct dependency for WebObjects 5.4.x. In the pom dependencies section this would be
38 38  
39 -{{/code}}
40 -
41 -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.
42 -
43 -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.
44 -
45 45  {{code value="xml"}}
35 +
36 + <dependency>
37 + <groupId>wonder.core</groupId>
38 + <artifactId>ERExtensions</artifactId>
39 + <version>5.0.0-SNAPSHOT</version>
40 + <classifier>wo54</classifier>
41 +</dependency>
46 46  
47 -<dependencies>
48 - <dependency>
49 - <artifactId>ERExtensions</artifactId>
50 - <groupId>wonder.core</groupId>
51 - <classifier>wo54</classifier>
52 - <version>5.0.0-SNAPSHOT</version>
53 - </dependency>
54 - <dependency>
55 - <artifactId>WOOgnl</artifactId>
56 - <groupId>wonder.core</groupId>
57 - <classifier>wo54</classifier>
58 - <version>5.0.0-SNAPSHOT</version>
59 - </dependency>
60 - <dependency>
61 - <artifactId>Ajax</artifactId>
62 - <groupId>wonder.ajax</groupId>
63 - <version>5.0.0-SNAPSHOT</version>
64 - </dependency>
65 -</dependencies>
66 -
67 67  {{/code}}
68 68  
69 -{{info title="Useful Information: declaring dependencies"}}
70 -
71 -It is important to understand how dependencies are uniquely resolved when defining your dependencies.
72 -
73 -If you've utilised a dependency management section in your pom (or uppermost parent pom) then, according to [Maven's Dependency Management|http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Management], 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.
74 -
75 -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*.
76 -
77 -{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.{color}
78 -
79 -You'll notice that the qualifier / classifier is part of the basic artifact coordinate system that the wonder team has chosen to follow:
80 -<major version>.<minor version>.<incremental version>-<qualifier>
81 -
82 -For ERExtensions, this is: 5 . 0 . 0-SNAPSHOT - wo54;
83 -
84 -{{/info}}
85 -
86 -{{note title="Don"}}
87 -
88 -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.
89 -
90 -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.
91 -
92 -{{/note}}
93 -
94 -See the [[Quick Start Guide>>http://wiki.objectstyle.org/confluence/display/WOL/Quick+Start]] for further information on setting up your environment and getting started. Also see [[WOLips Tutorials ~> Maven>>http://wiki.objectstyle.org/confluence/display/WOL/Tutorials]] and other guides for creating applications and frameworks from within eclipse, with or without wonder support, utilizing the maven standard project layout
95 -
96 -See also the [[WOProject-maven2>>http://wiki.objectstyle.org/confluence/display/WOL/WOProject-Maven2]] for various other related wiki pages.
45 +
46 +
47 +See also the woapplication-archetype ( [[http://wiki.objectstyle.org/confluence/display/WOL/woapplication-archetype]] ) which can create wonder supported applications or frameworks which utilize the maven standard project layout.