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 21.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 22.1
edited by Lachlan Deck
on 2008/06/24 00:39
on 2008/06/24 00:39
Change comment:
Add tip to hang in there with longish guide.
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -203,7 +203,7 @@ 203 203 204 204 === Repositories === 205 205 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]]. 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]].,, 207 207 208 208 {{noformat}} 209 209 ... ... @@ -278,10 +278,8 @@ 278 278 279 279 === Packaging Frameworks as Jars === 280 280 281 -Here's the definition for /frameworks/pom.xml. Note that it depends on the following Info.plist file being located under trunk/frameworks/src/main/resources:281 +Here's the definition for /frameworks/pom.xml. 282 282 283 -{{attachments patterns="Info.plist" upload="false"}}{{/attachments}} 284 - 285 285 {{code title="/frameworks/pom.xml"}} 286 286 287 287 <?xml version="1.0" encoding="UTF-8"?> ... ... @@ -291,7 +291,7 @@ 291 291 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 292 292 293 293 <modelVersion>4.0.0</modelVersion> 294 - 292 + 295 295 <!-- parent artifact --> 296 296 <parent> 297 297 <artifactId>mywostuff</artifactId> ... ... @@ -303,7 +303,7 @@ 303 303 <artifactId>frameworks</artifactId> 304 304 <groupId>com.mywostuff</groupId> 305 305 <packaging>pom</packaging> 306 - 304 + 307 307 <!-- framework relevant properties --> 308 308 <properties> 309 309 <!-- NS related properties fills in Info.plist etc--> ... ... @@ -443,7 +443,7 @@ 443 443 <!-- artifact identity --> 444 444 <artifactId>CustomBusinessLogic</artifactId> 445 445 <groupId>com.mywostuff.frameworks</groupId> 446 - 444 + 447 447 <!-- specific dependencies --> 448 448 <dependencies> 449 449 <dependency> ... ... @@ -457,231 +457,8 @@ 457 457 458 458 === Packaging Applications === 459 459 460 - Here's thedefinition for /apps/pom.xml which is shared by any sub-modules(i.e., ApplicationAand ApplicationB).458 +details to come... 461 461 462 -{{code title="/apps/pom.xml"}} 463 - 464 -<?xml version="1.0" encoding="UTF-8"?> 465 -<project xmlns="http://maven.apache.org/POM/4.0.0" 466 - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 467 - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 468 - http://maven.apache.org/xsd/maven-4.0.0.xsd"> 469 - 470 - <modelVersion>4.0.0</modelVersion> 471 - 472 - <!-- parent artifact --> 473 - <parent> 474 - <groupId>com</groupId> 475 - <artifactId>mywostuff</artifactId> 476 - <version>1.0-SNAPSHOT</version> 477 - </parent> 478 - 479 - <!-- artifact identity --> 480 - <artifactId>apps</artifactId> 481 - <groupId>com.mywostuff</groupId> 482 - <packaging>pom</packaging> 483 - 484 - <!-- modules --> 485 - <modules> 486 - <module>ApplicationA</module> 487 - <module>ApplicationB</module> 488 - </modules> 489 - 490 - <!-- specific dependencies (for modules) --> 491 - <dependencies> 492 - <!-- wonder frameworks --> 493 - <dependency> 494 - <artifactId>ERExtensions</artifactId> 495 - <groupId>${wonder.common.groupId}</groupId> 496 - </dependency> 497 - <dependency> 498 - <artifactId>JavaWOExtensions</artifactId> 499 - <groupId>${wonder.common.groupId}</groupId> 500 - </dependency> 501 - 502 - <!-- project libs --> 503 - <dependency> 504 - <artifactId>CustomExtensions</artifactId> 505 - <groupId>${my.frameworks.groupId}</groupId> 506 - </dependency> 507 - <dependency> 508 - <artifactId>CustomBusinessLogic</artifactId> 509 - <groupId>${my.frameworks.groupId}</groupId> 510 - </dependency> 511 - 512 - <!-- webobjects dependencies --> 513 - <dependency> 514 - <artifactId>JavaFoundation</artifactId> 515 - <groupId>${webobjects.groupId}</groupId> 516 - </dependency> 517 - <dependency> 518 - <artifactId>JavaJDBCAdaptor</artifactId> 519 - <groupId>${webobjects.groupId}</groupId> 520 - </dependency> 521 - <dependency> 522 - <artifactId>JavaWebObjects</artifactId> 523 - <groupId>${webobjects.groupId}</groupId> 524 - </dependency> 525 - <dependency> 526 - <artifactId>JavaEOControl</artifactId> 527 - <groupId>${webobjects.groupId}</groupId> 528 - </dependency> 529 - <dependency> 530 - <artifactId>JavaEOAccess</artifactId> 531 - <groupId>${webobjects.groupId}</groupId> 532 - </dependency> 533 - <dependency> 534 - <artifactId>JavaWebObjects</artifactId> 535 - <groupId>${webobjects.groupId}</groupId> 536 - </dependency> 537 - <dependency> 538 - <artifactId>JavaXML</artifactId> 539 - <groupId>${webobjects.groupId}</groupId> 540 - </dependency> 541 - </dependencies> 542 - 543 - <!-- build config (for modules) --> 544 - <build> 545 - <sourceDirectory>src</sourceDirectory> 546 - <testSourceDirectory>tests</testSourceDirectory> 547 - <resources> 548 - <resource> 549 - <targetPath>Resources</targetPath> 550 - <filtering>false</filtering> 551 - <directory>Components</directory> 552 - </resource> 553 - <resource> 554 - <targetPath>Resources</targetPath> 555 - <filtering>false</filtering> 556 - <directory>Resources</directory> 557 - </resource> 558 - <resource> 559 - <targetPath>WebServerResources</targetPath> 560 - <filtering>false</filtering> 561 - <directory>WebServerResources</directory> 562 - </resource> 563 - </resources> 564 - <plugins> 565 - <plugin> 566 - <artifactId>maven-wolifecycle-plugin</artifactId> 567 - <groupId>org.objectstyle.woproject.maven2</groupId> 568 - <version>2.0.15</version> 569 - <extensions>true</extensions> 570 - <configuration> 571 - <source>${java.target}</source> 572 - <target>${java.target}</target> 573 - </configuration> 574 - </plugin> 575 - <plugin> 576 - <groupId>org.apache.maven.plugins</groupId> 577 - <artifactId>maven-javadoc-plugin</artifactId> 578 - <configuration> 579 - <javadocVersion>${java.target}</javadocVersion> 580 - <locale>en-AU</locale> 581 - <minmemory>128m</minmemory> 582 - <maxmemory>512m</maxmemory> 583 - </configuration> 584 - </plugin> 585 - <!-- 586 - TODO build numbering 587 - <plugin> 588 - <groupId>org.codehaus.mojo</groupId> 589 - <artifactId>maven-buildnumber-plugin</artifactId> 590 - <version>0.9.6</version> 591 - <executions> 592 - <execution> 593 - <phase>validate</phase> 594 - <goals> 595 - <goal>create</goal> 596 - </goals> 597 - </execution> 598 - </executions> 599 - <configuration> 600 - <doCheck>true</doCheck> 601 - <doUpdate>true</doUpdate> 602 - </configuration> 603 - </plugin> 604 - --> 605 - </plugins> 606 - <pluginManagement> 607 - <plugins> 608 - <plugin> 609 - <groupId>org.apache.maven.plugins</groupId> 610 - <artifactId>maven-compiler-plugin</artifactId> 611 - <configuration> 612 - <source>${java.target}</source> 613 - <target>${java.target}</target> 614 - </configuration> 615 - </plugin> 616 - </plugins> 617 - </pluginManagement> 618 - </build> 619 -</project> 620 - 621 -{{/code}} 622 - 623 -and ApplicationA - which has a couple of extra specific dependencies to add to those inherited from its parent. 624 - 625 -{{code title="/apps/ApplicationA/pom.xml"}} 626 - 627 -<?xml version="1.0"?> 628 -<project> 629 - <modelVersion>4.0.0</modelVersion> 630 - 631 - <!-- parent artifact --> 632 - <parent> 633 - <artifactId>apps</artifactId> 634 - <groupId>com.mywostuff</groupId> 635 - <version>1.0-SNAPSHOT</version> 636 - <relativePath>../apps</relativePath> <!-- e.g., (optional) if your app is under /trunk --> 637 - </parent> 638 - 639 - <!-- artifact identity --> 640 - <artifactId>ApplicationA</artifactId> 641 - <groupId>com.mywostuff.apps</groupId> 642 - <packaging>woapplication</packaging> <!-- woproject specific packaging --> 643 - 644 - <!-- specific properties --> 645 - <properties> 646 - <!-- general properties --> 647 - <mainclass>your.app.Application</mainclass> 648 - </properties> 649 - 650 - <!-- specific dependencies --> 651 - <dependencies> 652 - <!-- wonder frameworks --> 653 - <dependency> 654 - <artifactId>Ajax</artifactId> 655 - <groupId>${wonder.ajax.groupId}</groupId> 656 - </dependency> 657 - <dependency> 658 - <artifactId>ERCaptcha</artifactId> 659 - <groupId>${wonder.common.groupId}</groupId> 660 - <!-- requires jcaptcha-all below --> 661 - </dependency> 662 - <dependency> 663 - <artifactId>WOOgnl</artifactId> 664 - <groupId>${wonder.common.groupId}</groupId> 665 - </dependency> 666 - 667 - <!-- general libs --> 668 - <dependency> 669 - <artifactId>jcaptcha-all</artifactId> 670 - <groupId>com.octo.captcha</groupId> 671 - </dependency> 672 - <dependency> 673 - <artifactId>commons-collections</artifactId> 674 - <groupId>commons-collections</groupId> 675 - </dependency> 676 - <dependency> 677 - <groupId>ognl</groupId> 678 - <artifactId>ognl</artifactId> 679 - </dependency> 680 - </dependencies> 681 -</project> 682 - 683 -{{/code}} 684 - 685 685 === Packaging Applications as True WAR === 686 686 687 687 You can find steps to package WO Applications as True WAR [[here>>Packaging WO Applications as true WAR with Maven]].