|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | + |
| 3 | +<!-- |
| 4 | + * See the NOTICE file distributed with this work for additional |
| 5 | + * information regarding copyright ownership. |
| 6 | + * |
| 7 | + * This is free software; you can redistribute it and/or modify it |
| 8 | + * under the terms of the GNU Lesser General Public License as |
| 9 | + * published by the Free Software Foundation; either version 2.1 of |
| 10 | + * the License, or (at your option) any later version. |
| 11 | + * |
| 12 | + * This software is distributed in the hope that it will be useful, |
| 13 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | + * Lesser General Public License for more details. |
| 16 | + * |
| 17 | + * You should have received a copy of the GNU Lesser General Public |
| 18 | + * License along with this software; if not, write to the Free |
| 19 | + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA |
| 20 | + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. |
| 21 | +--> |
| 22 | + |
| 23 | +<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"> |
| 24 | + <modelVersion>4.0.0</modelVersion> |
| 25 | + <parent> |
| 26 | + <groupId>org.xwiki.commons</groupId> |
| 27 | + <artifactId>xwiki-commons-legacy-job</artifactId> |
| 28 | + <version>17.10.0-SNAPSHOT</version> |
| 29 | + </parent> |
| 30 | + <artifactId>xwiki-commons-legacy-job-default</artifactId> |
| 31 | + <name>XWiki Commons - Legacy - Job - Default Implementation</name> |
| 32 | + <packaging>jar</packaging> |
| 33 | + <description>Legacy module for xwiki-commons-job-default</description> |
| 34 | + <properties> |
| 35 | + <xwiki.jacoco.instructionRatio>0.01</xwiki.jacoco.instructionRatio> |
| 36 | + <!-- The features provided by this module so that it's found when resolving extension --> |
| 37 | + <xwiki.extension.features>org.xwiki.commons:xwiki-commons-job-default</xwiki.extension.features> |
| 38 | + </properties> |
| 39 | + <dependencies> |
| 40 | + <!-- Trigger xwiki-commons-job-default dependencies (but without xwiki-commons-job-default jar itself) --> |
| 41 | + <dependency> |
| 42 | + <groupId>org.xwiki.commons</groupId> |
| 43 | + <artifactId>xwiki-commons-job-default</artifactId> |
| 44 | + <version>${project.version}</version> |
| 45 | + <type>pom</type> |
| 46 | + <exclusions> |
| 47 | + <!-- Trigger legacy version --> |
| 48 | + <exclusion> |
| 49 | + <groupId>org.xwiki.commons</groupId> |
| 50 | + <artifactId>xwiki-commons-job-api</artifactId> |
| 51 | + </exclusion> |
| 52 | + </exclusions> |
| 53 | + </dependency> |
| 54 | + <dependency> |
| 55 | + <groupId>org.xwiki.commons</groupId> |
| 56 | + <artifactId>xwiki-commons-legacy-job-api</artifactId> |
| 57 | + <version>${project.version}</version> |
| 58 | + </dependency> |
| 59 | + <!-- We need this dependency so that the wrapped module is built before this one --> |
| 60 | + <dependency> |
| 61 | + <groupId>org.xwiki.commons</groupId> |
| 62 | + <artifactId>xwiki-commons-job-default</artifactId> |
| 63 | + <version>${project.version}</version> |
| 64 | + <scope>provided</scope> |
| 65 | + <exclusions> |
| 66 | + <!-- Trigger legacy version --> |
| 67 | + <exclusion> |
| 68 | + <groupId>org.xwiki.commons</groupId> |
| 69 | + <artifactId>xwiki-commons-job-api</artifactId> |
| 70 | + </exclusion> |
| 71 | + </exclusions> |
| 72 | + </dependency> |
| 73 | + <!-- Needed for backward compatibility Aspects --> |
| 74 | + <dependency> |
| 75 | + <groupId>org.aspectj</groupId> |
| 76 | + <artifactId>aspectjrt</artifactId> |
| 77 | + </dependency> |
| 78 | + <!-- Test dependencies --> |
| 79 | + <dependency> |
| 80 | + <groupId>org.xwiki.commons</groupId> |
| 81 | + <artifactId>xwiki-commons-tool-test-component</artifactId> |
| 82 | + <version>${project.version}</version> |
| 83 | + <scope>test</scope> |
| 84 | + </dependency> |
| 85 | + </dependencies> |
| 86 | + <build> |
| 87 | + <plugins> |
| 88 | + <!-- Apply Compatibility Aspects --> |
| 89 | + <plugin> |
| 90 | + <groupId>org.codehaus.mojo</groupId> |
| 91 | + <artifactId>aspectj-maven-plugin</artifactId> |
| 92 | + <executions> |
| 93 | + <execution> |
| 94 | + <id>backward-compatibility-aspects</id> |
| 95 | + <goals> |
| 96 | + <goal>compile</goal> |
| 97 | + </goals> |
| 98 | + </execution> |
| 99 | + </executions> |
| 100 | + <configuration> |
| 101 | + <weaveDependencies> |
| 102 | + <weaveDependency> |
| 103 | + <groupId>org.xwiki.commons</groupId> |
| 104 | + <artifactId>xwiki-commons-job-default</artifactId> |
| 105 | + </weaveDependency> |
| 106 | + </weaveDependencies> |
| 107 | + </configuration> |
| 108 | + </plugin> |
| 109 | + <!-- Exclude AspectJ's builddef.lst file form the generated JAR since it's not useful there. --> |
| 110 | + <plugin> |
| 111 | + <groupId>org.apache.maven.plugins</groupId> |
| 112 | + <artifactId>maven-jar-plugin</artifactId> |
| 113 | + <configuration> |
| 114 | + <excludes> |
| 115 | + <exclude>**/builddef.lst</exclude> |
| 116 | + </excludes> |
| 117 | + </configuration> |
| 118 | + </plugin> |
| 119 | + <plugin> |
| 120 | + <!-- Merge components.txt files --> |
| 121 | + <groupId>org.apache.maven.plugins</groupId> |
| 122 | + <artifactId>maven-antrun-plugin</artifactId> |
| 123 | + <executions> |
| 124 | + <execution> |
| 125 | + <phase>process-classes</phase> |
| 126 | + <configuration> |
| 127 | + <target> |
| 128 | + <!-- Add a line separator before appending the legacy components. |
| 129 | + NOTE: The following solutions didn't work: |
| 130 | + * the fixlastline parameter of the concat task affects only the appended files, NOT the destination |
| 131 | + file; we need the new line at the end of the destination file! |
| 132 | + * the text content of the header element inside the concat task is trimmed when the POM is parsed. |
| 133 | + See http://jira.codehaus.org/browse/PLX-461 --> |
| 134 | + <echo message="${line.separator}" file="${project.build.directory}/classes/META-INF/components.txt" append="true" /> |
| 135 | + <concat destfile="${project.build.directory}/classes/META-INF/components.txt" append="true"> |
| 136 | + <filelist dir="${basedir}/src/main/resources/META-INF/" files="components.txt" /> |
| 137 | + </concat> |
| 138 | + </target> |
| 139 | + </configuration> |
| 140 | + <goals> |
| 141 | + <goal>run</goal> |
| 142 | + </goals> |
| 143 | + </execution> |
| 144 | + </executions> |
| 145 | + </plugin> |
| 146 | + <!-- Make sure we run the tests only with the aspectified JARs since otherwise components will be registered |
| 147 | + twice for example. --> |
| 148 | + <plugin> |
| 149 | + <groupId>org.apache.maven.plugins</groupId> |
| 150 | + <artifactId>maven-surefire-plugin</artifactId> |
| 151 | + <configuration> |
| 152 | + <classpathDependencyExcludes> |
| 153 | + <classpathDependencyExcludes>org.xwiki.commons:xwiki-commons-job-api</classpathDependencyExcludes> |
| 154 | + <classpathDependencyExcludes>org.xwiki.commons:xwiki-commons-job-default</classpathDependencyExcludes> |
| 155 | + </classpathDependencyExcludes> |
| 156 | + </configuration> |
| 157 | + </plugin> |
| 158 | + <plugin> |
| 159 | + <groupId>fr.inria.gforge.spoon</groupId> |
| 160 | + <artifactId>spoon-maven-plugin</artifactId> |
| 161 | + <executions> |
| 162 | + <execution> |
| 163 | + <id>spoon-main</id> |
| 164 | + <configuration> |
| 165 | + <processorProperties combine.children="append"> |
| 166 | + <processorProperty> |
| 167 | + <name>org.xwiki.tool.spoon.ComponentAnnotationProcessor</name> |
| 168 | + <properties> |
| 169 | + <property> |
| 170 | + <!-- Skip foreign declaration checks since we merge the components.txt --> |
| 171 | + <name>skipForeignDeclarations</name> |
| 172 | + <value>true</value> |
| 173 | + </property> |
| 174 | + <!-- TODO: Ideally inherit this from the top level pom but I couldn't find how to do it, or remove |
| 175 | + it when spoon is fixed, see https://github.com/INRIA/spoon/issues/3339 --> |
| 176 | + <property> |
| 177 | + <name>componentsTxtPath</name> |
| 178 | + <value>target/classes/META-INF/components.txt</value> |
| 179 | + </property> |
| 180 | + </properties> |
| 181 | + </processorProperty> |
| 182 | + </processorProperties> |
| 183 | + </configuration> |
| 184 | + </execution> |
| 185 | + <execution> |
| 186 | + <id>spoon-test</id> |
| 187 | + <configuration> |
| 188 | + <!-- TODO: Remove once https://github.com/INRIA/spoon/issues/3583 is fixed --> |
| 189 | + <skip>true</skip> |
| 190 | + </configuration> |
| 191 | + </execution> |
| 192 | + </executions> |
| 193 | + </plugin> |
| 194 | + <!-- Since we have runtime dependencies defined above this could lead to some problems for revapi by causing |
| 195 | + classpath ordering problems. So we need to avoid this. --> |
| 196 | + <plugin> |
| 197 | + <groupId>org.revapi</groupId> |
| 198 | + <artifactId>revapi-maven-plugin</artifactId> |
| 199 | + <configuration> |
| 200 | + <resolveProvidedDependencies>false</resolveProvidedDependencies> |
| 201 | + </configuration> |
| 202 | + </plugin> |
| 203 | + </plugins> |
| 204 | + </build> |
| 205 | +</project> |
0 commit comments