blob: 0bbd5e657318a72b3d25d4b855c8df5fc852f519 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
#*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License 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.
*#
#set($dollar = '$')
#macro (var $label)${dollar}{${label}}#end
<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>${package}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<packaging>war</packaging>
<name>${turbine_app_name}</name>
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
</resource>
<!-- (target) resource and filtering is not used at all ?
at least removed setting absolute path e.g. with #var("project.build.directory"),
which does thrown an exception with mvn eclipse:eclipse - path is then incorrectly relativized.
-->
<resource>
<targetPath>../torque/schema</targetPath>
<filtering>true</filtering>
<directory>src/main/torque-schema</directory>
<includes>
<include>*.xml</include>
</includes>
</resource>
</resources>
<testSourceDirectory>src/test/java</testSourceDirectory>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<includes>
<include>*.xml</include>
<include>*.properties</include>
</includes>
</testResource>
</testResources>
<plugins>
<!-- test will not fail in turbine 4.0.1 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M2</version>
<configuration>
<skipTests>#var("skipTests")</skipTests>
<!--default setting is forkCount=1/reuseForks=true -->
<reuseForks>false</reuseForks>
<forkCount>1</forkCount>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>#var("maven.compile.source")</source>
<target>#var("maven.compile.target")</target>
<encoding>#var("project.build.sourceEncoding")</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.torque</groupId>
<artifactId>torque-maven-plugin</artifactId>
<version>#var("torque.version")</version>
<configuration>
<schemaDir>#var("project.basedir")/src/main/torque-schema</schemaDir>
<useClasspath>true</useClasspath>
<runOnlyOnSchemaChange>false</runOnlyOnSchemaChange>
<targetDatabase>${turbine_database_adapter}</targetDatabase>
</configuration>
<executions>
<execution>
<id>torque-om</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<packaging>classpath</packaging>
<configPackage>org.apache.torque.templates.om</configPackage>
<sourceDir>#var("project.basedir")/src/main/torque-schema</sourceDir>
<loglevel>error</loglevel>
<options>
<torque.database>${turbine_database_adapter}</torque.database>
<torque.om.package>${package}.om</torque.om.package>
<torque.om.addGetByNameMethods>false</torque.om.addGetByNameMethods>
<torque.om.save.saveException>TorqueException</torque.om.save.saveException>
<torque.om.useIsForBooleanGetters>true</torque.om.useIsForBooleanGetters>
<torque.om.useManagers>false</torque.om.useManagers>
<torque.om.addTimeStamp>true</torque.om.addTimeStamp>
<torque.om.objectIsCaching>true</torque.om.objectIsCaching>
<torque.om.save.addSaveMethods>true</torque.om.save.addSaveMethods>
<torque.om.addGetByNameMethods>true</torque.om.addGetByNameMethods>
<torque.om.complexObjectModel>true</torque.om.complexObjectModel>
</options>
<!-- keeping defaultOutputDir in default ${project.build.directory}/generated-sources will havee the base classes there -->
<!-- we want the classes, which may be custumoized in the source directory. Ignore the warning about generated-java -->
<outputDirMap>
<modifiable>#var("project.build.sourceDirectory")</modifiable>
</outputDirMap>
</configuration>
</execution>
<execution>
<id>torque-sql-mysql</id><!-- ${turbine_database_adapter} -->
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<packaging>classpath</packaging>
<configPackage>org.apache.torque.templates.sql</configPackage>
<sourceDir>#var("project.basedir")/src/main/torque-schema</sourceDir>
<defaultOutputDir>#var("project.build.directory")/generated-sql/torque/mysql</defaultOutputDir>
<defaultOutputDirUsage>none</defaultOutputDirUsage>
<loglevel>error</loglevel>
<options>
<torque.database>mysql</torque.database>
</options>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.torque</groupId>
<artifactId>torque-templates</artifactId>
<version>#var("torque.version")</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.2</version>
<configuration>
<archive>
<manifestEntries>
<X-Compile-Source-JDK>#var("maven.compile.source")</X-Compile-Source-JDK>
<X-Compile-Target-JDK>#var("maven.compile.target")</X-Compile-Target-JDK>
</manifestEntries>
</archive>
<!-- containerConfigXML>WEB-INF/build/context.xml</containerConfigXML -->
</configuration>
</plugin>
<!-- Required to execute torque database build -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<version>1.5</version>
<configuration>
<!-- Please update with your database configuration -->
<driver>${turbine_database_driver}</driver>
<!-- The serverTimezone parameter is required for MySQL.
You may need to remove it for other databases -->
<url>${turbine_database_url}${turbine_database_name}?serverTimezone=${turbine_database_timezone}&amp;useSSL=false&amp;verifyServerCertificate=false&amp;requireSSL=false</url>
<username>${turbine_database_user}</username>
<password>${turbine_database_password}</password>
<onError>continue</onError>
<autocommit>true</autocommit>
<orderFile>descending</orderFile>
</configuration>
<!-- update with your database driver dependency -->
<!-- this is mysql specific -->
<dependencies>
<dependency>
<artifactId>mysql-connector-java</artifactId>
<groupId>mysql</groupId>
<version>#var("mysql.version")</version>
</dependency>
</dependencies>
<!-- this is mysql specific -->
<executions>
<execution>
<id>create-db</id>
<phase>pre-integration-test</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<orderFile>ascending</orderFile>
<fileset>
<basedir>#var("project.build.directory")/generated-sql/torque/mysql</basedir>
<!-- basedir>${basedir}/target/generated-sql</basedir -->
<includes>
<include>*.sql</include>
</includes>
</fileset>
</configuration>
</execution>
<execution>
<id>create-data</id>
<phase>pre-integration-test</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<orderFile>ascending</orderFile>
<srcFiles>
<srcFile>#var("project.basedir")/docs/sample-mysql-data/_application-data.sql</srcFile>
<srcFile>#var("project.basedir")/docs/sample-mysql-data/_turbine-security-data.sql</srcFile>
</srcFiles>
</configuration>
</execution>
</executions>
</plugin>
<!-- jetty:run checks deployed war http://localhost:8081/app/
Using jetty 9 as supporting java 8. Other specs cft. https://www.eclipse.org/jetty/documentation/9.4.x/what-jetty-version.html -->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<!-- latest one that seems to be working,
v20181111 and v20181114 coming up not found on maven central -->
<version>9.4.12.v20180830</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<dumpOnStart>true</dumpOnStart>
<reload>manual</reload>
<httpConnector>
<port>8081</port>
</httpConnector>
<!--webApp>
<contextPath>/app</contextPath>
</webApp-->
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!-- update with the database driver of your choice -->
<dependency>
<artifactId>mysql-connector-java</artifactId>
<groupId>mysql</groupId>
<version>#var("mysql.version")</version>
</dependency>
<!-- Allow lookup of #var("web:rootDir") in log4j2 file -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-web</artifactId>
<version>#var("log4j2.version")</version>
</dependency>
<!-- Required for Java 9 and higher -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.turbine</groupId>
<artifactId>turbine</artifactId>
<version>#var("turbine.core")</version>
<!-- should be resolved after upgrade to torque-4.1 -->
<exclusions>
<exclusion>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.fulcrum</groupId>
<artifactId>fulcrum-yaafi</artifactId>
<version>#var("fulcrum.yaafi")</version>
</dependency>
<!-- if using intake -->
<dependency>
<groupId>org.apache.fulcrum</groupId>
<artifactId>fulcrum-intake</artifactId>
<version>#var("fulcrum.intake")</version>
</dependency>
<!-- include some optional dependencies required in example componentConfiguration.xml -->
<!-- cache 1.1.1-SNAPSHOT still not building properly -->
<dependency>
<groupId>org.apache.fulcrum</groupId>
<artifactId>fulcrum-cache</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.fulcrum</groupId>
<artifactId>fulcrum-security-memory</artifactId>
<version>#var("fulcrum.security")</version>
</dependency>
<dependency>
<groupId>org.apache.fulcrum</groupId>
<artifactId>fulcrum-security-torque</artifactId>
<version>#var("fulcrum.security")</version>
<exclusions>
<exclusion><!-- will we mapped in jcl-over-slf4j -->
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.fulcrum</groupId>
<artifactId>fulcrum-security-api</artifactId>
<version>#var("fulcrum.security")</version>
</dependency>
<dependency>
<groupId>org.apache.fulcrum</groupId>
<artifactId>fulcrum-json-jackson2</artifactId>
<version>#var("fulcrum.json")</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-json-org</artifactId>
<!-- version>$dollar{jackson.version}</version-->
<!-- 2.7.x has Java 7 baseline, but not compiled with Java 6 support (version 51 error:), cft. https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.7 Changes: compatibility: .. should still be possible to use Jackson 2.7 on Java 6, but not compile, build. With Jackson 2.8, Java 7 languages features will be allowed -->
<version>2.6.6</version>
</dependency>
<!-- if activating useJsonPath include jayway dependency -->
<!-- dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>2.4.0</version>
<exclusions>
<exclusion>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
</exclusion>
</exclusions>
</dependency-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.fulcrum</groupId>
<artifactId>fulcrum-testcontainer</artifactId>
<version>#var("fulcrum.testcontainer")</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<maven.compile.source>1.8</maven.compile.source>
<maven.compile.target>1.8</maven.compile.target>
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
<log4j2.version>2.12.0</log4j2.version>
<mysql.version>8.0.17</mysql.version>
<torque.version>4.0</torque.version>
<fulcrum.json>2.0.0</fulcrum.json>
<fulcrum.intake>2.0.0</fulcrum.intake>
<fulcrum.security>1.1.3</fulcrum.security>
<fulcrum.yaafi>1.0.8</fulcrum.yaafi>
<fulcrum.testcontainer>1.0.8</fulcrum.testcontainer>
<turbine.core>5.0</turbine.core>
<skipTests>true</skipTests>
</properties>
<profiles>
<profile>
<id>jetty</id>
<build>
<defaultGoal>jetty:run</defaultGoal>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<configuration>
<httpConnector>
<port>8081</port>
<idleTimeout>60000</idleTimeout>
</httpConnector>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>tomcat</id>
<build>
<defaultGoal>tomcat:run</defaultGoal>
<finalName>${artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<port>15000</port>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>