|
| 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, software |
| 15 | + distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | + See the License for the specific language governing permissions and |
| 18 | + limitations under the License. |
| 19 | +
|
| 20 | +--> |
| 21 | +<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"> |
| 22 | + <modelVersion>4.0.0</modelVersion> |
| 23 | + <parent> |
| 24 | + <groupId>org.apache.cassandra</groupId> |
| 25 | + <artifactId>java-driver-parent</artifactId> |
| 26 | + <version>4.18.2-SNAPSHOT</version> |
| 27 | + </parent> |
| 28 | + <artifactId>java-driver-guava-shaded</artifactId> |
| 29 | + <name>Apache Cassandra Java Driver - guava shaded dep</name> |
| 30 | + <description>Shaded Guava artifact for use in the Java driver for Apache Cassandra®</description> |
| 31 | + <dependencies> |
| 32 | + <dependency> |
| 33 | + <groupId>com.google.guava</groupId> |
| 34 | + <artifactId>guava</artifactId> |
| 35 | + <exclusions> |
| 36 | + <exclusion> |
| 37 | + <groupId>com.google.code.findbugs</groupId> |
| 38 | + <artifactId>jsr305</artifactId> |
| 39 | + </exclusion> |
| 40 | + <exclusion> |
| 41 | + <groupId>org.checkerframework</groupId> |
| 42 | + <artifactId>checker-qual</artifactId> |
| 43 | + </exclusion> |
| 44 | + <exclusion> |
| 45 | + <groupId>com.google.errorprone</groupId> |
| 46 | + <artifactId>error_prone_annotations</artifactId> |
| 47 | + </exclusion> |
| 48 | + <exclusion> |
| 49 | + <groupId>com.google.j2objc</groupId> |
| 50 | + <artifactId>j2objc-annotations</artifactId> |
| 51 | + </exclusion> |
| 52 | + <exclusion> |
| 53 | + <groupId>org.codehaus.mojo</groupId> |
| 54 | + <artifactId>animal-sniffer-annotations</artifactId> |
| 55 | + </exclusion> |
| 56 | + </exclusions> |
| 57 | + </dependency> |
| 58 | + <dependency> |
| 59 | + <groupId>org.graalvm.nativeimage</groupId> |
| 60 | + <artifactId>svm</artifactId> |
| 61 | + <version>20.0.0</version> |
| 62 | + <scope>provided</scope> |
| 63 | + </dependency> |
| 64 | + </dependencies> |
| 65 | + <build> |
| 66 | + <plugins> |
| 67 | + <plugin> |
| 68 | + <artifactId>maven-shade-plugin</artifactId> |
| 69 | + <executions> |
| 70 | + <execution> |
| 71 | + <id>shade-guava-dependency</id> |
| 72 | + <phase>package</phase> |
| 73 | + <goals> |
| 74 | + <goal>shade</goal> |
| 75 | + </goals> |
| 76 | + <configuration> |
| 77 | + <artifactSet> |
| 78 | + <includes> |
| 79 | + <include>org.apache.cassandra:java-driver-guava-shaded</include> |
| 80 | + <include>com.google.guava:guava</include> |
| 81 | + </includes> |
| 82 | + </artifactSet> |
| 83 | + <relocations> |
| 84 | + <relocation> |
| 85 | + <pattern>com.google</pattern> |
| 86 | + <shadedPattern>com.datastax.oss.driver.shaded.guava</shadedPattern> |
| 87 | + </relocation> |
| 88 | + </relocations> |
| 89 | + <filters> |
| 90 | + <filter> |
| 91 | + <artifact>com.google.guava:*</artifact> |
| 92 | + <excludes> |
| 93 | + <exclude>META-INF/**</exclude> |
| 94 | + </excludes> |
| 95 | + </filter> |
| 96 | + </filters> |
| 97 | + <createSourcesJar>true</createSourcesJar> |
| 98 | + <shadeSourcesContent>true</shadeSourcesContent> |
| 99 | + </configuration> |
| 100 | + </execution> |
| 101 | + </executions> |
| 102 | + </plugin> |
| 103 | + <plugin> |
| 104 | + <artifactId>maven-clean-plugin</artifactId> |
| 105 | + <executions> |
| 106 | + <execution> |
| 107 | + <id>clean-classes</id> |
| 108 | + <phase>package</phase> |
| 109 | + <goals> |
| 110 | + <goal>clean</goal> |
| 111 | + </goals> |
| 112 | + <configuration> |
| 113 | + <directory>${project.build.outputDirectory}</directory> |
| 114 | + </configuration> |
| 115 | + </execution> |
| 116 | + </executions> |
| 117 | + </plugin> |
| 118 | + <plugin> |
| 119 | + <artifactId>maven-dependency-plugin</artifactId> |
| 120 | + <executions> |
| 121 | + <execution> |
| 122 | + <id>unpack-shaded-classes</id> |
| 123 | + <phase>package</phase> |
| 124 | + <goals> |
| 125 | + <goal>unpack</goal> |
| 126 | + </goals> |
| 127 | + <configuration> |
| 128 | + <outputDirectory>${project.build.outputDirectory}</outputDirectory> |
| 129 | + <artifactItems> |
| 130 | + <artifactItem> |
| 131 | + <groupId>org.apache.cassandra</groupId> |
| 132 | + <artifactId>java-driver-guava-shaded</artifactId> |
| 133 | + <version>${project.version}</version> |
| 134 | + <type>jar</type> |
| 135 | + </artifactItem> |
| 136 | + </artifactItems> |
| 137 | + </configuration> |
| 138 | + </execution> |
| 139 | + </executions> |
| 140 | + </plugin> |
| 141 | + <plugin> |
| 142 | + <groupId>org.apache.felix</groupId> |
| 143 | + <artifactId>maven-bundle-plugin</artifactId> |
| 144 | + <!-- |
| 145 | + Using later version of the plugin will scan all dynamically loaded classes |
| 146 | + with Class.forName(). In the end, more packages will be imported in MANIFEST.MF |
| 147 | + and OSGi integration tests will break. |
| 148 | + --> |
| 149 | + <version>3.5.0</version> |
| 150 | + <extensions>true</extensions> |
| 151 | + <executions> |
| 152 | + <execution> |
| 153 | + <id>generate-shaded-manifest</id> |
| 154 | + <phase>package</phase> |
| 155 | + <goals> |
| 156 | + <goal>manifest</goal> |
| 157 | + </goals> |
| 158 | + <configuration> |
| 159 | + <instructions> |
| 160 | + <Bundle-SymbolicName>com.datastax.oss.driver.shaded.guava</Bundle-SymbolicName> |
| 161 | + <Export-Package>!com.datastax.oss.driver.shaded.guava.errorprone.*, !org.checkerframework.*, *</Export-Package> |
| 162 | + <Import-Package>javax.annotation.*;resolution:=optional;version="[3.0,4)", javax.crypto.*;resolution:=optional, sun.misc.*;resolution:=optional, !com.oracle.svm.*, !com.datastax.oss.driver.shaded.guava.errorprone.*, !org.checkerframework.*, *</Import-Package> |
| 163 | + </instructions> |
| 164 | + </configuration> |
| 165 | + </execution> |
| 166 | + </executions> |
| 167 | + </plugin> |
| 168 | + <plugin> |
| 169 | + <artifactId>maven-assembly-plugin</artifactId> |
| 170 | + <executions> |
| 171 | + <execution> |
| 172 | + <id>generate-final-shaded-jar</id> |
| 173 | + <phase>package</phase> |
| 174 | + <goals> |
| 175 | + <goal>single</goal> |
| 176 | + </goals> |
| 177 | + <configuration> |
| 178 | + <archive> |
| 179 | + <!-- this is the manifest generated by the bundle plugin --> |
| 180 | + <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile> |
| 181 | + </archive> |
| 182 | + <descriptors> |
| 183 | + <descriptor>src/assembly/shaded-jar.xml</descriptor> |
| 184 | + </descriptors> |
| 185 | + <!-- Replace the original artifact --> |
| 186 | + <appendAssemblyId>false</appendAssemblyId> |
| 187 | + </configuration> |
| 188 | + </execution> |
| 189 | + </executions> |
| 190 | + </plugin> |
| 191 | + <plugin> |
| 192 | + <artifactId>maven-jar-plugin</artifactId> |
| 193 | + <executions> |
| 194 | + <execution> |
| 195 | + <id>empty-javadoc-jar</id> |
| 196 | + <goals> |
| 197 | + <goal>jar</goal> |
| 198 | + </goals> |
| 199 | + <configuration> |
| 200 | + <classifier>javadoc</classifier> |
| 201 | + <classesDirectory>${basedir}/src/main/javadoc</classesDirectory> |
| 202 | + </configuration> |
| 203 | + </execution> |
| 204 | + </executions> |
| 205 | + </plugin> |
| 206 | + <plugin> |
| 207 | + <groupId>org.revapi</groupId> |
| 208 | + <artifactId>revapi-maven-plugin</artifactId> |
| 209 | + <configuration> |
| 210 | + <skip>true</skip> |
| 211 | + </configuration> |
| 212 | + </plugin> |
| 213 | + </plugins> |
| 214 | + </build> |
| 215 | +</project> |
0 commit comments