Skip to content

Commit

Permalink
JAVA-1266 & JAVA-1411: Stop using oss-parent and normalize versions a…
Browse files Browse the repository at this point in the history
…cross the build

Summary of changes:

JAVA-1266:
- Removed reference to deprecated OSS Sonatype parent poms
- Adjusted release process to use the recommended method,
  as described in http://central.sonatype.org/pages/apache-maven.html
- Created new 'release' profile to contain release-specific plugins

JAVA-1411:
- Introduced dependencyManagement and pluginManagement sections in the parent pom
- Declared versions for all dependencies and plugins at parent pom
- Concentrated common plugin configuration items into the parent pom
- Revisited bundle and shade plugin configurations
- Updated <url> tags
- Removed unused 'env' system property
- Profile declaration cleanup
  • Loading branch information
Alexandre Dutra committed Jun 9, 2017
1 parent e38c210 commit e157033
Show file tree
Hide file tree
Showing 12 changed files with 1,224 additions and 1,059 deletions.
4 changes: 2 additions & 2 deletions ci/appveyor.yml
Expand Up @@ -9,9 +9,9 @@ platform: x64
install:
- ps: .\ci\appveyor.ps1
build_script:
- "set \"JAVA_HOME=%JAVA_8_HOME%\" && mvn install -DskipTests=true -D\"maven.javadoc.skip\"=true -B -V"
- "set \"JAVA_HOME=%JAVA_8_HOME%\" && mvn install -DskipTests=true -B -V"
test_script:
- "set \"JAVA_HOME=%JAVA_PLATFORM_HOME%\" && mvn -B -D\"ccm.java.home\"=\"%JAVA_8_HOME%\" -D\"ccm.maxNumberOfNodes\"=1 -D\"cassandra.version\"=%cassandra_version% test -P %test_profile%"
- "set \"JAVA_HOME=%JAVA_PLATFORM_HOME%\" && mvn -B -D\"ccm.java.home\"=\"%JAVA_8_HOME%\" -D\"ccm.maxNumberOfNodes\"=1 -D\"cassandra.version\"=%cassandra_version% verify -P %test_profile%"
on_finish:
- ps: .\ci\uploadtests.ps1
cache:
Expand Down
252 changes: 93 additions & 159 deletions driver-core/pom.xml

Large diffs are not rendered by default.

121 changes: 73 additions & 48 deletions driver-dist/pom.xml
Expand Up @@ -16,83 +16,48 @@
-->
<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">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-parent</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
</parent>
<artifactId>cassandra-driver-dist</artifactId>

<artifactId>cassandra-driver-dist</artifactId>
<!-- Should be pom but Javadoc generation requires a "classpath-capable" package -->
<packaging>jar</packaging>

<name>DataStax Java Driver for Apache Cassandra - Binary distribution</name>

<!-- These dependencies are only here to ensure proper build order -->
<!-- These dependencies are only here to ensure proper build order and proper inclusion of binaries in the final tarball -->
<dependencies>

<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-mapping</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-extras</artifactId>
<version>${project.parent.version}</version>
</dependency>

</dependencies>

<build>

<finalName>cassandra-java-driver-${project.version}</finalName>

<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<executions>
<execution>
<id>dependencies-javadoc</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<includeDependencySources>true</includeDependencySources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>assemble-binary-tarball</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/assembly/binary-tarball.xml</descriptor>
</descriptors>
<tarLongFileMode>posix</tarLongFileMode>
</configuration>
</plugin>

<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<!-- http://stackoverflow.com/questions/13218313/unable-to-disable-generation-of-empty-jar-maven-jar-plugin -->
<executions>
<execution>
Expand All @@ -101,24 +66,84 @@
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<skipSource>true</skipSource>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.1</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>

</plugins>

</build>

<profiles>

<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>dependencies-javadoc</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<includeDependencySources>true</includeDependencySources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>assemble-binary-tarball</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/assembly/binary-tarball.xml</descriptor>
</descriptors>
<tarLongFileMode>posix</tarLongFileMode>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<configuration>
<skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
</configuration>
</plugin>
</plugins>
</build>
</profile>

</profiles>

</project>

6 changes: 5 additions & 1 deletion driver-dist/src/assembly/binary-tarball.xml
Expand Up @@ -67,14 +67,17 @@
<exclude>com.datastax.cassandra:cassandra-driver-core</exclude>
<exclude>com.datastax.cassandra:cassandra-driver-mapping</exclude>
<exclude>com.datastax.cassandra:cassandra-driver-extras</exclude>
<!-- already included in lib/core -->
<exclude>com.google.guava:guava</exclude>
<exclude>org.slf4j:slf4j-api</exclude>
</excludes>
<useTransitiveFiltering>true</useTransitiveFiltering>
</dependencySet>
</dependencySets>
</binaries>
</moduleSet>

<!-- dependencies of module cassandra:cassandra-driver-extras -->
<!-- dependencies of module cassandra-driver-extras -->
<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
Expand All @@ -92,6 +95,7 @@
<exclude>com.datastax.cassandra:cassandra-driver-extras</exclude>
<!-- already included in lib/core -->
<exclude>com.google.guava:guava</exclude>
<exclude>org.slf4j:slf4j-api</exclude>
</excludes>
<useTransitiveFiltering>true</useTransitiveFiltering>
</dependencySet>
Expand Down

0 comments on commit e157033

Please sign in to comment.