Merge pull request #11676 from dadoonet/maven/clean-pom

[maven] clean pom.xml

In Maven parent project, in dependency management, we should only declare which versions of 3rd party jars we want to use but not force any scope.
It makes then more obvious in modules what is exactly the scope of any dependency.

For example, one could imagine importing `jimfs` as a `compile` dependency in another module/plugin with:

```xml
<dependency>
   <groupId>com.google.jimfs</groupId>
   <artifactId>jimfs</artifactId>
</dependency>
```

But it won't work as expected as the default maven `scope` should be `compile` but here it's `test` as defined in the parent project.

So, if you want to use this lib for tests, you should simply define:

```xml
<dependency>
   <groupId>com.google.jimfs</groupId>
   <artifactId>jimfs</artifactId>
   <scope>test</scope>
</dependency>
```

We also remove `maven-s3-wagon` from gce plugin as it's not used.
This commit is contained in:
David Pilato 2015-06-16 09:12:03 +02:00
commit 49cd9f3be4
5 changed files with 7 additions and 78 deletions

View File

@ -66,69 +66,56 @@
<dependency> <dependency>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId> <artifactId>lucene-core</artifactId>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
<artifactId>lucene-backward-codecs</artifactId> <artifactId>lucene-backward-codecs</artifactId>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-common</artifactId> <artifactId>lucene-analyzers-common</artifactId>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
<artifactId>lucene-queries</artifactId> <artifactId>lucene-queries</artifactId>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
<artifactId>lucene-memory</artifactId> <artifactId>lucene-memory</artifactId>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
<artifactId>lucene-highlighter</artifactId> <artifactId>lucene-highlighter</artifactId>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
<artifactId>lucene-queryparser</artifactId> <artifactId>lucene-queryparser</artifactId>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
<artifactId>lucene-suggest</artifactId> <artifactId>lucene-suggest</artifactId>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
<artifactId>lucene-join</artifactId> <artifactId>lucene-join</artifactId>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
<artifactId>lucene-spatial</artifactId> <artifactId>lucene-spatial</artifactId>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
<artifactId>lucene-expressions</artifactId> <artifactId>lucene-expressions</artifactId>
<scope>compile</scope>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.spatial4j</groupId> <groupId>com.spatial4j</groupId>
<artifactId>spatial4j</artifactId> <artifactId>spatial4j</artifactId>
<scope>compile</scope>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.vividsolutions</groupId> <groupId>com.vividsolutions</groupId>
<artifactId>jts</artifactId> <artifactId>jts</artifactId>
<scope>compile</scope>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<!-- needed for templating --> <!-- needed for templating -->
@ -140,45 +127,34 @@
<!-- Lucene spatial --> <!-- Lucene spatial -->
<!-- START: dependencies that are shaded --> <!-- START: dependencies that might be shaded -->
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>
<artifactId>guava</artifactId> <artifactId>guava</artifactId>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.carrotsearch</groupId> <groupId>com.carrotsearch</groupId>
<artifactId>hppc</artifactId> <artifactId>hppc</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>joda-time</groupId> <groupId>joda-time</groupId>
<artifactId>joda-time</artifactId> <artifactId>joda-time</artifactId>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.joda</groupId> <groupId>org.joda</groupId>
<artifactId>joda-convert</artifactId> <artifactId>joda-convert</artifactId>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId> <artifactId>jackson-core</artifactId>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId> <groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-smile</artifactId> <artifactId>jackson-dataformat-smile</artifactId>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId> <groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId> <artifactId>jackson-dataformat-yaml</artifactId>
<scope>compile</scope>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
@ -186,83 +162,61 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId> <groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-cbor</artifactId> <artifactId>jackson-dataformat-cbor</artifactId>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.netty</groupId> <groupId>io.netty</groupId>
<artifactId>netty</artifactId> <artifactId>netty</artifactId>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.ning</groupId> <groupId>com.ning</groupId>
<artifactId>compress-lzf</artifactId> <artifactId>compress-lzf</artifactId>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tdunning</groupId> <groupId>com.tdunning</groupId>
<artifactId>t-digest</artifactId> <artifactId>t-digest</artifactId>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-cli</groupId> <groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId> <artifactId>commons-cli</artifactId>
</dependency> </dependency>
<!-- END: dependencies that might be shaded -->
<!-- END: dependencies that are shaded -->
<dependency> <dependency>
<groupId>org.codehaus.groovy</groupId> <groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId> <artifactId>groovy-all</artifactId>
<classifier>indy</classifier> <classifier>indy</classifier>
<scope>compile</scope>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>log4j</groupId>
<artifactId>log4j</artifactId> <artifactId>log4j</artifactId>
<scope>compile</scope>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>log4j</groupId>
<artifactId>apache-log4j-extras</artifactId> <artifactId>apache-log4j-extras</artifactId>
<scope>compile</scope>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId> <artifactId>slf4j-api</artifactId>
<scope>compile</scope>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.java.dev.jna</groupId> <groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId> <artifactId>jna</artifactId>
<scope>compile</scope>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.fusesource</groupId> <groupId>org.fusesource</groupId>
<artifactId>sigar</artifactId> <artifactId>sigar</artifactId>
<scope>compile</scope>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>

View File

@ -47,13 +47,6 @@ governing permissions and limitations under the License. -->
</dependencies> </dependencies>
<build> <build>
<extensions>
<extension>
<groupId>org.kuali.maven.wagons</groupId>
<artifactId>maven-s3-wagon</artifactId>
<version>1.1.19</version>
</extension>
</extensions>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>

View File

@ -26,8 +26,6 @@
<groupId>org.mozilla</groupId> <groupId>org.mozilla</groupId>
<artifactId>rhino</artifactId> <artifactId>rhino</artifactId>
<version>1.7R4</version> <version>1.7R4</version>
<exclusions>
</exclusions>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -27,14 +27,17 @@
<dependency> <dependency>
<groupId>org.hamcrest</groupId> <groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId> <artifactId>hamcrest-all</artifactId>
<scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
<artifactId>lucene-test-framework</artifactId> <artifactId>lucene-test-framework</artifactId>
<scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.elasticsearch</groupId> <groupId>org.elasticsearch</groupId>
@ -44,6 +47,7 @@
<groupId>org.elasticsearch</groupId> <groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId> <artifactId>elasticsearch</artifactId>
<type>test-jar</type> <type>test-jar</type>
<scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>log4j</groupId>

22
pom.xml
View File

@ -132,35 +132,30 @@
<groupId>com.carrotsearch.randomizedtesting</groupId> <groupId>com.carrotsearch.randomizedtesting</groupId>
<artifactId>randomizedtesting-runner</artifactId> <artifactId>randomizedtesting-runner</artifactId>
<version>${testframework.version}</version> <version>${testframework.version}</version>
<scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.hamcrest</groupId> <groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId> <artifactId>hamcrest-all</artifactId>
<version>1.3</version> <version>1.3</version>
<scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.11</version> <version>4.11</version>
<scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.jimfs</groupId> <groupId>com.google.jimfs</groupId>
<artifactId>jimfs</artifactId> <artifactId>jimfs</artifactId>
<version>1.0</version> <version>1.0</version>
<scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
<artifactId>lucene-test-framework</artifactId> <artifactId>lucene-test-framework</artifactId>
<version>${lucene.maven.version}</version> <version>${lucene.maven.version}</version>
<scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -168,12 +163,12 @@
<artifactId>elasticsearch</artifactId> <artifactId>elasticsearch</artifactId>
<version>${elasticsearch.version}</version> <version>${elasticsearch.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.elasticsearch</groupId> <groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId> <artifactId>elasticsearch</artifactId>
<version>${elasticsearch.version}</version> <version>${elasticsearch.version}</version>
<type>test-jar</type> <type>test-jar</type>
<scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -255,13 +250,11 @@
<groupId>com.spatial4j</groupId> <groupId>com.spatial4j</groupId>
<artifactId>spatial4j</artifactId> <artifactId>spatial4j</artifactId>
<version>0.4.1</version> <version>0.4.1</version>
<optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.vividsolutions</groupId> <groupId>com.vividsolutions</groupId>
<artifactId>jts</artifactId> <artifactId>jts</artifactId>
<version>1.13</version> <version>1.13</version>
<optional>true</optional>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>xerces</groupId> <groupId>xerces</groupId>
@ -274,35 +267,29 @@
<groupId>com.github.spullara.mustache.java</groupId> <groupId>com.github.spullara.mustache.java</groupId>
<artifactId>compiler</artifactId> <artifactId>compiler</artifactId>
<version>0.8.13</version> <version>0.8.13</version>
<optional>true</optional>
</dependency> </dependency>
<!-- Used in plugins --> <!-- Used in plugins -->
<!-- https://github.com/elasticsearch/elasticsearch-analysis-phonetic -->
<dependency> <dependency>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-phonetic</artifactId> <artifactId>lucene-analyzers-phonetic</artifactId>
<version>${lucene.maven.version}</version> <version>${lucene.maven.version}</version>
</dependency> </dependency>
<!-- https://github.com/elasticsearch/elasticsearch-analysis-kuromoji -->
<dependency> <dependency>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-kuromoji</artifactId> <artifactId>lucene-analyzers-kuromoji</artifactId>
<version>${lucene.maven.version}</version> <version>${lucene.maven.version}</version>
</dependency> </dependency>
<!-- https://github.com/elasticsearch/elasticsearch-analysis-stempel -->
<dependency> <dependency>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-stempel</artifactId> <artifactId>lucene-analyzers-stempel</artifactId>
<version>${lucene.maven.version}</version> <version>${lucene.maven.version}</version>
</dependency> </dependency>
<!-- https://github.com/elasticsearch/elasticsearch-analysis-icu -->
<dependency> <dependency>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-icu</artifactId> <artifactId>lucene-analyzers-icu</artifactId>
<version>${lucene.maven.version}</version> <version>${lucene.maven.version}</version>
</dependency> </dependency>
<!-- https://github.com/elasticsearch/elasticsearch-analysis-smartcn -->
<dependency> <dependency>
<groupId>org.apache.lucene</groupId> <groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-smartcn</artifactId> <artifactId>lucene-analyzers-smartcn</artifactId>
@ -396,35 +383,30 @@
<artifactId>groovy-all</artifactId> <artifactId>groovy-all</artifactId>
<version>2.4.0</version> <version>2.4.0</version>
<classifier>indy</classifier> <classifier>indy</classifier>
<optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>log4j</groupId>
<artifactId>log4j</artifactId> <artifactId>log4j</artifactId>
<version>${log4j.version}</version> <version>${log4j.version}</version>
<optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>log4j</groupId>
<artifactId>apache-log4j-extras</artifactId> <artifactId>apache-log4j-extras</artifactId>
<version>${log4j.version}</version> <version>${log4j.version}</version>
<optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId> <artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version> <version>${slf4j.version}</version>
<optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId> <artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version> <version>${slf4j.version}</version>
<optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
@ -438,7 +420,6 @@
<groupId>org.fusesource</groupId> <groupId>org.fusesource</groupId>
<artifactId>sigar</artifactId> <artifactId>sigar</artifactId>
<version>1.6.4</version> <version>1.6.4</version>
<optional>true</optional>
</dependency> </dependency>
<!-- We don't use this since the publish pom is then messed up --> <!-- We don't use this since the publish pom is then messed up -->
@ -459,7 +440,6 @@
<artifactId>org.jacoco.agent</artifactId> <artifactId>org.jacoco.agent</artifactId>
<classifier>runtime</classifier> <classifier>runtime</classifier>
<version>0.6.4.201312101107</version> <version>0.6.4.201312101107</version>
<scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>