pom.xml 35.2 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>no.knowit.seam</groupId>
        <artifactId>seam-refimpl</artifactId>
        <version>1.0-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>seam-refimpl-war</artifactId>
    <!-- m2eclipse does not like: ${app.context}-ear -->
    <name>${project.artifactId} : ${project.version}</name>
    <description>The Seam Maven reference implementation WAR module</description>
    <packaging>war</packaging>

    <properties>
        <app.jndi.pattern>${project.build.finalName}/#{ejbName}/local</app.jndi.pattern>
    </properties>

    <profiles>
        <!--
         More than one profile can be active at once. Since profiles can contain the same types of
         configuration there can be clashes. If two profiles clash the last to be activated will
         override configurations in those activated earlier.
         Note: Any activeByDefault profile will be deactivated if you activate another profile.
         E.g. running "mvn install -Penv-dev" deactivates the "default" profile.
        -->
        <profile>
            <id>env-dev</id>
            <activation>
                <file>
                    <exists>../src/main/filters/filter-dev.properties</exists>
                </file>
            </activation>
            <properties>
                <env>dev</env>
            </properties>
        </profile>

        <profile>
            <id>env-default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <env>default</env>
            </properties>
        </profile>

        <profile>
            <id>explode</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>war-process-classes</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <configuration>
                                    <tasks>
                                        <!--EAR version--><!--<property--><!--name="deploy-path"--><!--value="${as.deploy}/${app.context}-ear.ear"/>--><!--WAR only version-->
                                        <property name="deploy-path" value="${as.deploy}"/>
                                        <!--copy everything except WEB-INF/classes-->
                                        <copy todir="${deploy-path}/${project.build.finalName}.war" overwrite="true" verbose="false">
                                            <fileset dir="${project.build.directory}/${project.build.finalName}">
                                                <include name="**/*"/>
                                                <exclude name="WEB-INF/**/*"/>
                                                <exclude name="META-INF/context.xml"/>
                                            </fileset>
                                        </copy>
                                        <!--copy everything from WEB-INF/classes except classes-->
                                        <copy todir="${deploy-path}/${project.build.finalName}.war/WEB-INF/classes" overwrite="true" verbose="false">
                                            <fileset dir="${project.build.directory}/${project.build.finalName}/WEB-INF/classes">
                                                <exclude name="**/*.class"/>
                                            </fileset>
                                        </copy>
                                        <!--copy hot deployable classes-->
                                        <copy todir="${deploy-path}/${project.build.finalName}.war/WEB-INF/dev" overwrite="true" verbose="false">
                                            <fileset dir="${project.build.directory}/${project.build.finalName}/WEB-INF/classes"
                                                     excludesfile="nonhotdeployable">
                                                <include name="**/*.class"/>
                                            </fileset>
                                        </copy>
                                    </tasks>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>explodeTestsFast</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>process-test-classes</id>
                                <phase>process-test-classes</phase>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <configuration>
                                    <tasks>
                                        <!--EAR version--><!--<property--><!--name="deploy-path"--><!--value="${as.deploy}/${app.context}-ear.ear"/>--><!--WAR only version-->
                                        <property name="deploy-path" value="${as.deploy}"/>
                                        <!--copy resources-->
                                        <copy todir="${deploy-path}/${project.build.finalName}.war/WEB-INF/classes" overwrite="true" verbose="false">
                                            <fileset dir="${project.build.testOutputDirectory}">
                                                <exclude name="**/*.class"/>
                                            </fileset>
                                        </copy>
                                        <!--copy hot deployable classes-->
                                        <copy todir="${deploy-path}/${project.build.finalName}.war/WEB-INF/dev" overwrite="true" verbose="false">
                                            <fileset dir="${project.build.testOutputDirectory}" excludesfile="nonhotdeployable">
                                                <include name="**/*.class"/>
                                            </fileset>
                                        </copy>
                                    </tasks>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!--WAR only version-->
        <profile>
            <!--
              Unexplode ear. Remove project from appserver deploy folder.
              Execute e.g. "mvn clean -Punexplode"
            -->
            <id>unexplode</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>clean</id>
                                <phase>clean</phase>
                                <configuration>
                                    <tasks>
                                        <property name="deploy-path" value="${as.deploy}/${project.build.finalName}.war"/>

                                        <echo>Unexploding: ${deploy-path}</echo>

                                        <delete file="${deploy-path}" quiet="true"/>
                                        <delete dir="${deploy-path}" quiet="true"/>
                                        <!--
                                          Uncomment this tag if you have deployed the *-ds.xml file to the appserver's deploy folder
                                          <delete file="${as.deploy}/${ds.xml}"	quiet="true" />
                                        -->
                                    </tasks>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!--WAR only version-->
        <profile>
            <id>restart</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>war-package</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <configuration>
                                    <tasks>
                                        <property name="deploy-path" value="${as.deploy}"/>
                                        <!--copy everything except WEB-INF/classes-->
                                        <copy todir="${deploy-path}/${project.build.finalName}.war" overwrite="true" verbose="false">
                                            <fileset dir="${project.build.directory}/${project.build.finalName}">
                                                <include name="**/*"/>
                                                <exclude name="WEB-INF/classes/**/*"/>
                                            </fileset>
                                        </copy>
                                        <!--copy everything from WEB-INF/classes except classes-->
                                        <copy todir="${deploy-path}/${project.build.finalName}.war/WEB-INF/classes" overwrite="true" verbose="false">
                                            <fileset dir="${project.build.directory}/${project.build.finalName}/WEB-INF/classes">
                                                <exclude name="**/*.class"/>
                                            </fileset>
                                        </copy>
                                        <!--copy non hot deployable classes-->
                                        <copy todir="${deploy-path}/${project.build.finalName}.war/WEB-INF/classes" overwrite="true" verbose="false">
                                            <fileset dir="${project.build.directory}/${project.build.finalName}/WEB-INF/classes"
                                                     includesfile="nonhotdeployable"/>
                                        </copy>
                                        <!--copy hot deployable classes-->
                                        <copy todir="${deploy-path}/${project.build.finalName}.war/WEB-INF/dev" overwrite="true" verbose="false">
                                            <fileset dir="${project.build.directory}/${project.build.finalName}/WEB-INF/classes"
                                                     excludesfile="nonhotdeployable">
                                                <include name="**/*.class"/>
                                            </fileset>
                                        </copy>
                                    </tasks>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-resources-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>copy-app-ds-xml</id>
                                <phase>initialize</phase>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${as.deploy}</outputDirectory>
                                    <resources>
                                        <resource>
                                            <directory>../ear/src/main/resources</directory>
                                            <filtering>true</filtering>
                                            <includes>
                                                <include>${ds.xml}</include>
                                            </includes>
                                        </resource>
                                    </resources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jsfunit</id>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.jsfunit</groupId>
                    <artifactId>jboss-jsfunit-core</artifactId>
                    <scope>compile</scope>
                    <exclusions>
                        <exclusion>
                            <groupId>xerces</groupId>
                            <artifactId>xercesImpl</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>xalan</groupId>
                            <artifactId>xalan</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>

                <!--Needed for JSFUnit tests by Cactus-->
                <dependency>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                    <version>3.8.2</version>
                    <scope>runtime</scope>
                </dependency>

                <dependency>
                    <groupId>org.unitils</groupId>
                    <artifactId>unitils-core</artifactId>
                </dependency>

                <dependency>
                    <groupId>org.unitils</groupId>
                    <artifactId>unitils-dbunit</artifactId>
                </dependency>

                <dependency>
                    <groupId>org.unitils</groupId>
                    <artifactId>unitils-dbmaintainer</artifactId>
                    <exclusions>
                        <exclusion>
                            <groupId>org.hibernate</groupId>
                            <artifactId>hibernate</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>

                <dependency>
                    <groupId>org.dbmaintain</groupId>
                    <artifactId>dbmaintain</artifactId>
                </dependency>

                <dependency>
                    <groupId>${jdbc.driver.groupId}</groupId>
                    <artifactId>${jdbc.driver.artifactId}</artifactId>
                </dependency>
            </dependencies>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <configuration>
                            <systemPropertyVariables>
                                <cactus.contextURL>${cactus.contextURL}</cactus.contextURL>
                            </systemPropertyVariables>
                            <failIfNoTests>true</failIfNoTests>
                        </configuration>
                        <executions>
                            <execution>
                                <id>integration-test</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>integration-test</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>verify</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>verify</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.cargo</groupId>
                        <artifactId>cargo-maven2-plugin</artifactId>
                        <configuration>
                            <container>
                                <containerId>jboss42x</containerId>
                                <type>remote</type>
                            </container>
                            <configuration>
                                <type>runtime</type>
                                <properties>
                                    <cargo.hostname>${cargo.hostname}</cargo.hostname>
                                    <cargo.servlet.port>${cargo.servlet.port}</cargo.servlet.port>
                                </properties>
				<deployables>
				</deployables>
                            </configuration>
                        </configuration>
                        <executions>
                            <execution>
                                <id>deploy</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>undeploy</goal>
                                    <goal>deploy</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>jsfunit</id>
                                <goals>
                                    <goal>war</goal>
                                </goals>
                                <configuration>
                                    <webResources>
                                        <webResource>
                                            <directory>src/test/resources</directory>
                                            <targetPath>WEB-INF</targetPath>
                                            <includes>
                                                <include>web.xml</include>
                                            </includes>
                                            <filtering>true</filtering>
                                        </webResource>
                                        <resource>
                                            <directory>${project.build.testOutputDirectory}</directory>
                                            <targetPath>WEB-INF/classes</targetPath>
                                            <includes>
                                                <include>**/*.class</include>
                                            </includes>
                                        </resource>
                                        <resource>
                                            <directory>${project.build.testOutputDirectory}</directory>
                                            <targetPath>/</targetPath>
                                            <includes>
                                                <include>**/*.xsl</include>
                                            </includes>
                                        </resource>
                                        <resource>
                                            <directory>${basedir}/src/test/resources</directory>
                                            <targetPath>WEB-INF/classes</targetPath>
                                            <filtering>true</filtering>
                                        </resource>
                                        <resource>
                                            <directory>${unitils.dbscripts.src}</directory>
                                            <targetPath>WEB-INF/classes/</targetPath>
                                            <filtering>true</filtering>
                                        </resource>
                                    </webResources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-resources-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>copy-app-ds-xml</id>
                                <phase>initialize</phase>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${as.home}/server/default/deploy</outputDirectory>
                                    <resources>
                                        <resource>
                                            <directory>../ear/src/main/resources</directory>
                                            <filtering>true</filtering>
                                            <includes>
                                                <include>${ds.xml}</include>
                                            </includes>
                                        </resource>
                                    </resources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>skipSurefire</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>cli</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.twdata.maven</groupId>
                        <artifactId>maven-cli-plugin</artifactId>
                        <version>1.0.6-SNAPSHOT</version>
                        <configuration>
                            <userAliases>
                                <disableConstraints>properties:read-project-properties dbmaintain:disableConstraints</disableConstraints>
                                <clearDatabase>properties:read-project-properties dbmaintain:clearDatabase</clearDatabase>
                                <updateDatabase>properties:read-project-properties dbmaintain:updateDatabase</updateDatabase>
                                <unexplode>clean -Punexplode</unexplode>
                                <explode>package -S -Pexplode</explode>
                                <restart>package -S -Prestart</restart>
                                <!--jsfunitRun - updates database, builds project with JSFUnit tests, deploys it into running JBoss AS and runs JSFUnit tests -->
                                <jsfunitRun>clean properties:read-project-properties dbmaintain:clearDatabase dbmaintain:updateDatabase
                                    dbmaintain:updateSequences dbmaintain:disableConstraints verify -Pjsfunit -Dmaven.test.skip=false
                                </jsfunitRun>
                                <jsfunitRestart>restart -Pjsfunit -Dmaven.test.skip=false clearDatabase updateDatabase disableConstraints</jsfunitRestart>
                                <!--jsfunitExplode - compiles only JSFUnit tests and copies them into exploded package on running JBoss AS, this is meant for rapid test modifications -->
                                <jsfunitExplode>test -PexplodeTestsFast,skipSurefire -Dmaven.test.skip=false</jsfunitExplode>
                                <!--jsfunitExplodeAll - same as explode, but includes JSFUnit tests, use this when you need to update facelets and JSFUnit tests-->
                                <jsfunitExplodeAll>explode -Pjsfunit,skipSurefire -Dmaven.test.skip=false</jsfunitExplodeAll>
                            </userAliases>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencies>
        <!-- seam --><!--WAR only version START-->
        <dependency>
            <groupId>org.jboss.seam</groupId>
            <artifactId>jboss-seam</artifactId>
            <type>jar</type>
            <version>${version.seam}</version>
        </dependency>

        <dependency>
            <groupId>org.jboss.seam</groupId>
            <artifactId>jboss-seam-mail</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jboss.el</groupId>
            <artifactId>jboss-el</artifactId>
            <type>jar</type>
        </dependency>

        <dependency>
            <groupId>org.richfaces.framework</groupId>
            <artifactId>richfaces-api</artifactId>
            <type>jar</type>
        </dependency>

        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <type>jar</type>
        </dependency>

        <dependency>
            <groupId>commons-digester</groupId>
            <artifactId>commons-digester</artifactId>
            <type>jar</type>
        </dependency>

        <!--WAR only version END-->
        <dependency>
            <groupId>org.jboss.seam</groupId>
            <artifactId>jboss-seam-ui</artifactId>
        </dependency>

        <!-- optional, but a reasonable requirement for a newly created project -->
        <dependency>
            <groupId>org.jboss.seam</groupId>
            <artifactId>jboss-seam-debug</artifactId>
        </dependency>

        <!-- add more Seam modules as needed
        <dependency>
          <groupId>org.jboss.seam</groupId>
          <artifactId>jboss-seam-remoting</artifactId>
        </dependency>

        <dependency>
          <groupId>org.jboss.seam</groupId>
          <artifactId>jboss-seam-mail</artifactId>
        </dependency>

        <dependency>
          <groupId>org.jboss.seam</groupId>
          <artifactId>jboss-seam-pdf</artifactId>
        </dependency>

        <dependency>
          <groupId>org.jboss.seam</groupId>
          <artifactId>jboss-seam-excel</artifactId>
        </dependency>
        -->

        <!-- richfaces -->
        <dependency>
            <groupId>org.richfaces.framework</groupId>
            <artifactId>richfaces-impl</artifactId>
        </dependency>

        <dependency>
            <groupId>org.richfaces.ui</groupId>
            <artifactId>richfaces-ui</artifactId>
        </dependency>

        <dependency>
            <groupId>org.richfaces.samples</groupId>
            <artifactId>glassX</artifactId>
        </dependency>

        <dependency>
            <groupId>org.richfaces.samples</groupId>
            <artifactId>darkX</artifactId>
        </dependency>

        <!--  jee -->
        <dependency>
            <groupId>com.sun.facelets</groupId>
            <artifactId>jsf-facelets</artifactId>
        </dependency>

        <!-- url rewrite filter,
          There are two rewrite options in Seam, you can choose to either use the org.tuckey
          UrlRewriteFilter or the native Seam rewriting. You should not attempt to use both.
          The native Seam rewriting does not use the org.tuckey rewrite engine at all.
          If you are going to use Seam's native rewriting, then remove the org.tuckey
          UrlRewriteFilter from web.xml and nuke the urlrewrite.xml file.
          With Seam 2.1 or newer it is recommend to use Seam's native rewrite engine.

        <dependency>
          <groupId>org.tuckey</groupId>
          <artifactId>urlrewritefilter</artifactId>
        </dependency>
        -->


        <!--
          For Eclipse and JBoss Tools:
          List all other modules you are interested to browse
          into (ctrl+click) from xhtml pages with scope provided
        <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>${app.context}-ejb</artifactId>
          <type>ejb</type>
          <scope>provided</scope>
        </dependency>
        -->

        <!--JSFUnit-->
        <dependency>
            <groupId>org.jboss.jsfunit</groupId>
            <artifactId>jboss-jsfunit-core</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>xerces</groupId>
                    <artifactId>xercesImpl</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xalan</groupId>
                    <artifactId>xalan</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.unitils</groupId>
            <artifactId>unitils-dbunit</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <finalName>${app.context}</finalName>

        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
            </testResource>
        </testResources>

        <!--
      Maven filter properties are ony visible to
      resources and can not be accessed from the POM.
        -->
        <filters>
            <filter>${basedir}/../src/main/filters/filter-${env}.properties</filter>
        </filters>

        <plugins>
            <!--
              Maven filter properties are ony visible to resources and can not be
              accessed from the POM. This is where the Properties Maven Plugin makes
              our life a little easier when dealing with properties that we need to
              access inside our POM. It provides goals to read and write properties
              from and to files, and also to set system properties. It's main use-case
              is loading properties from files instead of declaring them in pom.xml,
              something that comes in handy when dealing with different environments.
              The plugin is configured to read properties during the "validate" phase
              and the properties are then accessible from the pom.
            -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>properties-maven-plugin</artifactId>
                <configuration>
                    <files>
                        <file>${basedir}/../src/main/filters/filter-${env}.properties</file>
                    </files>
                    <outputFile/>
                    <properties/>
                </configuration>
                <executions>
                    <execution>
                        <id>pre-clean</id>
                        <phase>pre-clean</phase>
                        <goals>
                            <goal>read-project-properties</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!--WAR only mode-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <webResources>
                        <webResource>
                            <directory>${basedir}/src/main/webapp/WEB-INF</directory>
                            <targetPath>WEB-INF</targetPath>
                            <filtering>true</filtering>
                        </webResource>
                        <webResource>
                            <directory>${basedir}/../ejb/src/main/resources/META-INF</directory>
                            <targetPath>WEB-INF/classes/META-INF</targetPath>
                            <includes>
                                <include>persistence.xml</include>
                            </includes>
                            <filtering>true</filtering>
                        </webResource>
                    </webResources>
                    <archive>
                        <manifestEntries>
                            <Build-Date>${timestamp}</Build-Date>
                            <Build-Revision>${buildNumber}</Build-Revision>
                            <Mode>${env}</Mode>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.dbmaintain</groupId>
                <artifactId>dbmaintain-maven-plugin</artifactId>
                <configuration>
                    <databases>
                        <database>
                            <dialect>${unitils.dialect}</dialect>
                            <driverClassName>${ds.driver.class}</driverClassName>
                            <userName>${ds.user.name}</userName>
                            <password>${ds.password}</password>
                            <url>${ds.connection.url}</url>
                            <schemaNames>${ds.schema}</schemaNames>
                        </database>
                    </databases>
                    <autoCreateDbMaintainScriptsTable>true</autoCreateDbMaintainScriptsTable>
                    <cleanDb>false</cleanDb>
                    <fromScratchEnabled>${dbmaintain.fromScratchEnabled}</fromScratchEnabled>
                    <lowestAcceptableSequenceValue>1000</lowestAcceptableSequenceValue>
                    <updateSequences>false</updateSequences>
                    <scriptLocations>${unitils.dbscripts.src}</scriptLocations>
                    <scriptEncoding>UTF-8</scriptEncoding>
                    <qualifiers>${dbmaintain.qualifiers}</qualifiers>
                    <excludedQualifiers>${dbmaintain.excludedQualifiers}</excludedQualifiers>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>${jdbc.driver.groupId}</groupId>
                        <artifactId>${jdbc.driver.artifactId}</artifactId>
                        <version>${jdbc.driver.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

</project>