1<?xml version="1.0" encoding="UTF-8"?> 2<!-- 3 4 Licensed to the Apache Software Foundation (ASF) under one 5 or more contributor license agreements. See the NOTICE file 6 distributed with this work for additional information 7 regarding copyright ownership. The ASF licenses this file 8 to you under the Apache License, Version 2.0 (the 9 "License"); you may not use this file except in compliance 10 with the License. You may obtain a copy of the License at 11 12 http://www.apache.org/licenses/LICENSE-2.0 13 14 Unless required by applicable law or agreed to in writing, 15 software distributed under the License is distributed on an 16 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 KIND, either express or implied. See the License for the 18 specific language governing permissions and limitations 19 under the License. 20 21--> 22<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/xsd/maven-4.0.0.xsd"> 23 <modelVersion>4.0.0</modelVersion> 24 <parent> 25 <groupId>org.apache.velocity</groupId> 26 <artifactId>velocity-engine-parent</artifactId> 27 <version>2.4-SNAPSHOT</version> 28 </parent> 29 30 <artifactId>velocity-engine-core</artifactId> 31 <name>Apache Velocity - Engine</name> 32 33 <properties> 34 <!-- You should not directly modify those properties which define the behavior of the parser. 35 Instead, you should customize the velocity-custom-parser-example module to fit your own needs. 36 --> 37 <parser.debug>false</parser.debug> 38 <parser.package>org.apache.velocity.runtime.parser</parser.package> 39 <parser.basename>Standard</parser.basename> 40 <parser.char.asterisk>*</parser.char.asterisk> 41 <parser.char.at>@</parser.char.at> 42 <parser.char.dollar>$</parser.char.dollar> 43 <parser.char.hash>#</parser.char.hash> 44 45 <!-- You can modify those properties locally to test 46 the DataSourceResourceLoader against other engines. 47 Please note that you may have to also alter the file 48 src/test/resources/ds/create-db.sql for specific engine SQL grammars. 49 --> 50 <test.jdbc.driver.groupId>org.hsqldb</test.jdbc.driver.groupId> 51 <test.jdbc.driver.artifactId>hsqldb</test.jdbc.driver.artifactId> 52 <test.jdbc.driver.version>2.7.1</test.jdbc.driver.version> 53 <test.jdbc.driver.classifier>jdk8</test.jdbc.driver.classifier> 54 <test.jdbc.driver.className>org.hsqldb.jdbcDriver</test.jdbc.driver.className> 55 <test.jdbc.uri>jdbc:hsqldb:.</test.jdbc.uri> 56 <test.jdbc.login>sa</test.jdbc.login> 57 <test.jdbc.password /> 58 </properties> 59 60 <build> 61 <plugins> 62 <plugin> 63 <groupId>org.apache.maven.plugins</groupId> 64 <artifactId>maven-source-plugin</artifactId> 65 </plugin> 66 <plugin> 67 <groupId>org.apache.maven.plugins</groupId> 68 <artifactId>maven-resources-plugin</artifactId> 69 <executions> 70 <!-- prepare parser grammar file --> 71 <execution> 72 <id>generate-parser-grammar</id> 73 <phase>generate-sources</phase> 74 <goals> 75 <goal>copy-resources</goal> 76 </goals> 77 <configuration> 78 <useDefaultDelimiters>false</useDefaultDelimiters> 79 <delimiters> 80 <delimiter>${*}</delimiter> 81 </delimiters> 82 <resources> 83 <resource> 84 <directory>src/main/parser</directory> 85 <filtering>true</filtering> 86 </resource> 87 </resources> 88 <outputDirectory>${project.build.directory}/parser</outputDirectory> 89 </configuration> 90 </execution> 91 <!-- expose the raw grammar file for the custom parser maven plugin --> 92 <execution> 93 <id>expose-parser-grammar</id> 94 <phase>process-resources</phase> 95 <goals> 96 <goal>copy-resources</goal> 97 </goals> 98 <configuration> 99 <resources> 100 <resource> 101 <directory>src/main/parser</directory> 102 <filtering>false</filtering> 103 </resource> 104 </resources> 105 <outputDirectory>${project.build.outputDirectory}/org/apache/velocity/runtime/parser</outputDirectory> 106 </configuration> 107 </execution> 108 </executions> 109 </plugin> 110 111 <!-- shading of commons-io --> 112 <plugin> 113 <groupId>org.apache.maven.plugins</groupId> 114 <artifactId>maven-shade-plugin</artifactId> 115 <version>3.2.1</version> 116 <executions> 117 <execution> 118 <id>shade</id> 119 <phase>package</phase> 120 <goals> 121 <goal>shade</goal> 122 </goals> 123 <configuration> 124 <artifactSet> 125 <includes> 126 <include>commons-io:commons-io</include> 127 </includes> 128 <excludes> 129 <exclude>org.slf4j:slf4j-api</exclude> 130 </excludes> 131 </artifactSet> 132 <relocations> 133 <relocation> 134 <pattern>org.apache.commons.io</pattern> 135 <shadedPattern>org.apache.velocity.shaded.commons.io</shadedPattern> 136 </relocation> 137 </relocations> 138 <minimizeJar>true</minimizeJar> 139 </configuration> 140 </execution> 141 </executions> 142 </plugin> 143 144 <!-- parser --> 145 <plugin> 146 <groupId>org.codehaus.mojo</groupId> 147 <artifactId>javacc-maven-plugin</artifactId> 148 <version>2.6</version> 149 <configuration> 150 <isStatic>false</isStatic> 151 <buildParser>true</buildParser> 152 <buildNodeFiles>false</buildNodeFiles> 153 <multi>true</multi> 154 <debugParser>${parser.debug}</debugParser> 155 <debugLookAhead>${parser.debug}</debugLookAhead> 156 <debugTokenManager>${parser.debug}</debugTokenManager> 157 <jdkVersion>${maven.compiler.target}</jdkVersion> 158 <nodeUsesParser>true</nodeUsesParser> 159 <nodePackage>org.apache.velocity.runtime.parser.node</nodePackage> 160 <sourceDirectory>${project.build.directory}/parser</sourceDirectory> 161 <tokenManagerUsesParser>true</tokenManagerUsesParser> 162 </configuration> 163 <executions> 164 <!-- build the standard parser --> 165 <execution> 166 <id>jjtree-javacc</id> 167 <goals> 168 <goal>jjtree-javacc</goal> 169 </goals> 170 <configuration> 171 <includes> 172 <include>Parser.jjt</include> 173 </includes> 174 </configuration> 175 </execution> 176 </executions> 177 </plugin> 178 179 <!-- post-processing of parser genereted source files --> 180 <plugin> 181 <groupId>com.google.code.maven-replacer-plugin</groupId> 182 <artifactId>replacer</artifactId> 183 <executions> 184 <execution> 185 <id>patch-parser-files</id> 186 <phase>process-sources</phase> 187 <goals> 188 <goal>replace</goal> 189 </goals> 190 <configuration> 191 <file>${project.build.directory}/generated-sources/javacc/org/apache/velocity/runtime/parser/TokenMgrError.java</file> 192 <replacements> 193 <replacement> 194 <token>static final int</token> 195 <value>public static final int</value> 196 </replacement> 197 </replacements> 198 </configuration> 199 </execution> 200 </executions> 201 </plugin> 202 203 <!-- handle VelocityEngineVersion file --> 204 <plugin> 205 <groupId>org.codehaus.mojo</groupId> 206 <artifactId>templating-maven-plugin</artifactId> 207 <version>1.0.0</version> 208 <executions> 209 <execution> 210 <id>filter-src</id> 211 <goals> 212 <goal>filter-sources</goal> 213 </goals> 214 </execution> 215 </executions> 216 </plugin> 217 218 <!-- handle OSGi information --> 219 <plugin> 220 <groupId>org.apache.felix</groupId> 221 <artifactId>maven-bundle-plugin</artifactId> 222 <configuration> 223 <instructions> 224 <Export-Package> 225 org.apache.velocity.* 226 </Export-Package> 227 <Import-Package> 228 !org.apache.commons.io, 229 * 230 </Import-Package> 231 </instructions> 232 </configuration> 233 </plugin> 234 235 <!-- tests --> 236 <plugin> 237 <groupId>org.apache.maven.plugins</groupId> 238 <artifactId>maven-surefire-plugin</artifactId> 239 <version>${surefire.plugin.version}</version> 240 <configuration> 241 <skip>${maven.test.skip}</skip> 242 <systemProperties> 243 <property> 244 <name>test</name> 245 <value>${test}</value> 246 </property> 247 <property> 248 <name>test.compare.dir</name> 249 <value>${project.build.testOutputDirectory}</value> 250 </property> 251 <property> 252 <name>test.result.dir</name> 253 <value>${project.build.directory}/results</value> 254 </property> 255 <property> 256 <name>org.slf4j.simpleLogger.defaultLogLevel</name> 257 <value>warn</value> 258 </property> 259 <property> 260 <name>org.slf4j.simpleLogger.logFile</name> 261 <value>${project.build.directory}/velocity.log</value> 262 </property> 263 <property> 264 <name>test.jdbc.driver.className</name> 265 <value>${test.jdbc.driver.className}</value> 266 </property> 267 <property> 268 <name>test.jdbc.uri</name> 269 <value>${test.jdbc.uri}</value> 270 </property> 271 <property> 272 <name>test.jdbc.login</name> 273 <value>${test.jdbc.login}</value> 274 </property> 275 <property> 276 <name>test.jdbc.password</name> 277 <value>${test.jdbc.password}</value> 278 </property> 279 </systemProperties> 280 </configuration> 281 <executions> 282 <execution> 283 <id>integration-test</id> 284 <phase>integration-test</phase> 285 <goals> 286 <goal>test</goal> 287 </goals> 288 <configuration> 289 <skip>false</skip> 290 </configuration> 291 </execution> 292 </executions> 293 </plugin> 294 295 </plugins> 296 </build> 297 298 <dependencies> 299 <dependency> 300 <groupId>org.apache.commons</groupId> 301 <artifactId>commons-lang3</artifactId> 302 <version>3.11</version> 303 </dependency> 304 <dependency> 305 <groupId>org.slf4j</groupId> 306 <artifactId>slf4j-api</artifactId> 307 <version>${slf4j.version}</version> 308 </dependency> 309 <dependency> 310 <groupId>junit</groupId> 311 <artifactId>junit</artifactId> 312 <version>${junit.version}</version> 313 <scope>test</scope> 314 </dependency> 315 <dependency> 316 <groupId>${test.jdbc.driver.groupId}</groupId> 317 <artifactId>${test.jdbc.driver.artifactId}</artifactId> 318 <version>${test.jdbc.driver.version}</version> 319 <scope>test</scope> 320 <classifier>${test.jdbc.driver.classifier}</classifier> 321 </dependency> 322 <dependency> 323 <groupId>commons-io</groupId> 324 <artifactId>commons-io</artifactId> 325 <version>2.8.0</version> 326 </dependency> 327 <dependency> 328 <groupId>org.slf4j</groupId> 329 <artifactId>slf4j-simple</artifactId> 330 <version>${slf4j.version}</version> 331 <scope>test</scope> 332 </dependency> 333 </dependencies> 334 335 <reporting> 336 <plugins> 337 <plugin> 338 <groupId>org.codehaus.mojo</groupId> 339 <artifactId>findbugs-maven-plugin</artifactId> 340 <version>3.0.5</version> 341 <configuration> 342 <xmlOutput>true</xmlOutput> 343 <threshold>Low</threshold> 344 <effort>Max</effort> 345 <excludeFilterFile>src/etc/build/findbugs-exclude.xml</excludeFilterFile> 346 <xmlOutputDirectory>target/site</xmlOutputDirectory> 347 </configuration> 348 </plugin> 349 </plugins> 350 </reporting> 351</project> 352