Skip to content
Snippets Groups Projects
pom.xml 84.2 KiB
Newer Older
bps's avatar
bps committed
<?xml version="1.0"?>
<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>
	<groupId>org.olat</groupId>
	<artifactId>OLAT-LMS</artifactId>
	<version>7.1.2.0-SNAPSHOT</version>
bps's avatar
bps committed
	<packaging>war</packaging>
	<name>OLAT LMS</name>
	<url>http://www.openolat.org</url>
bps's avatar
bps committed
	<description>
  Welcome to the OLAT (Online Learning And Training) Developer Project Site.  This site
  contains materials chiefly of concern to developers (e.g., unit testing and SCA output etc.)
  and is rebuilt periodically on a regular basis.  The site structure is divided between
  project information (e.g., infrastructure, mailing lists, repositories etc.) and reports
  (e.g., unit testing, SCAs etc.)

  The development of OLAT itself started in 1999 at the University of Zürich, Switzerland,
  where it is the strategic learning management system.  For further information see our main project website.
  </description>
	<organization>
		<name>Online Learning And Training (University of Zürich)</name>
		<url>http://www.olat.org/</url>
	</organization>
	<licenses>
		<license>
			<name>Apache 2.0 Open Source License</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0</url>
			<distribution>manual</distribution>
			<comments>
		OLAT is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
		</comments>
		</license>
	</licenses>
	<developers>
		<developer>
			<id>amoran</id>
			<name>Alan Moran</name>
			<email>alan.moran@id.uzh.ch</email>
			<roles>
				<role>Head of Development</role>
			</roles>
			<timezone>+1</timezone>
		</developer>
		<developer>
			<id>pbrunner</id>
			<name>Patrick Brunner</name>
			<email>patrick.brunner@id.uzh.ch</email>
			<roles>
				<role>Quality Assurance Manager</role>
			</roles>
			<timezone>+1</timezone>
		</developer>
		<developer>
			<id>asch</id>
			<name>Alexander Schneider</name>
			<email>alexander.schneider@id.uzh.ch</email>
			<roles>
				<role>Database Administrator</role>
				<role>Deployment Manager</role>
			</roles>
			<timezone>+1</timezone>
		</developer>
		<developer>
			<id>matthai</id>
			<name>Matthai Karumacheril</name>
			<email>matthai.karumacheril@id.uzh.ch</email>
			<roles>
				<role>Developer</role>
				<role>Systems Analyst</role>
			</roles>
			<timezone>+1</timezone>
		</developer>
		<developer>
			<id>lavinia</id>
			<name>Lavinia Dumitrescu</name>
			<email>lavinia.dumitrescu@id.uzh.ch</email>
			<roles>
				<role>Developer</role>
			</roles>
			<timezone>+1</timezone>
		</developer>
		<developer>
			<id>guretzki</id>
			<name>Christian Guretzki</name>
			<email>christian.guretzki@id.uzh.ch</email>
			<roles>
				<role>Developer</role>
			</roles>
			<timezone>+1</timezone>
		</developer>
		<developer>
			<id>mila</id>
			<name>Milanka Ringwald</name>
			<email>milanka.ringwald@id.uzh.ch</email>
			<roles>
				<role>Developer</role>
			</roles>
			<timezone>+1</timezone>
		</developer>
		<developer>
			<id>schnider</id>
			<name>Guido Schnider</name>
			<email>guido.schnider@id.uzh.ch</email>
			<roles>
				<role>Developer</role>
			</roles>
			<timezone>+1</timezone>
		</developer>
	</developers>
	<distributionManagement>
		<repository>
			<id>releases</id>
			<name>OLAT Internal Nexus Release Repository</name>
			<url>http://repo.olat.uzh.ch/nexus/content/repositories/releases</url>
		</repository>
		<snapshotRepository>
			<id>snapshots</id>
			<name>OLAT Internal Nexus Snapshot Repository</name>
			<url>http://repo.olat.uzh.ch/nexus/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>
	<issueManagement>
		<system>JIRA</system>
		<url>http://jira.openolat.org</url>
bps's avatar
bps committed
	</issueManagement>
	<scm>
		<connection>scm:hg:http://hg.openolat.org</connection>
		<developerConnection>scm:hg:http://hg.openolat.org</developerConnection>
		<url>http://hg.openolat.org</url>
bps's avatar
bps committed
	</scm>
	<mailingLists>
		<mailingList>
			<name>olat-announce</name>
			<subscribe>https://lists.uzh.ch/lists.olat.org/sympa/subscribe/olat-announce</subscribe>
			<unsubscribe>https://lists.uzh.ch/lists.olat.org/sympa/sigrequest/olat-announce</unsubscribe>
			<post>olat-announce@lists.olat.org</post>
			<archive>https://lists.uzh.ch/lists.olat.org/sympa/info/olat-announce</archive>
		</mailingList>
		<mailingList>
			<name>olat-users</name>
			<subscribe>https://lists.uzh.ch/lists.olat.org/sympa/subscribe/olat-users</subscribe>
			<unsubscribe>https://lists.uzh.ch/lists.olat.org/sympa/sigrequest/olat-users</unsubscribe>
			<post>olat-users@lists.olat.org</post>
			<archive>https://lists.uzh.ch/lists.olat.org/sympa/info/olat-users</archive>
		</mailingList>
		<mailingList>
			<name>olat-developers</name>
			<subscribe>https://lists.uzh.ch/lists.olat.org/sympa/subscribe/olat-developers</subscribe>
			<unsubscribe>https://lists.uzh.ch/lists.olat.org/sympa/sigrequest/olat-developers</unsubscribe>
			<post>olat-developers@lists.olat.org</post>
			<archive>https://lists.uzh.ch/lists.olat.org/sympa/info/olat-developers</archive>
		</mailingList>
		<mailingList>
			<name>olat-translators</name>
			<subscribe>https://lists.uzh.ch/lists.olat.org/sympa/subscribe/olat-translators</subscribe>
			<unsubscribe>https://lists.uzh.ch/lists.olat.org/sympa/sigrequest/olat-translators</unsubscribe>
			<post>olat-translators@lists.olat.org</post>
			<archive>https://lists.uzh.ch/lists.olat.org/sympa/info/olat-translators</archive>
		</mailingList>
		<mailingList>
			<name>olat-usability</name>
			<subscribe>https://lists.uzh.ch/lists.olat.org/sympa/subscribe/olat-usability</subscribe>
			<unsubscribe>https://lists.uzh.ch/lists.olat.org/sympa/sigrequest/olat-usability</unsubscribe>
			<post>olat-usability@lists.olat.org</post>
			<archive>https://lists.uzh.ch/lists.olat.org/sympa/info/olat-usability</archive>
		</mailingList>
	</mailingLists>
	<!-- Unless otherwise explicitly stated the character encoding for all resources 
		(e.g., source, test etc.) will be UTF-8. This can be overriden at the plugin 
		level if necessary. -->
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<org.springframework.version>3.0.5.RELEASE</org.springframework.version>

    <!-- properties for testing and Q&A -->
    <!-- by default no tests are executed so far (April 2011). Use appropriate profiles and properties on the command line -->
    <skipTests>true</skipTests>
    <skipITs>true</skipITs>
    <!-- properties to define the testing environment
          values: hsql / mysql -->
    <test.env>hsql</test.env>
    <!-- olat.local.properties to distinguish multiple single and cluster olat instances on a single machine-->
    <test.env.db.name>olattest</test.env.db.name>
    <test.env.db.user>olat</test.env.db.user>
    <test.env.db.pass>olat</test.env.db.pass>
    <test.env.db.host.port>3306</test.env.db.host.port>
    <test.env.db.hibernate.ddl.auto>create</test.env.db.hibernate.ddl.auto>
    <test.env.instance.id>myolat</test.env.instance.id>
    <test.env.jms.broker.port>61616</test.env.jms.broker.port>
    <test.env.jmx.rmi.port.0>3000</test.env.jmx.rmi.port.0>
    <test.env.jmx.rmi.port.1>3001</test.env.jmx.rmi.port.1>
    <test.env.jmx.rmi.port.2>3002</test.env.jmx.rmi.port.2>

    <!-- this version is defined by the dependency <groupId>org.olat.testutils</groupId>   <artifactId>zipped-tomcat6x</artifactId> and the herein zipped tomcat installation -->
    <container.tomcat.version>6.0.32</container.tomcat.version>
    <!-- install dir is important for the -Pinstall-tomcats profile.
         These few lines define the default tomcat installation variables for installation and running a local tomcat cluster.
         If you want to reuse an existing tomcat installation, set the container.tomcat.*.home instead. -->
    <container.tomcat.one.install.dir>${basedir}/cargo/tomcat/one/</container.tomcat.one.install.dir>
    <container.tomcat.one.home>${container.tomcat.one.install.dir}/apache-tomcat-${container.tomcat.version}</container.tomcat.one.home>
    <!-- The port.part is used in several places to create cluster which follows the template:
         servlet port 8181
         administration ports 8109, 8105
         go to the src/test/profile/cluster/tomcat*/conf and lib/ to see the actual replacements.-->
    <container.tomcat.one.port.part>81</container.tomcat.one.port.part>
    <container.tomcat.one.port>${container.tomcat.one.port.part}${container.tomcat.one.port.part}</container.tomcat.one.port>
    <container.tomcat.two.install.dir>${basedir}/cargo/tomcat/two/</container.tomcat.two.install.dir>
    <container.tomcat.two.home>${container.tomcat.two.install.dir}/apache-tomcat-${container.tomcat.version}</container.tomcat.two.home>
    <container.tomcat.two.port.part>82</container.tomcat.two.port.part>
    <container.tomcat.two.port>${container.tomcat.two.port.part}${container.tomcat.two.port.part}</container.tomcat.two.port>

    <!-- the selenium client version which is also by the maven-selenium-plugin, 
        using the latest selenium a.k.a selenium 2.0 needs a migration of the tests and maven setup. -->
    <selenium-client.version>1.0.2</selenium-client.version>
    <!-- the selenium configuration needed to configure the tomcats, selenium context and maven failsafe (testng) runner.
         The tomcat knows which user to add just for selenium testcases, see additionalUserContext.xml
         The selenium context is defined in the defaultcontext.xml and has variable replacements as specified above.
         The failsafe plugin uses the testng.xml file which comes from this folder.
         In order to customize the selenium tests execution follow the steps:
         1) copy the test/profile/selenium/config folder to a save place
         2) edit the contents of the files (i.e. change executed seleniumtests, add firefox browser executable path to defaultcontext.xml etc.)
         3) run maven among other parameters with -Dselenium.config.files.path="<your-path-without-special-chars>" -->
    <selenium.config.files.path>src/test/profile/selenium/config</selenium.config.files.path>
    <!-- proposal for setting the firefox executable path, which could be used as variable in the defaultcontext.xml
         important if using a firefox script which does not allow to kill the firefoxes after usage. (e.g. Suse 64Bit)-->
    <selenium.config.firefox.path>unused/by/default</selenium.config.firefox.path>

    <!-- properties for debugging -->
    <!-- for debugging reason it may be helpful to set this with 
    -Dcargo.container.wait=true to see if the container is up and running for the seleniumtests. -->
    <cargo.container.wait>false</cargo.container.wait>
    <cargo.container.timeout>300000</cargo.container.timeout>
bps's avatar
bps committed
	</properties>
	<profiles>
		<profile>
		<!-- this serves as an example of how to run something whenever the os familiy matches unix (includes linux as well) -->
			<id>linux</id>
			<activation><os><family>unix</family></os></activation>
			<properties>
				<os.property.file>linux.properties</os.property.file>
			</properties>
			
		</profile>
		<profile>
		<!-- this serves as an example of how to run something whenever the os familiy matches unix (includes linux as well) -->
			<id>windows</id>
			<activation><os><family>windows</family></os></activation>
			<properties>
				<os.property.file>win.properties</os.property.file>
			</properties>
		</profile>

		<profile>
			<id>documentation</id>
			<build>
				<plugins>
					<plugin>
						<groupId>com.sun.tools.jxc.maven2</groupId>
						<artifactId>maven-jaxb-schemagen-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>com.sun.jersey.contribs</groupId>
						<artifactId>maven-wadl-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>xml-maven-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
		
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 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000

    <profile>
      <id>hsqlunittests</id>
      <activation>
        <property>
          <name>with-hsql</name>
        </property>
      </activation>
      <properties>
        <skipTests>false</skipTests>
        <skipITs>true</skipITs>
        <testFailureIgnore>false</testFailureIgnore>
        <test.env.db.hibernate.ddl.auto>create</test.env.db.hibernate.ddl.auto>
        <test.env>hsql</test.env>
      </properties>
      <build>
        <plugins>
          <plugin>
            <!-- Documentation: http://maven.apache.org/plugins/maven-surefire-plugin/ -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.8.1</version>
            <configuration>
              <argLine>-Xmx1024m -Xms1024m</argLine>
            	<systemPropertyVariables>
								<java.io.tmpdir>${project.build.directory}/olatdata</java.io.tmpdir>
							</systemPropertyVariables>
              <testNGArtifactName>none:none</testNGArtifactName>
              <includes>
                <include>**/AllTestsOlatCoreJunit4.java</include>
                <include>**/AllTestsJunit4.java</include>
              </includes>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.4.3</version>
            <executions>
              <execution>
                <id>copy-resources-4-unittests</id>
                <!-- hook in to copy maven.build.properties to allow test and integration-test phase run properly -->
                <phase>generate-test-resources</phase>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <outputDirectory>${basedir}/target/test-classes</outputDirectory>
                  <resources>
                    <resource>
                      <!-- place resources you like to get filtered an copied -->
                      <directory>src/test/profile/${test.env}</directory>
                      <includes>
                        <include>olat.local.properties</include>
                      </includes>
                      <filtering>true</filtering>
                    </resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>mysqlunittests</id>
      <activation>
        <property>
          <name>with-mysql</name>
        </property>
      </activation>
      <properties>
        <skipTests>false</skipTests>
        <skipITs>true</skipITs>
        <testFailureIgnore>false</testFailureIgnore>
        <test.env.db.hibernate.ddl.auto> </test.env.db.hibernate.ddl.auto>
        <test.env>mysql</test.env>
      </properties>
      <build>
        <plugins>
          <plugin>
            <!-- Documentation: http://maven.apache.org/plugins/maven-surefire-plugin/ -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.8.1</version>
            <configuration>
              <argLine>-Xmx512m -Xms512m</argLine>
              <testNGArtifactName>none:none</testNGArtifactName>
              <includes>
                <include>**/AllTestsOlatCoreJunit4.java</include>
                <include>**/AllTestsJunit4.java</include>
              </includes>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.4.3</version>
            <executions>
              <execution>
                <id>copy-resources-4-mysqlunittests</id>
                <!-- hook in to copy maven.build.properties to allow test and integration-test phase run properly -->
                <phase>generate-test-resources</phase>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <outputDirectory>${basedir}/target/test-classes</outputDirectory>
                  <resources>
                    <resource>
                      <!-- place resources you like to get filtered an copied -->
                      <directory>src/test/profile/${test.env}</directory>
                      <includes>
                        <include>olat.local.properties</include>
                      </includes>
                      <filtering>true</filtering>
                    </resource>
                    <resource>
                      <!-- place resources you like to get filtered an copied -->
                      <directory>src/main/resources/database/mysql</directory>
                      <includes>
                        <include>setupDatabase.sql</include>
                      </includes>
                      <filtering>true</filtering>
                    </resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>clean-mysql-dbsetup</id>
      <activation>
        <property>
          <name>with-mysql</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.4.3</version>
            <executions>
              <execution>
                <id>copy-resources-4-clean-mysql-dbsetup</id>
                <phase>generate-test-resources</phase>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <outputDirectory>${basedir}/target/test-classes</outputDirectory>
                  <resources>
                    <resource>
                      <!-- place resources you like to get filtered an copied -->
                      <directory>src/main/resources/database/mysql</directory>
                      <includes>
                        <include>setupDatabase.sql</include>
                      </includes>
                      <filtering>true</filtering>
                    </resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>sql-maven-plugin</artifactId>
            <version>1.4</version>

            <dependencies>
              <dependency>
                <!-- DO NOT UPDATE! -->
                <!-- Due to our special setup where we use the jdbc driver to convert 
				          from utf-8 to iso we cannot update this lib at the moment. -->
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>5.0.8</version>
              </dependency>
            </dependencies>

            <!-- common configuration shared by all executions -->
            <configuration>
              <driver>com.mysql.jdbc.Driver</driver>
              <url>jdbc:mysql://localhost:${test.env.db.host.port}/${test.env.db.name}</url>
              <username>${test.env.db.user}</username>
              <password>${test.env.db.pass}</password>
              <!-- You can comment out username/password configurations and
                   have maven to look them up in your settings.xml using ${settingsKey}
              
              <settingsKey>sensibleKey</settingsKey>-->
              <!--all executions are ignored if -Dmaven.test.skip=true-->
              <skip>${maven.test.skip}</skip>
            </configuration>

            <executions>
              <execution>
                <id>drop-db-before-test</id>
                <phase>process-test-resources</phase>
                <goals>
                  <goal>execute</goal>
                </goals>
                <configuration>
                  <!-- need another database to drop the targeted one -->
                  <url>jdbc:mysql://localhost:${test.env.db.host.port}/olat</url>
                  <autocommit>true</autocommit>
                  <sqlCommand>drop database ${test.env.db.name}</sqlCommand>
                  <!-- ignore error when database is not avaiable -->
                  <onError>continue</onError>
                </configuration>
              </execution>

              <execution>
                <id>create-db</id>
                <phase>process-test-resources</phase>
                <goals>
                  <goal>execute</goal>
                </goals>
                <configuration>
                  <url>jdbc:mysql://localhost:${test.env.db.host.port}/olat</url>
                  <!-- no transaction -->
                  <autocommit>true</autocommit>
                  <sqlCommand>create database ${test.env.db.name}</sqlCommand>
                </configuration>
              </execution>

              <execution>
                <id>create-schema</id>
                <phase>process-test-resources</phase>
                <goals>
                  <goal>execute</goal>
                </goals>
                <configuration>
                  <autocommit>true</autocommit>
                  <srcFiles>
                    <srcFile>target/test-classes/setupDatabase.sql</srcFile>
                  </srcFiles>
                </configuration>
              </execution>
<!--
              <execution>
                <id>create-data</id>
                <phase>process-test-resources</phase>
                <goals>
                  <goal>execute</goal>
                </goals>
                <configuration>
                  <orderFile>ascending</orderFile>
                  <fileset>
                    <basedir>${basedir}</basedir>
                    <includes>
                      <include>src/test/sql/test-data2.sql</include>
                      <include>src/test/sql/test-data1.sql</include>
                    </includes>
                  </fileset>
                </configuration>
              </execution>
-->
              <!-- drop db after test -->
              <execution>
                <id>drop-db-after-test</id>
                <!-- there is no post-test phase, the next phase after "test" is "prepare-package"
                     for integration tests running against mysql generated via setupDatabase.sql there is need
                     to bind a similar drop/create/schema/drop to pre-integration-test and post-integration-test -->
                <phase>prepare-package</phase>
                <goals>
                  <goal>execute</goal>
                </goals>
                <configuration>
                  <autocommit>true</autocommit>
                  <sqlCommand>drop database ${test.env.db.name}</sqlCommand>
                </configuration>
              </execution>
            </executions>
          </plugin>



        </plugins>
      </build>
    </profile>
    <profile>
      <!-- activate this profile to unzip two tomcats instances for cluster setup, which are the configured and used with profile seleniumtests
      bind to phase initialize and execute goal unpack
      ... initialize is an early phase, so that unpacking does not overwrite resources copied over to the tomcats. -->
      <id>install-tomcats</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>2.2</version>
            <executions>
              <execution>
                <id>install-tomcat-one</id>
                <phase>validate</phase>
                <goals>
                  <goal>unpack
                  </goal>
                </goals>
                <configuration>
                  <artifactItems>
                    <artifactItem>
                      <groupId>org.olat.testutils</groupId>
                      <artifactId>zipped-tomcat6x</artifactId>
                      <version>1.0</version>
                      <type>zip</type>
                      <overWrite>true</overWrite>
                      <outputDirectory>${container.tomcat.one.install.dir}</outputDirectory>
                    </artifactItem>
                  </artifactItems>
                  <!-- other configurations here -->
                </configuration>
              </execution>
              <execution>
                <id>install-tomcat-two</id>
                <!-- bind to initialize, that tomcats are unpacked before resources are copied over -->
                <phase>validate</phase>
                <goals>
                  <goal>unpack</goal>
                </goals>
                <configuration>
                  <artifactItems>
                    <artifactItem>
                      <groupId>org.olat.testutils</groupId>
                      <artifactId>zipped-tomcat6x</artifactId>
                      <version>1.0</version>
                      <type>zip</type>
                      <overWrite>true</overWrite>
                      <outputDirectory>${container.tomcat.two.install.dir}</outputDirectory>
                    </artifactItem>
                  </artifactItems>
                  <!-- other configurations here -->
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>debug</id>
      <properties>
        <skipTests>true</skipTests>
        <skipITs>true</skipITs>
        <cargo.container.wait>true</cargo.container.wait>
      </properties>
    </profile>


    <profile>
      <!-- activate this profile to run Selenium based Integration Tests against a cluster running locally
      configures:
      - surefire-plugin to include none of the IntegrationTests
      - failsafe-plugin to include Seleniumtests via testng.xml
      
      in general hooks into: (please check the profile execution against the docu)
      - initialize
      ... cleans the tomcats working directories.
      - generate-resources
      ... resources-plugin to copy the maven.build.properties and selenium specific additionalUserContext.xml and specific olat.local.properties for tomcat-one and tomcat-two.
      ... copies jms configuration
      - generate-test-resources
      ... antrun-plugin to transform the olat page sets into selenium JS, creates the olat-user-extension.js file for selenium server start.
      ... resources-plugin to copy the maven.build.properties to the test-classes tree, would be needed for failsafe *ITCase tests.
      - pre-integration-test
      ... selenium-maven-plugin to start the selenium server (runs in the background and logs output to target/selenium/server.log) using the generated olat-user-extension.js
      ... starts an active mq jms for cluster instances.
      ... cargo-maven2-plugin deploying the asset OLAT-LMS into two tomcats which must be installed beforehand with (-Pinstall-tomcats)
      - post-integration-test
      ... cargo-maven2-plugin stops the started tomcat(s)
      ... stops active mq
      ... stops selenium
      -->
      <id>seleniumtests</id>
      <properties>
        <!-- seleniumtests are started with the command mvn verify -Pseleniumtests -->
        <skipTests>false</skipTests>
        <skipITs>false</skipITs>
      </properties>
      <build>

        <plugins>

          <plugin>
            <!-- Documentation: http://maven.apache.org/plugins/maven-surefire-plugin/ -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.7.2</version>
            <configuration>
              <includes>
                <include>none</include>
              </includes>
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <phase>generate-test-resources</phase>
                <configuration>
                  <target unless="maven.test.skip">
                    <echo message="Generate ../target/olat-user-extensions.js for Seleniumserverstart"/>
                    <xslt in="${basedir}/src/test/profile/selenium/ui-map/olat-ui-map.xml" out="${basedir}/target/generated_combined_olat-ui-map.xml" style="${basedir}/src/test/profile/selenium/ui-map/resources/resolve_includes.xsl"/>
                    <xslt in="${basedir}/target/generated_combined_olat-ui-map.xml" out="${basedir}/target/olat-ui-map.js" style="${basedir}/src/test/profile/selenium/ui-map/resources/gen_olat-ui-map.xsl">
										</xslt>
                    <concat destfile="${basedir}/target/olat-user-extensions.js">
                      <fileset file="${basedir}/target/olat-ui-map.js"/>
                      <fileset file="${basedir}/src/test/profile/selenium/ui-map/resources/rollups.js"/>
                    </concat>
                  </target>
                </configuration>
                <goals>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.4.3</version>
            <executions>
              <execution>
                <id>tomcat-one-server_xml</id>
                <phase>initialize</phase>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <outputDirectory>${container.tomcat.one.home}/conf/</outputDirectory>
                  <resources>
                    <resource>
                      <directory>src/test/profile/cluster/tomcat-one/conf</directory>
                      <includes>
                        <include>server.xml</include>
                      </includes>
                      <filtering>true</filtering>
                    </resource>
                  </resources>
                </configuration>
              </execution>
              <execution>
                <id>tomcat-two-server_xml</id>
                <phase>initialize</phase>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <outputDirectory>${container.tomcat.two.home}/conf/</outputDirectory>
                  <resources>
                    <resource>
                      <directory>src/test/profile/cluster/tomcat-two/conf</directory>
                      <includes>
                        <include>server.xml</include>
                      </includes>
                      <filtering>true</filtering>
                    </resource>
                  </resources>
                </configuration>
              </execution>
              <execution>
                <id>seleniumtests-config-tomcat-one</id>
                <phase>initialize</phase>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <outputDirectory>${container.tomcat.one.home}/lib/</outputDirectory>
                  <overwrite>true</overwrite>
                  <resources>
                    <!-- olat.local.properties with different environments
                      typically meant for hsql / mysql / etc.   -->
                    <resource>
                      <directory>src/test/profile/cluster/tomcat-one/lib</directory>
                      <includes>
                        <include>olat.local.properties</include>
                        <include>treecache.xml</include>
                      </includes>
                      <filtering>true</filtering>
                    </resource>
                    <!-- Users to be created on OLAT startup for selenium testcases are configured in this file  -->
                    <resource>
                      <directory>${selenium.config.files.path}</directory>
                      <includes>
                        <include>additionalUserContext.xml</include>
                      </includes>
                      <filtering>true</filtering>
                    </resource>
                  </resources>
                </configuration>
              </execution>
              <execution>
                <id>seleniumtests-config-activemq</id>
                <phase>initialize</phase>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <outputDirectory>cargo/</outputDirectory>
                  <overwrite>true</overwrite>
                  <resources>
                    <resource>
                      <directory>src/test/profile/cluster/activemq</directory>
                      <includes>
                        <include>activemq.xml</include>
                      </includes>
                      <filtering>true</filtering>                    
                    </resource>
                  </resources>
                </configuration>
              </execution>
              <execution>
                <id>seleniumtests-config-tomcat-two</id>
                <phase>initialize</phase>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <outputDirectory>${container.tomcat.two.home}/lib/</outputDirectory>
                  <overwrite>true</overwrite>
                  <resources>
                    <resource>
                      <directory>src/test/profile/cluster/tomcat-two/lib</directory>
                      <includes>
                        <include>olat.local.properties</include>
                        <include>treecache.xml</include>
                      </includes>
                      <filtering>true</filtering>                    
                    </resource>
                  </resources>
                </configuration>
              </execution>
              <execution>
                <id>seleniumtests-config-misc</id>
                <phase>process-test-resources</phase>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <outputDirectory>${basedir}/target/test-classes</outputDirectory>
                  <resources>
                    <resource>
                      <directory>${selenium.config.files.path}</directory>
                      <includes>
                        <include>defaultcontext.xml</include>
                        <include>testng.xml</include>
                      </includes>
                      <filtering>true</filtering>
                    </resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.activemq.tooling</groupId>
            <artifactId>maven-activemq-plugin</artifactId>
            <version>5.3.0</version>
            <executions>
              <execution>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <configUri>xbean:file:${basedir}/cargo/activemq.xml</configUri>
                  <fork>true</fork>
                  <systemProperties>
			              <property>
			                <name>org.apache.activemq.default.directory.prefix</name>
			                <value>./target/</value>
			              </property>
        		      </systemProperties>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>selenium-maven-plugin</artifactId>
            <version>1.1</version>
            <executions>
              <execution>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>start-server</goal>
                </goals>
                <configuration>
                  <!-- run selenium server in background and log output ${basedir}target/server.log. 
										Append to ${basedir}/target/selenium/user-extensions.js -->
                  <background>true</background>
                  <logOutput>true</logOutput>
                  <userExtensions>${basedir}/target/olat-user-extensions.js</userExtensions>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.7.2</version>
            <configuration>
              <suiteXmlFiles>
                <!--  Seleniumtests run with testng, the included tests are defined in the following suite xml.
                      The file is located in src/test/resources/testng.xml. Dependencies of tests are defined
                      over annotations. -->
                <suiteXmlFile>target/test-classes/testng.xml</suiteXmlFile>
              </suiteXmlFiles>
              <testFailureIgnore>true</testFailureIgnore>
            </configuration>
            <executions>
              <execution>
                <id>integration-test</id>
                <goals>
                  <goal>integration-test</goal>
                </goals>
              </execution>
              <execution>
                <id>verify</id>
                <goals>
                  <goal>verify</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-maven2-plugin</artifactId>
            <configuration>Selenium
              <container>
                <containerId>tomcat6x</containerId>
                <timeout>${cargo.container.timeout}</timeout>
              </container>
            </configuration>
            <executions>
              <execution>
                <id>tomcat-one-start</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>start</goal>
                </goals>
                <configuration>
                  <wait>false</wait>
                  <container>
                    <containerId>tomcat6x</containerId>
                    <type>installed</type>
                    <home>${container.tomcat.one.home}</home>
                  </container>
                  <configuration>
                    <type>existing</type>
                    <home>${container.tomcat.one.home}</home>
                    <properties>
                      <cargo.servlet.port>${container.tomcat.one.port}</cargo.servlet.port>
                      <cargo.logging>high</cargo.logging>
<!--
                      <cargo.jvmargs>
                          "-Xdebug" "-Xrunjdwp:transport=dt_socket,address=4646,server=y,suspend=n"
                      </cargo.jvmargs>
-->
                    </properties>
                    <deployables>
                      <deployable>
                        <groupId>org.olat</groupId>
                        <artifactId>OLAT-LMS</artifactId>
                        <type>war</type>
                        <properties>
                          <context>olat</context>
                        </properties>
                        <pingURL>http://localhost:${container.tomcat.one.port}/cargocpc/</pingURL>
                        <pingTimeout>300000</pingTimeout>
                      </deployable>
                    </deployables>
                  </configuration>
                </configuration>
              </execution>
              <execution>
                <id>tomcat-one-stop</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>stop</goal>
                </goals>
                <configuration>
                  <configuration>
                    <type>existing</type>
                    <home>${container.tomcat.one.home}</home>
                  </configuration>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-maven2-plugin</artifactId>
            <configuration>
              <container>
                <containerId>tomcat6x</containerId>
                <timeout>${cargo.container.timeout}</timeout>
              </container>
            </configuration>
            <executions>
              <execution>
                <id>tomcat-two-start</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>start</goal>
                </goals>
                <configuration>
                  <wait>${cargo.container.wait}</wait>
                  <container>