Changes for page Maven Kicking the tyres without changing your project structure
Last modified by Henrique Prange on 2015/09/11 17:57
From version 20.1
edited by Lachlan Deck
on 2008/07/02 23:41
on 2008/07/02 23:41
Change comment:
Adding example for building WOApplications
To version 24.1
edited by Lachlan Deck
on 2008/07/03 00:05
on 2008/07/03 00:05
Change comment:
Adding basic info and links for further info on project inheritance
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -201,6 +201,12 @@ 201 201 202 202 {{/noformat}} 203 203 204 +=== Project Inheritance === 205 + 206 +It naturally gets a bit boring having to define the same things over and over again. So, you can utilise a parent pom file specifying its packaging as 'pom'. Dependencies, plugins and executions, resources specifications and so forth can be defined once and shared by any sub-modules. See [[http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project_Inheritance]] and [[Java World's The Maven 2 POM demystified>>http://www.javaworld.com/javaworld/jw-05-2006/jw-0529-maven.html]] for further information and examples. 207 + 208 +For our example we'll have trunk/pom.xml which will define everything common to any and all modules in the hierarchy. Likewise, trunk/frameworks/pom.xml and trunk/apps/pom.xml will define everything common to frameworks and applications respecively. 209 + 204 204 === Repositories === 205 205 206 206 So far we have assumed that maven just knows where to find third party libraries. There is the default local repository (e.g., /.m2/repository) and a remote one at ibiblio.org or a mirror of the same. See [[http://maven.apache.org/guides/introduction/introduction-to-repositories.html]]. ... ... @@ -466,7 +466,7 @@ 466 466 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 467 467 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 468 468 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 469 - 475 + 470 470 <modelVersion>4.0.0</modelVersion> 471 471 472 472 <!-- parent artifact --> ... ... @@ -498,7 +498,7 @@ 498 498 <artifactId>JavaWOExtensions</artifactId> 499 499 <groupId>${wonder.common.groupId}</groupId> 500 500 </dependency> 501 - 507 + 502 502 <!-- project libs --> 503 503 <dependency> 504 504 <artifactId>CustomExtensions</artifactId> ... ... @@ -508,7 +508,7 @@ 508 508 <artifactId>CustomBusinessLogic</artifactId> 509 509 <groupId>${my.frameworks.groupId}</groupId> 510 510 </dependency> 511 - 517 + 512 512 <!-- webobjects dependencies --> 513 513 <dependency> 514 514 <artifactId>JavaFoundation</artifactId> ... ... @@ -539,7 +539,7 @@ 539 539 <groupId>${webobjects.groupId}</groupId> 540 540 </dependency> 541 541 </dependencies> 542 - 548 + 543 543 <!-- build config (for modules) --> 544 544 <build> 545 545 <sourceDirectory>src</sourceDirectory> ... ... @@ -663,7 +663,7 @@ 663 663 <artifactId>WOOgnl</artifactId> 664 664 <groupId>${wonder.common.groupId}</groupId> 665 665 </dependency> 666 - 672 + 667 667 <!-- general libs --> 668 668 <dependency> 669 669 <artifactId>jcaptcha-all</artifactId> ... ... @@ -686,12 +686,6 @@ 686 686 687 687 You can find steps to package WO Applications as True WAR [[here>>Packaging WO Applications as true WAR with Maven]]. 688 688 689 -more details to come... 690 - 691 -=== Project Inheritance === 692 - 693 -details to come... 694 - 695 695 === Eclipse Integration === 696 696 697 697 details to come...