Skip to content
This repository was archived by the owner on Apr 25, 2020. It is now read-only.

Commit 4c357d5

Browse files
committed
Finally fix "mvn clean package" so that the scala-plugin takes over before java-compiler
1 parent cc84e2b commit 4c357d5

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

pom.xml

+19-3
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@
8989
</dependencies>
9090

9191
<build>
92-
<sourceDirectory>src/main/scala</sourceDirectory>
93-
<testSourceDirectory>src/test/scala</testSourceDirectory>
92+
<sourceDirectory>${basedir}/src/main/scala</sourceDirectory>
93+
<testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory>
9494
<resources>
9595
<resource>
9696
<directory>${basedir}/src/main/resources</directory>
@@ -133,17 +133,31 @@
133133
<recompileMode>incremental</recompileMode>
134134
<scalaVersion>${scala.version}</scalaVersion>
135135
<charset>${project.build.sourceEncoding}</charset>
136+
<javacArgs>
137+
<javacArg>-Xlint:unchecked</javacArg>
138+
<javacArg>-Xlint:deprecation</javacArg>
139+
</javacArgs>
136140
<args>
137141
<arg>-deprecation</arg>
138142
<arg>-unchecked</arg>
139143
<arg>-optimize</arg>
140144
</args>
141-
<charset>${project.build.sourceEncoding}</charset>
142145
</configuration>
143146
<executions>
144147
<execution>
148+
<id>scala-compile-first</id>
149+
<phase>process-resources</phase>
145150
<goals>
151+
<goal>add-source</goal>
146152
<goal>compile</goal>
153+
</goals>
154+
</execution>
155+
156+
<execution>
157+
<id>scala-test-compile</id>
158+
<phase>process-test-resources</phase>
159+
<goals>
160+
<!--<goal>add-source</goal>-->
147161
<goal>testCompile</goal>
148162
</goals>
149163
</execution>
@@ -163,6 +177,7 @@
163177
<plugin>
164178
<groupId>org.apache.maven.plugins</groupId>
165179
<artifactId>maven-javadoc-plugin</artifactId>
180+
<version>2.9</version>
166181
<executions>
167182
<execution>
168183
<id>attach-javadoc</id>
@@ -177,6 +192,7 @@
177192
<plugin>
178193
<groupId>org.apache.maven.plugins</groupId>
179194
<artifactId>maven-source-plugin</artifactId>
195+
<version>2.2.1</version>
180196
<executions>
181197
<execution>
182198
<id>attach-sources</id>

0 commit comments

Comments
 (0)