Skip to content

Commit b536d5d

Browse files
jendapsrowen
authored andcommitted
[SPARK-9015] [BUILD] Clean project import in scala ide
Cleanup maven for a clean import in scala-ide / eclipse. * remove groovy plugin which is really not needed at all * add-source from build-helper-maven-plugin is not needed as recent version of scala-maven-plugin do it automatically * add lifecycle-mapping plugin to hide a few useless warnings from ide Author: Jan Prach <[email protected]> Closes apache#7375 from jendap/clean-project-import-in-scala-ide and squashes the following commits: c4b4c0f [Jan Prach] fix whitespaces 5a83e07 [Jan Prach] Revert "remove java compiler warnings from java tests" 312007e [Jan Prach] scala-maven-plugin itself add scala sources by default f47d856 [Jan Prach] remove spark-1.4-staging repository c8a54db [Jan Prach] remove java compiler warnings from java tests 999a068 [Jan Prach] remove some maven warnings in scala ide 80fbdc5 [Jan Prach] remove groovy and gmavenplus plugin
1 parent 4ea6480 commit b536d5d

File tree

5 files changed

+53
-85
lines changed

5 files changed

+53
-85
lines changed

pom.xml

Lines changed: 53 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@
152152
<aws.kinesis.client.version>1.2.1</aws.kinesis.client.version>
153153
<commons.httpclient.version>4.3.2</commons.httpclient.version>
154154
<commons.math3.version>3.4.1</commons.math3.version>
155-
<test_classpath_file>${project.build.directory}/spark-test-classpath.txt</test_classpath_file>
156155
<scala.version>2.10.4</scala.version>
157156
<scala.binary.version>2.10</scala.binary.version>
158157
<jline.version>${scala.version}</jline.version>
@@ -283,18 +282,6 @@
283282
<enabled>false</enabled>
284283
</snapshots>
285284
</repository>
286-
<!-- TODO: This can be deleted after Spark 1.4 is posted -->
287-
<repository>
288-
<id>spark-1.4-staging</id>
289-
<name>Spark 1.4 RC4 Staging Repository</name>
290-
<url>https://repository.apache.org/content/repositories/orgapachespark-1112</url>
291-
<releases>
292-
<enabled>true</enabled>
293-
</releases>
294-
<snapshots>
295-
<enabled>false</enabled>
296-
</snapshots>
297-
</repository>
298285
</repositories>
299286
<pluginRepositories>
300287
<pluginRepository>
@@ -318,17 +305,6 @@
318305
<artifactId>unused</artifactId>
319306
<version>1.0.0</version>
320307
</dependency>
321-
<!--
322-
This depndency has been added to provided scope as it is needed for executing build
323-
specific groovy scripts using gmaven+ and not required for downstream project building
324-
with spark.
325-
-->
326-
<dependency>
327-
<groupId>org.codehaus.groovy</groupId>
328-
<artifactId>groovy-all</artifactId>
329-
<version>2.3.7</version>
330-
<scope>provided</scope>
331-
</dependency>
332308
<!--
333309
This is needed by the scalatest plugin, and so is declared here to be available in
334310
all child modules, just as scalatest is run in all children
@@ -1412,6 +1388,58 @@
14121388
<artifactId>maven-deploy-plugin</artifactId>
14131389
<version>2.8.2</version>
14141390
</plugin>
1391+
<!-- This plugin's configuration is used to store Eclipse m2e settings only. -->
1392+
<!-- It has no influence on the Maven build itself. -->
1393+
<plugin>
1394+
<groupId>org.eclipse.m2e</groupId>
1395+
<artifactId>lifecycle-mapping</artifactId>
1396+
<version>1.0.0</version>
1397+
<configuration>
1398+
<lifecycleMappingMetadata>
1399+
<pluginExecutions>
1400+
<pluginExecution>
1401+
<pluginExecutionFilter>
1402+
<groupId>org.apache.maven.plugins</groupId>
1403+
<artifactId>maven-dependency-plugin</artifactId>
1404+
<versionRange>[2.8,)</versionRange>
1405+
<goals>
1406+
<goal>build-classpath</goal>
1407+
</goals>
1408+
</pluginExecutionFilter>
1409+
<action>
1410+
<ignore></ignore>
1411+
</action>
1412+
</pluginExecution>
1413+
<pluginExecution>
1414+
<pluginExecutionFilter>
1415+
<groupId>org.apache.maven.plugins</groupId>
1416+
<artifactId>maven-jar-plugin</artifactId>
1417+
<versionRange>[2.6,)</versionRange>
1418+
<goals>
1419+
<goal>test-jar</goal>
1420+
</goals>
1421+
</pluginExecutionFilter>
1422+
<action>
1423+
<ignore></ignore>
1424+
</action>
1425+
</pluginExecution>
1426+
<pluginExecution>
1427+
<pluginExecutionFilter>
1428+
<groupId>org.apache.maven.plugins</groupId>
1429+
<artifactId>maven-antrun-plugin</artifactId>
1430+
<versionRange>[1.8,)</versionRange>
1431+
<goals>
1432+
<goal>run</goal>
1433+
</goals>
1434+
</pluginExecutionFilter>
1435+
<action>
1436+
<ignore></ignore>
1437+
</action>
1438+
</pluginExecution>
1439+
</pluginExecutions>
1440+
</lifecycleMappingMetadata>
1441+
</configuration>
1442+
</plugin>
14151443
</plugins>
14161444
</pluginManagement>
14171445

@@ -1429,34 +1457,12 @@
14291457
</goals>
14301458
<configuration>
14311459
<includeScope>test</includeScope>
1432-
<outputFile>${test_classpath_file}</outputFile>
1460+
<outputProperty>test_classpath</outputProperty>
14331461
</configuration>
14341462
</execution>
14351463
</executions>
14361464
</plugin>
14371465

1438-
<!-- This plugin reads a file into maven property. And it lets us write groovy !! -->
1439-
<plugin>
1440-
<groupId>org.codehaus.gmavenplus</groupId>
1441-
<artifactId>gmavenplus-plugin</artifactId>
1442-
<version>1.5</version>
1443-
<executions>
1444-
<execution>
1445-
<phase>process-test-classes</phase>
1446-
<goals>
1447-
<goal>execute</goal>
1448-
</goals>
1449-
<configuration>
1450-
<scripts>
1451-
<script><![CDATA[
1452-
def file = new File(project.properties.test_classpath_file)
1453-
project.properties.test_classpath = file.getText().split().join(":")
1454-
]]></script>
1455-
</scripts>
1456-
</configuration>
1457-
</execution>
1458-
</executions>
1459-
</plugin>
14601466
<!--
14611467
The shade plug-in is used here to create effective pom's (see SPARK-3812), and also
14621468
remove references from the shaded libraries from artifacts published by Spark.
@@ -1523,36 +1529,6 @@
15231529
<groupId>org.apache.maven.plugins</groupId>
15241530
<artifactId>maven-enforcer-plugin</artifactId>
15251531
</plugin>
1526-
<plugin>
1527-
<groupId>org.codehaus.mojo</groupId>
1528-
<artifactId>build-helper-maven-plugin</artifactId>
1529-
<executions>
1530-
<execution>
1531-
<id>add-scala-sources</id>
1532-
<phase>generate-sources</phase>
1533-
<goals>
1534-
<goal>add-source</goal>
1535-
</goals>
1536-
<configuration>
1537-
<sources>
1538-
<source>src/main/scala</source>
1539-
</sources>
1540-
</configuration>
1541-
</execution>
1542-
<execution>
1543-
<id>add-scala-test-sources</id>
1544-
<phase>generate-test-sources</phase>
1545-
<goals>
1546-
<goal>add-test-source</goal>
1547-
</goals>
1548-
<configuration>
1549-
<sources>
1550-
<source>src/test/scala</source>
1551-
</sources>
1552-
</configuration>
1553-
</execution>
1554-
</executions>
1555-
</plugin>
15561532
<plugin>
15571533
<groupId>net.alchim31.maven</groupId>
15581534
<artifactId>scala-maven-plugin</artifactId>

repl/pom.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@
133133
</goals>
134134
<configuration>
135135
<sources>
136-
<source>src/main/scala</source>
137136
<source>${extra.source.dir}</source>
138137
</sources>
139138
</configuration>
@@ -146,7 +145,6 @@
146145
</goals>
147146
<configuration>
148147
<sources>
149-
<source>src/test/scala</source>
150148
<source>${extra.testsource.dir}</source>
151149
</sources>
152150
</configuration>

sql/core/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@
123123
</goals>
124124
<configuration>
125125
<sources>
126-
<source>src/test/scala</source>
127126
<source>src/test/gen-java</source>
128127
</sources>
129128
</configuration>

sql/hive/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@
133133
</goals>
134134
<configuration>
135135
<sources>
136-
<source>src/test/scala</source>
137136
<source>compatibility/src/test/scala</source>
138137
</sources>
139138
</configuration>

tools/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,6 @@
7676
<groupId>org.apache.maven.plugins</groupId>
7777
<artifactId>maven-source-plugin</artifactId>
7878
</plugin>
79-
<plugin>
80-
<groupId>org.codehaus.mojo</groupId>
81-
<artifactId>build-helper-maven-plugin</artifactId>
82-
</plugin>
8379
</plugins>
8480
</build>
8581
</project>

0 commit comments

Comments
 (0)