blob: 8716d2023694806d1089e6790465044aeb77ab89 [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.
"Can't canonicalize system path"
-->
<resource>
<directory>src/main/docker-resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*</include>
</includes>
<targetPath>../docker-resources</targetPath>
</resource>
<resource>
<directory>src/main/data</directory>
<includes>
<include>**/*</include>
</includes>
<targetPath>../data</targetPath>
</resource>
<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.1</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>
<webResources>
<resource>
<directory>#var("project.basedir")/src/main/webapp/WEB-INF</directory>
<filtering>true</filtering>
<targetPath>WEB-INF</targetPath>
<includes>
<include>jetty-env.xml</include>
</includes>
</resource>
</webResources>
<!-- 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>#var("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>
<skip>${docker}</skip>
<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>
<skip>${docker}</skip>
<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>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>2.3.3</version>
</dependency>
<!-- 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>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j2.version}</version>
</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>org.apache.fulcrum</groupId>
<artifactId>fulcrum-quartz</artifactId>
</exclusion-->
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-email</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 -->
<dependency>
<groupId>org.apache.fulcrum</groupId>
<artifactId>fulcrum-cache</artifactId>
<version>#var("fulcrum.cache")</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>${jackson.version}</version-->
<!-- https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.11.3 -->
<version>2.11.3</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.13.1</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.14.1</log4j2.version>
<mysql.version>8.0.25</mysql.version>
<fulcrum.json>2.0.1</fulcrum.json>
<fulcrum.intake>2.0.0</fulcrum.intake>
<fulcrum.security>2.0.1-SNAPSHOT</fulcrum.security>
<fulcrum.yaafi>1.0.8</fulcrum.yaafi>
<fulcrum.cache>2.0.0</fulcrum.cache>
<fulcrum.testcontainer>1.0.9</fulcrum.testcontainer>
<torque.version>5.1-SNAPSHOT</torque.version>
<turbine.core>5.1-SNAPSHOT</turbine.core>
<!--
<torque.version>5.0</torque.version>
<turbine.core>5.0</turbine.core>
<torque.version>5.1-SNAPSHOT</torque.version>
<turbine.core>5.1-SNAPSHOT</turbine.core>
<fulcrum.intake>2.0.1-SNAPSHOT</fulcrum.intake>
<fulcrum.security>2.0.0-SNAPSHOT</fulcrum.security>
-->
<skipTests>true</skipTests>
<docker>false</docker>
<turbine_database_url>${turbine_database_url}</turbine_database_url>
<app_volume_local_repo>NOT_USED</app_volume_local_repo>
</properties>
<profiles>
<profile>
<id>jetty</id>
<build>
<defaultGoal>jetty:run</defaultGoal>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.43.v20210629</version>
<configuration>
<!-- https://www.eclipse.org/jetty/documentation/jetty-9/index.html#jars-scanned-for-annotations -->
<scanIntervalSeconds>10</scanIntervalSeconds>
<httpConnector>
<port>8081</port>
<idleTimeout>60000</idleTimeout>
</httpConnector>
<webApp>
<jettyEnvXml>${project.build.directory}/${project.build.finalName}/WEB-INF/jetty-env.xml</jettyEnvXml>
</webApp>
</configuration>
</plugin>
<!-- we call this profile in docker-resources/docker-compose.yml for app,
which should not replace /m2repo,
we want to avoid a second parsing from inside the container -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<skip>true</skip>
</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>
<profile>
<id>docker</id>
<activation>
<activeByDefault>${docker}</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<executions>
<execution>
<id>create-db</id>
<configuration>
<skip>true</skip>
</configuration>
</execution>
<execution>
<id>create-data</id>
<configuration>
<skip>true</skip>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<!-- hard code docker compose service id and port by default -->
<turbine_database_url>jdbc:mysql://db:3306/</turbine_database_url>
<!-- read from #var("settings.localRepository") to provide e.g. local snapshot builds -->
<app_volume_local_repo>${settings.localRepository}</app_volume_local_repo>
<docker>true</docker>
</properties>
</profile>
</profiles>
</project>