Repository: incubator-reef
Updated Branches:
  refs/heads/master a921ca1a9 -> 9defe611d


[REEF-114] Trigger the .NET build from Maven.

  * Added POM file for cs project
  * Drop driver.dll to the folder for reef-bridge-clr to consume at build time
  * Remove driver.dll from repository as it can be generated on the fly
  * Set dependency between reef-bridge-clr and cs project
  * Added packageSources in NuGet.config to resolve package download issue for
    the case where build machine doesn't config it from VS.
  * Updated CPP project to use VS 2013 and use ToolsVersion 12.0
  * Updated RAT excludes

  To build entire project with .Net code, -PDotNet need to be added with the 
mvn command.
    mvn clean install -PDotNet -PBridge

JIRA:
  REEF-114 https://issues.apache.org/jira/browse/REEF-114
  REEF-17  https://issues.apache.org/jira/browse/REEF-17

Pull Request:
  This closes #65


Project: http://git-wip-us.apache.org/repos/asf/incubator-reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-reef/commit/9defe611
Tree: http://git-wip-us.apache.org/repos/asf/incubator-reef/tree/9defe611
Diff: http://git-wip-us.apache.org/repos/asf/incubator-reef/diff/9defe611

Branch: refs/heads/master
Commit: 9defe611d153d3b12122acf91e7881c75fd0b89c
Parents: a921ca1
Author: Julia Wang <[email protected]>
Authored: Mon Feb 2 10:18:48 2015 -0800
Committer: Markus Weimer <[email protected]>
Committed: Tue Feb 3 13:37:26 2015 -0800

----------------------------------------------------------------------
 lang/cpp/.gitignore                             |   5 +-
 lang/cpp/reef-bridge-clr/pom.xml                |   5 +
 .../externals/Org.Apache.Reef.Driver.dll        | Bin 115712 -> 0 bytes
 .../CppBridge/JavaClrBridge/JavaClrBridge.sln   |   4 +-
 .../JavaClrBridge/JavaClrBridge.vcxproj         |  10 +-
 lang/cs/.nuget/NuGet.Config                     |   7 ++
 lang/cs/Source/build.props                      |   2 +-
 lang/cs/pom.xml                                 | 103 +++++++++++++++++++
 pom.xml                                         |  19 ++--
 9 files changed, 137 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/9defe611/lang/cpp/.gitignore
----------------------------------------------------------------------
diff --git a/lang/cpp/.gitignore b/lang/cpp/.gitignore
index 79dafb9..f0bf936 100644
--- a/lang/cpp/.gitignore
+++ b/lang/cpp/.gitignore
@@ -3,6 +3,5 @@
 **/*.suo
 **/obj
 **/x64
-
-
-
+**/Debug
+reef-bridge-clr/src/main/CSharp/CSharp/ClrHandler/externals/Org.Apache.Reef.Driver.dll
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/9defe611/lang/cpp/reef-bridge-clr/pom.xml
----------------------------------------------------------------------
diff --git a/lang/cpp/reef-bridge-clr/pom.xml b/lang/cpp/reef-bridge-clr/pom.xml
index d16d80a..6e1e987 100644
--- a/lang/cpp/reef-bridge-clr/pom.xml
+++ b/lang/cpp/reef-bridge-clr/pom.xml
@@ -61,6 +61,11 @@ under the License.
         </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
+            <artifactId>reef-dotnet</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
             <artifactId>reef-bridge-java</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/9defe611/lang/cpp/reef-bridge-clr/src/main/CSharp/CSharp/ClrHandler/externals/Org.Apache.Reef.Driver.dll
----------------------------------------------------------------------
diff --git 
a/lang/cpp/reef-bridge-clr/src/main/CSharp/CSharp/ClrHandler/externals/Org.Apache.Reef.Driver.dll
 
b/lang/cpp/reef-bridge-clr/src/main/CSharp/CSharp/ClrHandler/externals/Org.Apache.Reef.Driver.dll
deleted file mode 100644
index 66da519..0000000
Binary files 
a/lang/cpp/reef-bridge-clr/src/main/CSharp/CSharp/ClrHandler/externals/Org.Apache.Reef.Driver.dll
 and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/9defe611/lang/cpp/reef-bridge-clr/src/main/Cpp/CppBridge/JavaClrBridge/JavaClrBridge.sln
----------------------------------------------------------------------
diff --git 
a/lang/cpp/reef-bridge-clr/src/main/Cpp/CppBridge/JavaClrBridge/JavaClrBridge.sln
 
b/lang/cpp/reef-bridge-clr/src/main/Cpp/CppBridge/JavaClrBridge/JavaClrBridge.sln
index d4b2aec..3293edb 100644
--- 
a/lang/cpp/reef-bridge-clr/src/main/Cpp/CppBridge/JavaClrBridge/JavaClrBridge.sln
+++ 
b/lang/cpp/reef-bridge-clr/src/main/Cpp/CppBridge/JavaClrBridge/JavaClrBridge.sln
@@ -1,6 +1,8 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
+# Visual Studio 2013
+VisualStudioVersion = 12.0.21005.1
+MinimumVisualStudioVersion = 10.0.40219.1
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaClrBridge", 
"JavaClrBridge.vcxproj", "{2825FD53-350B-4294-8CFC-8DD2F4F4F285}"
        ProjectSection(ProjectDependencies) = postProject
                {443A7B61-5C91-4F67-9FCD-81BC6FABFDBD} = 
{443A7B61-5C91-4F67-9FCD-81BC6FABFDBD}

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/9defe611/lang/cpp/reef-bridge-clr/src/main/Cpp/CppBridge/JavaClrBridge/JavaClrBridge.vcxproj
----------------------------------------------------------------------
diff --git 
a/lang/cpp/reef-bridge-clr/src/main/Cpp/CppBridge/JavaClrBridge/JavaClrBridge.vcxproj
 
b/lang/cpp/reef-bridge-clr/src/main/Cpp/CppBridge/JavaClrBridge/JavaClrBridge.vcxproj
index d8a889e..486dc75 100644
--- 
a/lang/cpp/reef-bridge-clr/src/main/Cpp/CppBridge/JavaClrBridge/JavaClrBridge.vcxproj
+++ 
b/lang/cpp/reef-bridge-clr/src/main/Cpp/CppBridge/JavaClrBridge/JavaClrBridge.vcxproj
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+<Project DefaultTargets="Build" ToolsVersion="12.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
   <PropertyGroup Condition="'$(Configuration)'==''">
     <Configuration>Release</Configuration>
   </PropertyGroup>
@@ -34,28 +34,28 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" 
Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v110</PlatformToolset>
+    <PlatformToolset>v120</PlatformToolset>
     <CLRSupport>true</CLRSupport>
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" 
Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v110</PlatformToolset>
+    <PlatformToolset>v120</PlatformToolset>
     <CLRSupport>true</CLRSupport>
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" 
Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v110</PlatformToolset>
+    <PlatformToolset>v120</PlatformToolset>
     <CLRSupport>true</CLRSupport>
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" 
Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v110</PlatformToolset>
+    <PlatformToolset>v120</PlatformToolset>
     <CLRSupport>true</CLRSupport>
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/9defe611/lang/cs/.nuget/NuGet.Config
----------------------------------------------------------------------
diff --git a/lang/cs/.nuget/NuGet.Config b/lang/cs/.nuget/NuGet.Config
index 0ebb37e..d998d54 100644
--- a/lang/cs/.nuget/NuGet.Config
+++ b/lang/cs/.nuget/NuGet.Config
@@ -21,4 +21,11 @@ under the License.
   <solution>
     <add key="disableSourceControlIntegration" value="true" />
   </solution>
+  <packageSources>
+      <add key="NuGet official package source" 
value="https://nuget.org/api/v2/"; />
+  </packageSources>
+  <disabledPackageSources />
+  <activePackageSource>
+      <add key="All" value="(Aggregate source)"  />
+  </activePackageSource>
 </configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/9defe611/lang/cs/Source/build.props
----------------------------------------------------------------------
diff --git a/lang/cs/Source/build.props b/lang/cs/Source/build.props
index 95bd261..a1b8952 100644
--- a/lang/cs/Source/build.props
+++ b/lang/cs/Source/build.props
@@ -15,7 +15,7 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 -->
-<Project ToolsVersion="4.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+<Project ToolsVersion="12.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
 
   <!-- Common build paths --> 
   <PropertyGroup>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/9defe611/lang/cs/pom.xml
----------------------------------------------------------------------
diff --git a/lang/cs/pom.xml b/lang/cs/pom.xml
new file mode 100644
index 0000000..ab30cf2
--- /dev/null
+++ b/lang/cs/pom.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>reef-dotnet</artifactId>
+    <name>REEF Dot Net</name>
+    <description>Reef Dot Net</description>
+    <parent>
+        <groupId>org.apache.reef</groupId>
+        <artifactId>reef-project</artifactId>
+        <version>0.11.0-incubating-SNAPSHOT</version>
+        <relativePath>../..</relativePath>
+    </parent>
+    <profiles>
+        <profile>
+            <id>DotNet</id>
+            <build>
+                <plugins>
+                   <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <configuration>
+                            <executable>msbuild.exe</executable>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>clean</id>
+                                <phase>clean</phase>
+                                <configuration>
+                                    <arguments>
+                                        <argument>
+                                           ${project.basedir}/ReefDotNet.sln
+                                        </argument>
+                                        
<argument>/p:Configuration="Release"</argument>
+                                        <argument>/p:Platform="x64"</argument>
+                                        <argument>/t:Clean</argument>
+                                    </arguments>
+                                </configuration>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                            </execution>
+                            <execution>
+                                <id>build</id>
+                                <phase>compile</phase>
+                                <configuration>
+                                    <arguments>
+                                        <argument>
+                                            ${project.basedir}/ReefDotNet.sln
+                                        </argument>
+                                        
<argument>/p:Configuration="Release"</argument>
+                                        <argument>/p:Platform="x64"</argument>
+                                    </arguments>
+                                </configuration>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <version>1.7</version>
+                        <executions>
+                            <execution>
+                                <id>copy-driver-files</id>
+                                <phase>compile</phase>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <target name="copy driver dll file to 
class cpp project">
+                                        <copy 
file="${project.basedir}/bin/x64/Release/Org.Apache.Reef.Driver/Org.Apache.Reef.Driver.dll"
 tofile="${basedir}\target\classes\Org.Apache.Reef.Driver.dll" />
+                                        <copy 
file="${project.basedir}/bin/x64/Release/Org.Apache.Reef.Driver/Org.Apache.Reef.Driver.dll"
 
tofile="../cpp/reef-bridge-clr/src/main/CSharp/CSharp/ClrHandler/externals/Org.Apache.Reef.Driver.dll"
 />
+                                    </target>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/9defe611/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ab885f9..d24ece6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -243,20 +243,22 @@ under the License.
                             <!-- The below are sometimes created during tests 
-->
                             <exclude>REEF_LOCAL_RUNTIME/**</exclude>
                             <!-- The Visual Studio build files -->
-                            <exclude>lang/cs/ReefDotNet.sln</exclude>
+                            <exclude>*.sln</exclude>
                             <exclude>**/*.csproj.user</exclude>
                             <!-- The below are auto generated during the .Net 
build -->                            
-                            <exclude>lang/cs/bin/**</exclude>
+                            <exclude>**/bin/**</exclude>
                             <exclude>**/obj/**</exclude>
+                            <exclude>**/Release/**</exclude>
+                            <exclude>**/Debug/**</exclude>
                             <!-- NuGet dependencies downloaded as part of the 
build -->
-                            <exclude>lang/cs/packages/**</exclude>
+                            <exclude>**/packages/**</exclude>
                             <!-- The below are auto generated files for 
serialization -->
-                            
<exclude>lang/cs/Source/REEF/reef-common/ReefCommon/protobuf/cs/*</exclude>
-                            
<exclude>lang/cs/Source/REEF/reef-common/ReefCommon/avro/*</exclude>
+                            <exclude>**/ReefCommon/protobuf/cs/*</exclude>
+                            <exclude>**/ReefCommon/avro/*</exclude>
                             <!-- The below are binary data files used in tests 
-->
-                            
<exclude>lang/cs/Tests/ReefTests/ConfigFiles/evaluator.conf</exclude>
-                            
<exclude>lang/cs/Tests/TangTests/evaluator.conf</exclude>
-                            
<exclude>lang/cs/Tests/TangTests/simpleConstructorJavaProto.bin</exclude>
+                            <exclude>**/ConfigFiles/evaluator.conf</exclude>
+                            <exclude>**/TangTests/evaluator.conf</exclude>
+                            
<exclude>**/TangTests/simpleConstructorJavaProto.bin</exclude>
                         </excludes>
                     </configuration>
                 </plugin>
@@ -614,6 +616,7 @@ under the License.
     </dependencyManagement>
 
     <modules>
+        <module>lang/cs</module>
         <module>lang/java/reef-annotations</module>
         <module>lang/java/reef-bridge-java</module>
         <module>lang/cpp/reef-bridge-clr</module>

Reply via email to