Repository: reef
Updated Branches:
  refs/heads/master 0357e4f44 -> f91b09bd2


[REEF-1197] Fix .NET build concurrency issues around JAR creation and NuGet 
cleanup

This addressed the issue by
 * Refactoring build property and target files.
 * Fixing nuget clean problems
 * Making only the client project depend on CopyJar target

JIRA:
  [REEF-1197](https://issues.apache.org/jira/browse/REEF-1197)

Pull request:
  This closes #835


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

Branch: refs/heads/master
Commit: f91b09bd20c50bb573e7a022933b298fc917cfe6
Parents: 0357e4f
Author: Beysim Sezgin <[email protected]>
Authored: Fri Jan 15 16:14:52 2016 -0800
Committer: Mariia Mykhailova <[email protected]>
Committed: Tue Feb 9 22:53:39 2016 -0800

----------------------------------------------------------------------
 .gitignore                                      |  1 +
 lang/cs/.nuget/NuGet.targets                    | 20 ++----
 .../Org.Apache.REEF.Bridge.vcxproj              |  1 +
 .../Org.Apache.REEF.Bridge.vcxproj.filters      |  6 +-
 .../Org.Apache.REEF.Client.Tests.csproj         |  2 +-
 .../Org.Apache.REEF.Client.csproj               | 17 ++++-
 .../Org.Apache.REEF.Examples.AllHandlers.csproj | 11 +--
 .../Org.Apache.REEF.IO.TestClient.csproj        |  1 +
 ...g.Apache.REEF.Network.Examples.Client.csproj |  9 ---
 .../Org.Apache.REEF.Tests.csproj                | 11 +--
 lang/cs/build.props                             | 74 +-------------------
 lang/cs/build.targets                           | 70 ++++++++++++++++++
 pom.xml                                         |  1 +
 13 files changed, 102 insertions(+), 122 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/reef/blob/f91b09bd/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index a6505c0..75baea5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,6 +25,7 @@ nb-configuration.xml
 .idea
 atlassian-ide-plugin.xml
 *.sln.DotSettings.user
+*.VC.opendb
 #
 # ----------------------------------------------------------------------
 # OS Files

http://git-wip-us.apache.org/repos/asf/reef/blob/f91b09bd/lang/cs/.nuget/NuGet.targets
----------------------------------------------------------------------
diff --git a/lang/cs/.nuget/NuGet.targets b/lang/cs/.nuget/NuGet.targets
index aee07a8..0a3a257 100644
--- a/lang/cs/.nuget/NuGet.targets
+++ b/lang/cs/.nuget/NuGet.targets
@@ -33,7 +33,8 @@ under the License.
         <!-- Download NuGet.exe if it does not already exist -->
         <DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' 
">true</DownloadNuGetExe>
     </PropertyGroup>
-
+    <Import Project="$(SolutionDir)\build.props" 
Condition="'$(BuildDotPropsIsImported)'!='true'" />
+    <Import Project="$(SolutionDir)\build.targets" 
Condition="'$(BuildDotTargetsIsImported)'!='true'"/>
     <ItemGroup Condition=" '$(PackageSources)' == '' ">
         <!-- Package sources used to restore packages. By default, registered 
sources under %APPDATA%\NuGet\NuGet.Config will be used -->
         <!-- The official NuGet package source (https://www.nuget.org/api/v2/) 
will be excluded if package sources are specified and it does not appear in the 
list -->
@@ -51,6 +52,7 @@ under the License.
     <PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
         <!-- We need to launch nuget.exe with the mono command if we're not on 
windows -->
         <NuGetToolsPath>$(SolutionDir)\.nuget</NuGetToolsPath>
+        
<ThisNugetPackagePath>$(SolutionDir2).nuget\packages\$(RootNamespace).$(REEF_NugetVersion).nupkg</ThisNugetPackagePath>
     </PropertyGroup>
 
     <PropertyGroup>
@@ -108,12 +110,7 @@ under the License.
 
     <!-- Make sure clean will clean up .nuget/packages and .nuget/nuspec 
directories -->
     <PropertyGroup>
-        <CleanDependsOn>$(CleanDependsOn);CleanNugetPackages</CleanDependsOn>
-    </PropertyGroup>
-
-    <!-- Make sure clean will clean up .nuget/packages and .nuget/nuspec 
directories -->
-    <PropertyGroup>
-        <CleanDependsOn>$(CleanDependsOn);CleanNugetPackages</CleanDependsOn>
+      <CleanDependsOn>$(CleanDependsOn);CleanNugetPackages</CleanDependsOn>
     </PropertyGroup>
 
     <Target Name="CheckPrerequisites">
@@ -155,12 +152,7 @@ under the License.
     </Target>
 
     <Target Name="CleanNugetPackages">
-        <PropertyGroup>
-            <NuspecFilesDir>$(SolutionDir)\.nuget\nuspec</NuspecFilesDir>
-            <PackagesDir>$(SolutionDir)\.nuget\packages</PackagesDir>
-        </PropertyGroup>
-
-        <RemoveDir Directories="$(NuspecFilesDir);$(PackagesDir)" />
+        <Delete Files="$(ThisNugetPackagePath)" />
     </Target>
 
     <Choose>
@@ -178,7 +170,7 @@ under the License.
 
     <Target Name="PushPackages" >
         <ItemGroup>
-            <PackageFile 
Include="$(SolutionDir2).nuget\packages\$(RootNamespace).$(REEF_NugetVersion).nupkg"
 />
+            <PackageFile Include="$(ThisNugetPackagePath)" />
         </ItemGroup>
 
         <PropertyGroup>

http://git-wip-us.apache.org/repos/asf/reef/blob/f91b09bd/lang/cs/Org.Apache.REEF.Bridge/Org.Apache.REEF.Bridge.vcxproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Bridge/Org.Apache.REEF.Bridge.vcxproj 
b/lang/cs/Org.Apache.REEF.Bridge/Org.Apache.REEF.Bridge.vcxproj
index 66871f8..c81c781 100644
--- a/lang/cs/Org.Apache.REEF.Bridge/Org.Apache.REEF.Bridge.vcxproj
+++ b/lang/cs/Org.Apache.REEF.Bridge/Org.Apache.REEF.Bridge.vcxproj
@@ -25,6 +25,7 @@ under the License.
     <ConfigurationType>Application</ConfigurationType>
   </PropertyGroup>
   <Import Project="$(SolutionDir)\build.props" />
+  <Import Project="$(SolutionDir)\build.targets" />
   <ItemGroup Label="ProjectConfigurations">
     <ProjectConfiguration Include="Debug|x64">
       <Configuration>Debug</Configuration>

http://git-wip-us.apache.org/repos/asf/reef/blob/f91b09bd/lang/cs/Org.Apache.REEF.Bridge/Org.Apache.REEF.Bridge.vcxproj.filters
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Bridge/Org.Apache.REEF.Bridge.vcxproj.filters 
b/lang/cs/Org.Apache.REEF.Bridge/Org.Apache.REEF.Bridge.vcxproj.filters
index 767c497..a59888c 100644
--- a/lang/cs/Org.Apache.REEF.Bridge/Org.Apache.REEF.Bridge.vcxproj.filters
+++ b/lang/cs/Org.Apache.REEF.Bridge/Org.Apache.REEF.Bridge.vcxproj.filters
@@ -119,6 +119,9 @@
     <ClCompile Include="DriverRestartCompletedClr2Java.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="DriverLauncher.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <Text Include="ReadMe.txt" />
@@ -133,7 +136,4 @@
       <Filter>Resource Files</Filter>
     </Image>
   </ItemGroup>
-  <ItemGroup>
-    <None Include="Org.Apache.REEF.Bridge.nuspec" />
-  </ItemGroup>
 </Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/reef/blob/f91b09bd/lang/cs/Org.Apache.REEF.Client.Tests/Org.Apache.REEF.Client.Tests.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Client.Tests/Org.Apache.REEF.Client.Tests.csproj 
b/lang/cs/Org.Apache.REEF.Client.Tests/Org.Apache.REEF.Client.Tests.csproj
index 2c05264..bc47547 100644
--- a/lang/cs/Org.Apache.REEF.Client.Tests/Org.Apache.REEF.Client.Tests.csproj
+++ b/lang/cs/Org.Apache.REEF.Client.Tests/Org.Apache.REEF.Client.Tests.csproj
@@ -28,7 +28,7 @@ under the License.
     <FileAlignment>512</FileAlignment>
     
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
     <TestProjectType>UnitTest</TestProjectType>
-    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == 
'*Undefined*'">..\</SolutionDir>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == 
'*Undefined*'">..</SolutionDir>
     <RestorePackages>true</RestorePackages>
   </PropertyGroup>
   <Import Project="$(SolutionDir)\build.props" />

http://git-wip-us.apache.org/repos/asf/reef/blob/f91b09bd/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.csproj 
b/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.csproj
index be6e3e2..fed7dc3 100644
--- a/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.csproj
+++ b/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.csproj
@@ -26,14 +26,14 @@ under the License.
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <RestorePackages>true</RestorePackages>
-    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == 
'*Undefined*'">..</SolutionDir>
-    <TempResxFile Condition="$(TempResxFile) == 
''">$(SolutionDir)bin\$(Platform)\$(Configuration)\$(AssemblyName)\Resources.resx</TempResxFile>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == 
'*Undefined*'">..</SolutionDir>    
   </PropertyGroup>
   <PropertyGroup>
     <StartupObject />
   </PropertyGroup>
   <Import Project="$(SolutionDir)\build.props" />
   <PropertyGroup>
+    <TempResxFile Condition="$(TempResxFile) == 
''">$(SolutionDir)bin\$(PlatformTarget)\$(Configuration)\$(AssemblyName)\Resources.resx</TempResxFile>
     <UseVSHostingProcess>false</UseVSHostingProcess>
   </PropertyGroup>
   <ItemGroup>
@@ -299,6 +299,7 @@ under the License.
           NewLineChars = "\r\n",
           NewLineHandling = NewLineHandling.Replace
       };
+      (new FileInfo(resxOutputPath)).Directory.Create();
       using (var wr = XmlWriter.Create(resxOutputPath, settings))
       {
           root.WriteTo(wr);
@@ -309,6 +310,16 @@ under the License.
   <!--
       A Target that reWrites client resx to point to correct version of jars
     -->
+  <Target Name="CopyJarFiles">
+    <MSBuild Targets="Build" BuildInParallel="$(BuildInParallel)" 
Properties="Chip=$(Chip);Lang=$(Lang)" Projects="@(ProjectFile)" />
+       <ItemGroup>
+        <MySourceFiles 
Include="$(Bindir)\**\Org.Apache.REEF.Bridge.JAR\*.jar"/>
+    </ItemGroup>
+    <Copy
+      SourceFiles="@(MySourceFiles)"
+      
DestinationFiles="@(MySourceFiles->'$(TargetDir)%(Filename)%(Extension)')"
+    />
+  </Target>
   <Target Name="RewriteClientResources" DependsOnTargets="CopyJarFiles">
     <UpdateClientResources ProjectFolder="$(REEF_Source_Folder)" 
DebugOrRelease="$(Configuration)" resxOutputPath="$(TempResxFile)">
     </UpdateClientResources>
@@ -319,4 +330,4 @@ under the License.
   </Target>
   <Target Name="BeforeBuild" 
DependsOnTargets="$(BeforeBuildDependsOn);RewriteClientResources">
   </Target>
-</Project>
\ No newline at end of file
+</Project>

http://git-wip-us.apache.org/repos/asf/reef/blob/f91b09bd/lang/cs/Org.Apache.REEF.Examples.AllHandlers/Org.Apache.REEF.Examples.AllHandlers.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Examples.AllHandlers/Org.Apache.REEF.Examples.AllHandlers.csproj
 
b/lang/cs/Org.Apache.REEF.Examples.AllHandlers/Org.Apache.REEF.Examples.AllHandlers.csproj
index 9503a7a..fce87c8 100644
--- 
a/lang/cs/Org.Apache.REEF.Examples.AllHandlers/Org.Apache.REEF.Examples.AllHandlers.csproj
+++ 
b/lang/cs/Org.Apache.REEF.Examples.AllHandlers/Org.Apache.REEF.Examples.AllHandlers.csproj
@@ -113,14 +113,6 @@ under the License.
     <None Include="Readme.md" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <!--begin jar reference-->
-  <PropertyGroup>
-    <AfterBuildDependsOn>
-      $(AfterBuildDependsOn);
-      CopyJarFiles;
-    </AfterBuildDependsOn>
-  </PropertyGroup>
-  <Target Name="AfterBuild" DependsOnTargets="$(AfterBuildDependsOn);" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" 
Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
   <Import 
Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets"
 
Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')"
 />
   <Target Name="EnsureNuGetPackageBuildImports" 
BeforeTargets="PrepareForBuild">
@@ -129,5 +121,4 @@ under the License.
     </PropertyGroup>
     <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" 
Text="$([System.String]::Format('$(ErrorText)', 
'$(SolutionDir)\.nuget\NuGet.targets'))" />
   </Target>
-  <!--end jar reference-->
-</Project>
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/reef/blob/f91b09bd/lang/cs/Org.Apache.REEF.IO.TestClient/Org.Apache.REEF.IO.TestClient.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.IO.TestClient/Org.Apache.REEF.IO.TestClient.csproj 
b/lang/cs/Org.Apache.REEF.IO.TestClient/Org.Apache.REEF.IO.TestClient.csproj
index 7e60f30..6d6c478 100644
--- a/lang/cs/Org.Apache.REEF.IO.TestClient/Org.Apache.REEF.IO.TestClient.csproj
+++ b/lang/cs/Org.Apache.REEF.IO.TestClient/Org.Apache.REEF.IO.TestClient.csproj
@@ -28,6 +28,7 @@ under the License.
     <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == 
'*Undefined*'">..</SolutionDir>
   </PropertyGroup>
   <Import Project="$(SolutionDir)\build.props" />
+  <Import Project="$(SolutionDir)\build.targets" />
   <PropertyGroup>
     <BuildPackage>false</BuildPackage>
     <RestorePackages>true</RestorePackages>

http://git-wip-us.apache.org/repos/asf/reef/blob/f91b09bd/lang/cs/Org.Apache.REEF.Network.Examples.Client/Org.Apache.REEF.Network.Examples.Client.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Network.Examples.Client/Org.Apache.REEF.Network.Examples.Client.csproj
 
b/lang/cs/Org.Apache.REEF.Network.Examples.Client/Org.Apache.REEF.Network.Examples.Client.csproj
index e30f216..015332e 100644
--- 
a/lang/cs/Org.Apache.REEF.Network.Examples.Client/Org.Apache.REEF.Network.Examples.Client.csproj
+++ 
b/lang/cs/Org.Apache.REEF.Network.Examples.Client/Org.Apache.REEF.Network.Examples.Client.csproj
@@ -98,15 +98,6 @@ under the License.
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" 
Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
   <Import 
Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets"
 
Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')"
 />
-  <!--begin jar reference-->
-  <PropertyGroup>
-    <AfterBuildDependsOn>
-      $(AfterBuildDependsOn);
-      CopyJarFiles;
-    </AfterBuildDependsOn>
-  </PropertyGroup>
-  <Target Name="AfterBuild" DependsOnTargets="$(AfterBuildDependsOn);" />
-  <!--end jar reference-->
   <!-- To modify your build process, add your task inside one of the targets 
below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">

http://git-wip-us.apache.org/repos/asf/reef/blob/f91b09bd/lang/cs/Org.Apache.REEF.Tests/Org.Apache.REEF.Tests.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Org.Apache.REEF.Tests.csproj 
b/lang/cs/Org.Apache.REEF.Tests/Org.Apache.REEF.Tests.csproj
index 95d6076..c510823 100644
--- a/lang/cs/Org.Apache.REEF.Tests/Org.Apache.REEF.Tests.csproj
+++ b/lang/cs/Org.Apache.REEF.Tests/Org.Apache.REEF.Tests.csproj
@@ -173,14 +173,6 @@ under the License.
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" 
Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
   <Import 
Project="$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets"
 
Condition="Exists('$(PackagesDir)\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')"
 />
-  <!--begin jar reference-->
-  <PropertyGroup>
-    <AfterBuildDependsOn>
-      $(AfterBuildDependsOn);
-      CopyJarFiles;
-    </AfterBuildDependsOn>
-  </PropertyGroup>
-  <Target Name="AfterBuild" DependsOnTargets="$(AfterBuildDependsOn);" />
   <Target Name="EnsureNuGetPackageBuildImports" 
BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>This project references NuGet package(s) that are missing on 
this computer. Enable NuGet Package Restore to download them.  For more 
information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing 
file is {0}.</ErrorText>
@@ -188,8 +180,7 @@ under the License.
     <Error 
Condition="!Exists('$(SolutionDir)\packages\xunit.core.2.1.0\build\portable-net45+win8+wp8+wpa81\xunit.core.props')"
 Text="$([System.String]::Format('$(ErrorText)', 
'$(PackagesDir)\xunit.core.2.1.0\build\portable-net45+win8+wp8+wpa81\xunit.core.props'))"
 />
     <Error 
Condition="!Exists('$(SolutionDir)\packages\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props')"
 Text="$([System.String]::Format('$(ErrorText)', 
'$(PackagesDir)\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props'))"
 />
   </Target>
-  <!--end jar reference-->
-  <!-- To modify your build process, add your task inside one of the targets 
below and uncomment it. 
+  <!-- To modify your build process, add your task inside one of the targets 
below and uncomment it.
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
   </Target>

http://git-wip-us.apache.org/repos/asf/reef/blob/f91b09bd/lang/cs/build.props
----------------------------------------------------------------------
diff --git a/lang/cs/build.props b/lang/cs/build.props
index 4958346..8396dc0 100644
--- a/lang/cs/build.props
+++ b/lang/cs/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 InitialTargets="ExtractPOMVersion" ToolsVersion="12.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>
     <Prefer32Bit>false</Prefer32Bit>
@@ -29,6 +29,7 @@ under the License.
     <SignAssembly>true</SignAssembly>
     
<AssemblyOriginatorKeyFile>$(SolutionDir)\keyfile.snk</AssemblyOriginatorKeyFile>
     <StyleCopTreatErrorsAsWarnings>false</StyleCopTreatErrorsAsWarnings>
+    <BuildDotPropsIsImported>true</BuildDotPropsIsImported>
   </PropertyGroup>
 
   <!-- Common build configurations -->
@@ -76,75 +77,4 @@ under the License.
     <!--The root directory of the REEF source tree. -->
     
<REEF_Source_Folder>$([System.IO.Path]::GetFullPath($(SolutionDir)\..\..))</REEF_Source_Folder>
   </PropertyGroup>
-
-  <!--
-       ########################################################################
-         Extract the REEF Version from the POM file 
-       
######################################################################## 
-  -->
-  <!--A Task that extracts the version from the pom in a given folder.-->
-  <UsingTask
-    TaskName="GetMavenProjectVersion"
-    TaskFactory="CodeTaskFactory"
-    AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll" >
-    <ParameterGroup>
-      <SnapshotNumber/>
-      <ProjectFolder Required="true"/>
-      <Version Output="true"/>
-      <NugetVersion Output="true"/>
-    </ParameterGroup>
-    <Task>
-      <Reference Include="System.Xml"/>
-      <Reference Include="System.Xml.Linq"/>
-      <Using Namespace="System"/>
-      <Using Namespace="System.IO"/>
-      <Using Namespace="System.Linq"/>
-      <Using Namespace="System.Xml.Linq"/>
-      <Code Type="Fragment" Language="cs">
-        <![CDATA[
-          Version = XDocument.Load(Path.Combine(ProjectFolder, 
"pom.xml")).Descendants()
-            .Where(x => x.Name.ToString().Contains("version"))
-            .FirstOrDefault().Value;
-          var snapshotNumberAsString = ($(SnapshotNumber) >= 0 && 
$(SnapshotNumber) <=9) ? "0" + $(SnapshotNumber) : $(SnapshotNumber).ToString();
-          NugetVersion = $(IsSnapshot) ? Version + "-" + 
snapshotNumberAsString : Version.Replace("-SNAPSHOT","");
-        ]]>
-      </Code>
-    </Task>
-  </UsingTask>
-  <!--
-    A Target that extract the REEF version from the pom and makes it available 
as REEF_Version
-  -->
-  <Target Name="ExtractPOMVersion">
-    <Message Text="The root directory of the source tree is 
$(REEF_Source_Folder)" />
-    <GetMavenProjectVersion ProjectFolder="$(REEF_Source_Folder)">
-      <Output PropertyName="REEF_Version" TaskParameter="Version"/>
-      <Output PropertyName="REEF_NugetVersion" TaskParameter="NugetVersion"/>
-    </GetMavenProjectVersion>
-    <Message Text="Extracted the following version from the POM: 
$(REEF_Version)"/>
-  </Target>
-  
-  <Target Name="BuildJarProject">
-    <ItemGroup>
-      <AllConfigs 
Include="$(SolutionDir)\Org.Apache.REEF.Bridge.JAR\Org.Apache.REEF.Bridge.JAR.csproj"
 />
-    </ItemGroup>
-    <MSBuild Projects="@(AllConfigs)" Targets="Build"/>
-  </Target>
-  
-  <Target Name="CopyJarFiles" DependsOnTargets="BuildJarProject">
-    <MSBuild Targets="Build" BuildInParallel="$(BuildInParallel)" 
Properties="Chip=$(Chip);Lang=$(Lang)" Projects="@(ProjectFile)" />
-       <ItemGroup>
-        <MySourceFiles 
Include="$(Bindir)\**\Org.Apache.REEF.Bridge.JAR\*.jar"/>
-    </ItemGroup>
-    <Copy
-      SourceFiles="@(MySourceFiles)"
-      
DestinationFiles="@(MySourceFiles->'$(TargetDir)%(Filename)%(Extension)')"
-    />
-  </Target>
-    <ItemGroup>
-        <DirectoriesToRemove Include="$(IntermediateOutputPath)" />
-     </ItemGroup>
-     <Target Name="RemoveIntermediateDirectories"  AfterTargets="clean">
-        <RemoveDir Directories="@(DirectoriesToRemove)" 
Condition="!Exists('$(IntermediateOutputPath)\$(RootNamespace).log')"/>
-        <RemoveDir Directories="$(OutputPath)" />
-     </Target>
 </Project>

http://git-wip-us.apache.org/repos/asf/reef/blob/f91b09bd/lang/cs/build.targets
----------------------------------------------------------------------
diff --git a/lang/cs/build.targets b/lang/cs/build.targets
new file mode 100644
index 0000000..4cec084
--- /dev/null
+++ b/lang/cs/build.targets
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+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 InitialTargets="ExtractPOMVersion" ToolsVersion="12.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <!--
+       ########################################################################
+         Extract the REEF Version from the POM file 
+       
######################################################################## 
+  -->
+  <!--A Task that extracts the version from the pom in a given folder.-->
+  <UsingTask
+    TaskName="GetMavenProjectVersion"
+    TaskFactory="CodeTaskFactory"
+    AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll" >
+    <ParameterGroup>
+      <SnapshotNumber/>
+      <ProjectFolder Required="true"/>
+      <Version Output="true"/>
+      <NugetVersion Output="true"/>
+    </ParameterGroup>
+    <Task>
+      <Reference Include="System.Xml"/>
+      <Reference Include="System.Xml.Linq"/>
+      <Using Namespace="System"/>
+      <Using Namespace="System.IO"/>
+      <Using Namespace="System.Linq"/>
+      <Using Namespace="System.Xml.Linq"/>
+      <Code Type="Fragment" Language="cs">
+        <![CDATA[
+          Version = XDocument.Load(Path.Combine(ProjectFolder, 
"pom.xml")).Descendants()
+            .Where(x => x.Name.ToString().Contains("version"))
+            .FirstOrDefault().Value;
+          var snapshotNumberAsString = ($(SnapshotNumber) >= 0 && 
$(SnapshotNumber) <=9) ? "0" + $(SnapshotNumber) : $(SnapshotNumber).ToString();
+          NugetVersion = $(IsSnapshot) ? Version + "-" + 
snapshotNumberAsString : Version.Replace("-SNAPSHOT","");
+        ]]>
+      </Code>
+    </Task>
+  </UsingTask>
+  <!--
+    A Target that extract the REEF version from the pom and makes it available 
as REEF_Version
+  -->
+  <Target Name="ExtractPOMVersion">
+    <Message Text="MSBuildProjectName is $(MSBuildProjectName)" />
+    <Message Text="MSBuildProjectDirectory is $(MSBuildProjectDirectory)" />
+    <Message Text="SnapshotNumber is $(SnapshotNumber)" />
+    <Message Text="The root directory of the source tree is 
$(REEF_Source_Folder)" />
+    <GetMavenProjectVersion SnapshotNumber="$(SnapshotNumber)" 
ProjectFolder="$(REEF_Source_Folder)">
+      <Output PropertyName="REEF_Version" TaskParameter="Version"/>
+      <Output PropertyName="REEF_NugetVersion" TaskParameter="NugetVersion"/>
+    </GetMavenProjectVersion>
+    <Message Text="Extracted the following version from the POM: 
$(REEF_Version)"/>
+  </Target>
+  <PropertyGroup>
+    <BuildDotTargetsIsImported>true</BuildDotTargetsIsImported>
+  </PropertyGroup>
+</Project>

http://git-wip-us.apache.org/repos/asf/reef/blob/f91b09bd/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 4f2b13c..218e97d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -285,6 +285,7 @@ under the License.
                             <exclude>**/*.opensdf*</exclude>
                             <exclude>**/*.sdf*</exclude>
                             <exclude>**/*.snk</exclude>
+                            <exclude>**/*.opendb</exclude>
                             <!-- The below are auto generated during the .Net 
build -->
                             <exclude>**/bin/**</exclude>
                             <exclude>**/obj/**</exclude>

Reply via email to