|
| 1 | +<?xml version="1.0"?> |
| 2 | +<!-- |
| 3 | + Licensed to the Apache Software Foundation (ASF) under one |
| 4 | + or more contributor license agreements. See the NOTICE file |
| 5 | + distributed with this work for additional information |
| 6 | + regarding copyright ownership. The ASF licenses this file |
| 7 | + to you under the Apache License, Version 2.0 (the |
| 8 | + "License"); you may not use this file except in compliance |
| 9 | + with the License. You may obtain a copy of the License at |
| 10 | +
|
| 11 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +
|
| 13 | + Unless required by applicable law or agreed to in writing, |
| 14 | + software distributed under the License is distributed on an |
| 15 | + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 16 | + KIND, either express or implied. See the License for the |
| 17 | + specific language governing permissions and limitations |
| 18 | + under the License. |
| 19 | +--> |
| 20 | +<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" |
| 21 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
| 22 | + <modelVersion>4.0.0</modelVersion> |
| 23 | + <parent> |
| 24 | + <groupId>foo</groupId> |
| 25 | + <artifactId>bar</artifactId> |
| 26 | + <version>${revision}</version> |
| 27 | + </parent> |
| 28 | + <version>${revision}</version> |
| 29 | + <packaging>jar</packaging> |
| 30 | + <artifactId>code</artifactId> |
| 31 | + |
| 32 | + <dependencies> |
| 33 | + <dependency> |
| 34 | + <groupId>foo</groupId> |
| 35 | + <artifactId>processor</artifactId> |
| 36 | + <version>${revision}</version> |
| 37 | + <scope>provided</scope> |
| 38 | + </dependency> |
| 39 | + </dependencies> |
| 40 | + |
| 41 | + <build> |
| 42 | + <plugins> |
| 43 | + <plugin> |
| 44 | + <groupId>com.kohlschutter.mavenplugins</groupId> |
| 45 | + <artifactId>copy-rename-maven-plugin</artifactId> |
| 46 | + <version>2.0.0</version> |
| 47 | + <executions> |
| 48 | + <execution> |
| 49 | + <id>set-source</id> |
| 50 | + <phase>generate-sources</phase> |
| 51 | + <goals> |
| 52 | + <goal>copy</goal> |
| 53 | + </goals> |
| 54 | + <configuration> |
| 55 | + <fileSets> |
| 56 | + <fileSet> |
| 57 | + <sourceFile>${basedir}/MyAnnotatedClass.${it.type}.java</sourceFile> |
| 58 | + <destinationFile>${basedir}/src/main/java/bar/MyAnnotatedClass.java</destinationFile> |
| 59 | + </fileSet> |
| 60 | + </fileSets> |
| 61 | + </configuration> |
| 62 | + </execution> |
| 63 | + </executions> |
| 64 | + </plugin> |
| 65 | + |
| 66 | + <plugin> |
| 67 | + <groupId>org.apache.maven.plugins</groupId> |
| 68 | + <artifactId>maven-clean-plugin</artifactId> |
| 69 | + <version>@version.maven-clean-plugin@</version> |
| 70 | + <executions> |
| 71 | + <execution> |
| 72 | + <id>clean-source-file</id> |
| 73 | + <phase>validate</phase> |
| 74 | + <goals> |
| 75 | + <goal>clean</goal> |
| 76 | + </goals> |
| 77 | + <configuration> |
| 78 | + <excludeDefaultDirectories>true</excludeDefaultDirectories> |
| 79 | + <filesets> |
| 80 | + <fileset> |
| 81 | + <directory>src/main/java</directory> |
| 82 | + <excludes> |
| 83 | + <exclude>package-info.java</exclude> |
| 84 | + </excludes> |
| 85 | + </fileset> |
| 86 | + </filesets> |
| 87 | + </configuration> |
| 88 | + </execution> |
| 89 | + </executions> |
| 90 | + </plugin> |
| 91 | + </plugins> |
| 92 | + </build> |
| 93 | +</project> |
0 commit comments