|
| 1 | +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 2 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 |
| 3 | + http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 4 | + <modelVersion>4.0.0</modelVersion> |
| 5 | + |
| 6 | + <parent> |
| 7 | + <groupId>org.neo4j.driver</groupId> |
| 8 | + <artifactId>neo4j-java-driver-parent</artifactId> |
| 9 | + <version>5.7-SNAPSHOT</version> |
| 10 | + <relativePath>..</relativePath> |
| 11 | + </parent> |
| 12 | + |
| 13 | + <artifactId>neo4j-java-driver-all</artifactId> |
| 14 | + |
| 15 | + <packaging>jar</packaging> |
| 16 | + <name>Neo4j Java Driver (shaded package)</name> |
| 17 | + <description>Access to the Neo4j graph database through Java</description> |
| 18 | + <url>https://github.com/neo4j/neo4j-java-driver</url> |
| 19 | + |
| 20 | + <properties> |
| 21 | + <moduleName>org.neo4j.driver</moduleName> |
| 22 | + <rootDir>${project.basedir}/..</rootDir> |
| 23 | + <maven.compiler.xlint.extras>,-try</maven.compiler.xlint.extras> |
| 24 | + <maven.deploy.skip>false</maven.deploy.skip> |
| 25 | + </properties> |
| 26 | + |
| 27 | + <dependencies> |
| 28 | + <!-- The original driver that will be repackaged. --> |
| 29 | + <dependency> |
| 30 | + <groupId>org.neo4j.driver</groupId> |
| 31 | + <artifactId>neo4j-java-driver</artifactId> |
| 32 | + <version>${project.version}</version> |
| 33 | + <optional>true</optional> |
| 34 | + </dependency> |
| 35 | + |
| 36 | + <!-- Optional and / or provided dependencies, as they are not transitive to the original driver they must be declared again. --> |
| 37 | + <dependency> |
| 38 | + <groupId>io.micrometer</groupId> |
| 39 | + <artifactId>micrometer-core</artifactId> |
| 40 | + <optional>true</optional> |
| 41 | + </dependency> |
| 42 | + <dependency> |
| 43 | + <groupId>org.slf4j</groupId> |
| 44 | + <artifactId>slf4j-api</artifactId> |
| 45 | + <optional>true</optional> |
| 46 | + </dependency> |
| 47 | + <dependency> |
| 48 | + <groupId>org.graalvm.nativeimage</groupId> |
| 49 | + <artifactId>svm</artifactId> |
| 50 | + </dependency> |
| 51 | + |
| 52 | + <!-- As we pretend the driver being provided only, we need be explicit about the one dependency we actually didn't shade. --> |
| 53 | + <dependency> |
| 54 | + <groupId>org.reactivestreams</groupId> |
| 55 | + <artifactId>reactive-streams</artifactId> |
| 56 | + </dependency> |
| 57 | + </dependencies> |
| 58 | + |
| 59 | + <build> |
| 60 | + <pluginManagement> |
| 61 | + <plugins> |
| 62 | + <plugin> |
| 63 | + <groupId>org.apache.maven.plugins</groupId> |
| 64 | + <artifactId>maven-javadoc-plugin</artifactId> |
| 65 | + <executions> |
| 66 | + <execution> |
| 67 | + <id>attach-javadocs</id> |
| 68 | + <goals> |
| 69 | + <goal>jar</goal> |
| 70 | + </goals> |
| 71 | + <configuration> |
| 72 | + <additionalOptions combine.children="append"> |
| 73 | + <option>--add-exports org.graalvm.sdk/com.oracle.svm.core.annotate=org.neo4j.driver</option> |
| 74 | + </additionalOptions> |
| 75 | + </configuration> |
| 76 | + </execution> |
| 77 | + </executions> |
| 78 | + </plugin> |
| 79 | + </plugins> |
| 80 | + </pluginManagement> |
| 81 | + <plugins> |
| 82 | + <!-- Extract the original sources again --> |
| 83 | + <plugin> |
| 84 | + <groupId>org.apache.maven.plugins</groupId> |
| 85 | + <artifactId>maven-resources-plugin</artifactId> |
| 86 | + <version>3.2.0</version> |
| 87 | + <executions> |
| 88 | + <execution> |
| 89 | + <id>copy-appCtx</id> |
| 90 | + <phase>generate-sources</phase> |
| 91 | + <goals> |
| 92 | + <goal>copy-resources</goal> |
| 93 | + </goals> |
| 94 | + <configuration> |
| 95 | + <outputDirectory>${project.build.directory}/generated-sources/neo4j-java-driver</outputDirectory> |
| 96 | + <overwrite>true</overwrite> |
| 97 | + <resources> |
| 98 | + <resource> |
| 99 | + <directory>${rootDir}/driver/src/main/java</directory> |
| 100 | + <includes> |
| 101 | + <include>**\/*.java</include> |
| 102 | + </includes> |
| 103 | + </resource> |
| 104 | + </resources> |
| 105 | + </configuration> |
| 106 | + </execution> |
| 107 | + </executions> |
| 108 | + </plugin> |
| 109 | + <!-- Attach them --> |
| 110 | + <plugin> |
| 111 | + <groupId>org.codehaus.mojo</groupId> |
| 112 | + <artifactId>build-helper-maven-plugin</artifactId> |
| 113 | + <executions> |
| 114 | + <execution> |
| 115 | + <id>attach-original-sources</id> |
| 116 | + <phase>generate-sources</phase> |
| 117 | + <goals> |
| 118 | + <goal>add-source</goal> |
| 119 | + </goals> |
| 120 | + <configuration> |
| 121 | + <sources> |
| 122 | + <source>${project.build.directory}/generated-sources/neo4j-java-driver</source> |
| 123 | + </sources> |
| 124 | + </configuration> |
| 125 | + </execution> |
| 126 | + <execution> |
| 127 | + <id>set-osgi-version</id> |
| 128 | + <phase>validate</phase> |
| 129 | + <goals> |
| 130 | + <goal>parse-version</goal> |
| 131 | + </goals> |
| 132 | + </execution> |
| 133 | + </executions> |
| 134 | + </plugin> |
| 135 | + <plugin> |
| 136 | + <groupId>org.apache.maven.plugins</groupId> |
| 137 | + <artifactId>maven-source-plugin</artifactId> |
| 138 | + </plugin> |
| 139 | + <plugin> |
| 140 | + <groupId>org.apache.maven.plugins</groupId> |
| 141 | + <artifactId>maven-javadoc-plugin</artifactId> |
| 142 | + </plugin> |
| 143 | + <plugin> |
| 144 | + <groupId>org.apache.maven.plugins</groupId> |
| 145 | + <artifactId>maven-jar-plugin</artifactId> |
| 146 | + <executions> |
| 147 | + <execution> |
| 148 | + <goals> |
| 149 | + <goal>test-jar</goal> |
| 150 | + </goals> |
| 151 | + </execution> |
| 152 | + </executions> |
| 153 | + <configuration> |
| 154 | + <archive> |
| 155 | + <index>true</index> |
| 156 | + <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile> |
| 157 | + <manifest> |
| 158 | + <packageName>org/neo4j/driver</packageName> |
| 159 | + </manifest> |
| 160 | + <manifestEntries> |
| 161 | + <!-- This is used to programmatically determine the driver version --> |
| 162 | + <Implementation-Version>${project.version}-${build.revision}</Implementation-Version> |
| 163 | + <!-- Stable module name for JDK9 automatic modules --> |
| 164 | + <Automatic-Module-Name>${moduleName}</Automatic-Module-Name> |
| 165 | + </manifestEntries> |
| 166 | + </archive> |
| 167 | + </configuration> |
| 168 | + </plugin> |
| 169 | + <plugin> |
| 170 | + <groupId>org.apache.felix</groupId> |
| 171 | + <artifactId>maven-bundle-plugin</artifactId> |
| 172 | + <extensions>true</extensions> |
| 173 | + </plugin> |
| 174 | + <plugin> |
| 175 | + <groupId>org.apache.maven.plugins</groupId> |
| 176 | + <artifactId>maven-shade-plugin</artifactId> |
| 177 | + <executions> |
| 178 | + <execution> |
| 179 | + <phase>package</phase> |
| 180 | + <goals> |
| 181 | + <goal>shade</goal> |
| 182 | + </goals> |
| 183 | + <configuration> |
| 184 | + <artifactSet> |
| 185 | + <includes> |
| 186 | + <include>io.netty:*</include> |
| 187 | + <include>io.projectreactor:*</include> |
| 188 | + </includes> |
| 189 | + </artifactSet> |
| 190 | + <relocations> |
| 191 | + <relocation> |
| 192 | + <pattern>io.netty</pattern> |
| 193 | + <shadedPattern>org.neo4j.driver.internal.shaded.io.netty</shadedPattern> |
| 194 | + </relocation> |
| 195 | + <relocation> |
| 196 | + <pattern>reactor</pattern> |
| 197 | + <shadedPattern>org.neo4j.driver.internal.shaded.reactor</shadedPattern> |
| 198 | + </relocation> |
| 199 | + </relocations> |
| 200 | + <transformers> |
| 201 | + <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> |
| 202 | + </transformers> |
| 203 | + <filters> |
| 204 | + <filter> |
| 205 | + <artifact>io.netty:*</artifact> |
| 206 | + <excludes> |
| 207 | + <exclude>META-INF/native-image/**</exclude> |
| 208 | + </excludes> |
| 209 | + </filter> |
| 210 | + <filter> |
| 211 | + <artifact>${groupId}:${artifactId}</artifact> |
| 212 | + <excludes> |
| 213 | + <exclude>module-info.java</exclude> |
| 214 | + </excludes> |
| 215 | + </filter> |
| 216 | + </filters> |
| 217 | + <shadeTestJar>true</shadeTestJar> |
| 218 | + <createSourcesJar>true</createSourcesJar> |
| 219 | + </configuration> |
| 220 | + </execution> |
| 221 | + </executions> |
| 222 | + </plugin> |
| 223 | + <plugin> |
| 224 | + <groupId>org.apache.maven.plugins</groupId> |
| 225 | + <artifactId>maven-antrun-plugin</artifactId> |
| 226 | + <executions> |
| 227 | + <execution> |
| 228 | + <id>add-module-info-to-sources</id> |
| 229 | + <phase>package</phase> |
| 230 | + <goals> |
| 231 | + <goal>run</goal> |
| 232 | + </goals> |
| 233 | + <configuration> |
| 234 | + <target> |
| 235 | + <unzip src="${project.build.directory}/${artifactId}-${version}-sources.jar" dest="${project.build.directory}/sources-with-module"/> |
| 236 | + <copy file="${project.basedir}/src/main/jpms/module-info.java" tofile="${project.build.directory}/sources-with-module/module-info.java" /> |
| 237 | + <zip basedir="${project.build.directory}/sources-with-module" destfile="${project.build.directory}/${artifactId}-${version}-sources.jar"/> |
| 238 | + </target> |
| 239 | + </configuration> |
| 240 | + </execution> |
| 241 | + </executions> |
| 242 | + </plugin> |
| 243 | + <plugin> |
| 244 | + <groupId>org.moditect</groupId> |
| 245 | + <artifactId>moditect-maven-plugin</artifactId> |
| 246 | + <executions> |
| 247 | + <execution> |
| 248 | + <id>add-module-infos</id> |
| 249 | + <phase>package</phase> |
| 250 | + <goals> |
| 251 | + <goal>add-module-info</goal> |
| 252 | + </goals> |
| 253 | + <configuration> |
| 254 | + <overwriteExistingFiles>true</overwriteExistingFiles> |
| 255 | + <module> |
| 256 | + <moduleInfoFile> |
| 257 | + ${basedir}/src/main/jpms/module-info.java |
| 258 | + </moduleInfoFile> |
| 259 | + </module> |
| 260 | + </configuration> |
| 261 | + </execution> |
| 262 | + </executions> |
| 263 | + </plugin> |
| 264 | + </plugins> |
| 265 | + </build> |
| 266 | + |
| 267 | + <scm> |
| 268 | + <connection>scm:git:git://github.com/neo4j/neo4j-java-driver.git</connection> |
| 269 | + <developerConnection>scm:git: [email protected]:neo4j/neo4j-java-driver.git</developerConnection> |
| 270 | + <url>https://github.com/neo4j/neo4j-java-driver</url> |
| 271 | + </scm> |
| 272 | + |
| 273 | +</project> |
0 commit comments