| <?xml version="1.0"?> |
| <!-- |
| 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. |
| --> |
| <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"> |
| <modelVersion>4.0.0</modelVersion> |
| |
| <groupId>org.apache.commons.weaver.it</groupId> |
| <artifactId>privilizer-sample</artifactId> |
| <version>1.0-SNAPSHOT</version> |
| |
| <description>A simple IT verifying the basic use case.</description> |
| <properties> |
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| <privilizer.policy>ON_INIT</privilizer.policy> |
| <privilizer.verify>true</privilizer.verify> |
| <ant.version>1.9.3</ant.version> |
| </properties> |
| |
| <dependencies> |
| <dependency> |
| <groupId>@project.groupId@</groupId> |
| <artifactId>commons-lang3</artifactId> |
| <version>3.4</version> |
| </dependency> |
| <dependency> |
| <groupId>@project.groupId@</groupId> |
| <artifactId>commons-weaver-privilizer-api</artifactId> |
| <version>@project.version@</version> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>junit</groupId> |
| <artifactId>junit</artifactId> |
| <version>4.13.1</version> |
| <scope>test</scope> |
| </dependency> |
| </dependencies> |
| <build> |
| <plugins> |
| <plugin> |
| <artifactId>maven-compiler-plugin</artifactId> |
| <configuration> |
| <source>1.8</source> |
| <target>1.8</target> |
| </configuration> |
| </plugin> |
| <plugin> |
| <groupId>@project.groupId@</groupId> |
| <artifactId>commons-weaver-maven-plugin</artifactId> |
| <version>@project.version@</version> |
| <configuration> |
| <weaverConfig> |
| <privilizer.accessLevel>PACKAGE</privilizer.accessLevel> |
| <privilizer.policy>${privilizer.policy}</privilizer.policy> |
| <privilizer.verify>${privilizer.verify}</privilizer.verify> |
| </weaverConfig> |
| </configuration> |
| <executions> |
| <execution> |
| <goals> |
| <goal>prepare</goal> |
| <goal>weave</goal> |
| </goals> |
| </execution> |
| </executions> |
| <dependencies> |
| <dependency> |
| <groupId>@project.groupId@</groupId> |
| <artifactId>@project.artifactId@</artifactId> |
| <version>@project.version@</version> |
| </dependency> |
| </dependencies> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-surefire-plugin</artifactId> |
| <version>2.19</version> |
| <configuration> |
| <redirectTestOutputToFile>true</redirectTestOutputToFile> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| <profiles> |
| <profile> |
| <id>sec</id> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-resources-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>default-testResources</id> |
| <phase /> |
| <goals> |
| <goal>testResources</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <version>1.8</version> |
| <executions> |
| <execution> |
| <id>filter-testResources</id> |
| <phase>process-test-resources</phase> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| <configuration> |
| <target> |
| <echo>filtering test resources</echo> |
| <mkdir dir="${project.build.testOutputDirectory}" /> |
| <condition property="slash" value="/" else=""> |
| <os family="windows" /> |
| </condition> |
| <copy todir="${project.build.testOutputDirectory}" verbose="true" overwrite="true"> |
| <fileset dir="${project.basedir}/src/test/resources" erroronmissingdir="false" /> |
| <filterchain> |
| <expandproperties /> |
| <!-- append extra slash on windows only --> |
| <replacestring from="file://" to="file://${slash}" /> |
| <expandproperties> |
| <propertyset> |
| <propertyref name="localRepositoryPath" /> |
| <mergemapper to="local-repo" /> |
| </propertyset> |
| </expandproperties> |
| <replacestring from="${file.separator}" to="/" /> |
| <!-- preserve system-specific file separator --> |
| <expandproperties> |
| <propertyset> |
| <propertyref prefix="project." /> |
| <globmapper from="*" to="preserve.*" /> |
| </propertyset> |
| </expandproperties> |
| </filterchain> |
| </copy> |
| </target> |
| </configuration> |
| </execution> |
| </executions> |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.ant</groupId> |
| <artifactId>ant</artifactId> |
| <version>${ant.version}</version> |
| </dependency> |
| </dependencies> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-surefire-plugin</artifactId> |
| <configuration> |
| <argLine>-Djava.security.manager -Djava.security.policy=${project.build.testOutputDirectory}/java.policy</argLine> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| </project> |