Skip to content

Commit

Permalink
Merge pull request #642 from lewismc/issue-641
Browse files Browse the repository at this point in the history
issue-641 Trivial improvements to *pom.xml
  • Loading branch information
zznate committed Nov 26, 2013
2 parents dbf8d40 + 5c6b7ab commit 2724dcb
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 72 deletions.
6 changes: 3 additions & 3 deletions core/pom.xml
Expand Up @@ -52,7 +52,7 @@
<configuration> <configuration>
<instructions> <instructions>
<Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName> <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
<Bundle-Version>${pom.version}</Bundle-Version> <Bundle-Version>${project.version}</Bundle-Version>
<Embed-Dependency> <Embed-Dependency>
libthrift;scope=compile|runtime;type=!pom;inline=false, libthrift;scope=compile|runtime;type=!pom;inline=false,
cassandra;scope=compile|runtime;type=!pom;inline=false, cassandra;scope=compile|runtime;type=!pom;inline=false,
Expand All @@ -61,7 +61,7 @@


<Export-Package> <Export-Package>
<!-- !${bundle.namespace}.internal.*, --> <!-- !${bundle.namespace}.internal.*, -->
me.prettyprint.*;version="${pom.version}" me.prettyprint.*;version="${project.version}"
</Export-Package> </Export-Package>


<Import-Package> <Import-Package>
Expand Down Expand Up @@ -163,7 +163,7 @@
<dependency> <dependency>
<groupId>org.hectorclient</groupId> <groupId>org.hectorclient</groupId>
<artifactId>hector-test</artifactId> <artifactId>hector-test</artifactId>
<version>${pom.version}</version> <version>${project.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
Expand Down
123 changes: 56 additions & 67 deletions pom.xml
Expand Up @@ -91,10 +91,11 @@


<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<!-- Cassansdra Dependencies -->
<dependency> <dependency>
<groupId>org.apache.cassandra</groupId> <groupId>org.apache.cassandra</groupId>
<artifactId>cassandra-all</artifactId> <artifactId>cassandra-all</artifactId>
<version>1.2.5</version> <version>${cassandra.version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>com.github.stephenc</groupId> <groupId>com.github.stephenc</groupId>
Expand All @@ -105,8 +106,10 @@
<dependency> <dependency>
<groupId>org.apache.cassandra</groupId> <groupId>org.apache.cassandra</groupId>
<artifactId>cassandra-thrift</artifactId> <artifactId>cassandra-thrift</artifactId>
<version>1.2.5</version> <version>${cassandra.version}</version>
</dependency> </dependency>
<!-- END OF Cassansdra Dependencies -->
<!-- Commons Dependencies -->
<dependency> <dependency>
<groupId>commons-lang</groupId> <groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId> <artifactId>commons-lang</artifactId>
Expand All @@ -117,17 +120,15 @@
<artifactId>commons-pool</artifactId> <artifactId>commons-pool</artifactId>
<version>1.5.3</version> <version>1.5.3</version>
</dependency> </dependency>
<dependency> <!-- END OF Commons Dependencies -->
<groupId>commons-collections</groupId> <!-- Misc. Dependencies-->
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>
<artifactId>guava</artifactId> <artifactId>guava</artifactId>
<version>14.0</version> <version>14.0</version>
</dependency> </dependency>
<!-- END OF Misc. Dependencies-->
<!-- Logging Dependencies -->
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId> <artifactId>slf4j-api</artifactId>
Expand All @@ -152,8 +153,9 @@
<groupId>log4j</groupId> <groupId>log4j</groupId>
<artifactId>log4j</artifactId> <artifactId>log4j</artifactId>
<version>1.2.16</version> <version>1.2.16</version>
</dependency> </dependency>
<!-- common test dependencies --> <!-- END OF Logging Dependencies -->
<!-- Common test dependencies -->
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
Expand Down Expand Up @@ -188,16 +190,23 @@
<version>2.2.0</version> <version>2.2.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>joda-time</groupId> <groupId>joda-time</groupId>
<artifactId>joda-time</artifactId> <artifactId>joda-time</artifactId>
<version>1.6.1</version> <version>1.6.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.github.stephenc</groupId> <groupId>com.github.stephenc</groupId>
<artifactId>jamm</artifactId> <artifactId>jamm</artifactId>
<version>0.2.5</version> <version>0.2.5</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
<scope>test</scope>
</dependency>
<!-- END OF common test dependencies -->
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>


Expand All @@ -220,58 +229,33 @@
</extension> </extension>
</extensions> </extensions>
<plugins> <plugins>
<!-- always attach sources -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven.source.plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- attach sources -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
<executions> <executions>
<!-- <execution>
The following plugin definition will create a test-jar for any <goals>
project at compile time. This is useful for reusing test code b/w <goal>test-jar</goal>
project. Taken from: </goals>
http://www.waltercedric.com/java-j2ee-mainmenu-53/361-maven-build-system/1307-maven2-unit-test-code-reuse-and-dependencies.html </execution>
</executions>
For example, if project A reuses test code from project core, in </plugin>
A/pom.xml you should have: </plugins>
<dependency>
<groupId>me.prettyprint</groupId>
<artifactId>hector-core</artifactId>
<version>hector-version-here</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
-->
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- always attach sources -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- attach sources -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement> <pluginManagement>
<plugins> <plugins>
<plugin> <plugin>
Expand Down Expand Up @@ -403,8 +387,13 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<project.build.outputEncoding>UTF-8</project.build.outputEncoding> <project.build.outputEncoding>UTF-8</project.build.outputEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- Dependency versioning-->
<cassandra.version>1.2.5</cassandra.version>
<org.springframework.version>3.0.6.RELEASE</org.springframework.version> <org.springframework.version>3.0.6.RELEASE</org.springframework.version>
<slf4j.version>1.6.1</slf4j.version> <slf4j.version>1.6.1</slf4j.version>
<!-- Maven plugin versioning -->
<maven.source.plugin.version>2.2.1</maven.source.plugin.version>
</properties> </properties>


</project> </project>
4 changes: 2 additions & 2 deletions test/pom.xml
Expand Up @@ -52,7 +52,7 @@
<configuration> <configuration>
<instructions> <instructions>
<Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName> <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
<Bundle-Version>${pom.version}</Bundle-Version> <Bundle-Version>${project.version}</Bundle-Version>
<Embed-Dependency> <Embed-Dependency>
libthrift;scope=compile|runtime;type=!pom;inline=false, libthrift;scope=compile|runtime;type=!pom;inline=false,
cassandra;scope=compile|runtime;type=!pom;inline=false, cassandra;scope=compile|runtime;type=!pom;inline=false,
Expand All @@ -61,7 +61,7 @@


<Export-Package> <Export-Package>
<!-- !${bundle.namespace}.internal.*, --> <!-- !${bundle.namespace}.internal.*, -->
${bundle.namespace}.*;version="${pom.version}" ${bundle.namespace}.*;version="${project.version}"
</Export-Package> </Export-Package>


<Import-Package> <Import-Package>
Expand Down

0 comments on commit 2724dcb

Please sign in to comment.