flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject [2/7] flink git commit: [maven] properly attach the CEP Scala source code
Date Fri, 16 Dec 2016 17:00:35 GMT
[maven] properly attach the CEP Scala source code

Two options, either change the default Maven source directory from
'src/main/java' to 'src/main/scala' or use the build-helper-maven-plugin
to attach the Scala sources. Opting for both here to be in lines with
Maven standards and support Eclipse.

This closes #2908.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/e9e6688e
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/e9e6688e
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/e9e6688e

Branch: refs/heads/master
Commit: e9e6688e0e8c1febb6ee006f710d5eeab14f2a91
Parents: 0506a63
Author: Maximilian Michels <mxm@apache.org>
Authored: Wed Nov 30 12:20:40 2016 +0100
Committer: Maximilian Michels <mxm@apache.org>
Committed: Fri Dec 16 17:51:59 2016 +0100

----------------------------------------------------------------------
 flink-libraries/flink-cep-scala/pom.xml | 37 ++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/e9e6688e/flink-libraries/flink-cep-scala/pom.xml
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-cep-scala/pom.xml b/flink-libraries/flink-cep-scala/pom.xml
index 2aef4ec..a613d44 100644
--- a/flink-libraries/flink-cep-scala/pom.xml
+++ b/flink-libraries/flink-cep-scala/pom.xml
@@ -93,6 +93,8 @@ under the License.
     </dependencies>
 
     <build>
+        <!-- Not strictly necessary because of the build-helper-maven-plugin below. -->
+        <sourceDirectory>src/main/scala</sourceDirectory>
         <plugins>
             <!-- Scala Compiler -->
             <plugin>
@@ -116,6 +118,41 @@ under the License.
 					<configLocation>${project.basedir}/../../tools/maven/scalastyle-config.xml</configLocation>
 				</configuration>
 			</plugin>
+
+			<!-- Adding scala source directories to build path for Eclipse and generating the sources
jar -->
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>build-helper-maven-plugin</artifactId>
+				<version>1.7</version>
+				<executions>
+					<!-- Add src/main/scala to eclipse build path -->
+					<execution>
+						<id>add-source</id>
+						<phase>generate-sources</phase>
+						<goals>
+							<goal>add-source</goal>
+						</goals>
+						<configuration>
+							<sources>
+								<source>src/main/scala</source>
+							</sources>
+						</configuration>
+					</execution>
+					<!-- Add src/test/scala to eclipse build path -->
+					<execution>
+						<id>add-test-source</id>
+						<phase>generate-test-sources</phase>
+						<goals>
+							<goal>add-test-source</goal>
+						</goals>
+						<configuration>
+							<sources>
+								<source>src/test/scala</source>
+							</sources>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
         </plugins>
     </build>
     


Mime
View raw message