You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@reef.apache.org by we...@apache.org on 2015/04/01 00:09:50 UTC

incubator-reef git commit: [REEF-223]: Add a project reference to the JAR

Repository: incubator-reef
Updated Branches:
  refs/heads/master 8878d5884 -> c656bddde


[REEF-223]: Add a project reference to the JAR

This addressed the issue by adding a project reference to JAR project.

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

Pull Request:
  This closes #129


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

Branch: refs/heads/master
Commit: c656bdddec1b98ecd1a4c183f5b803d7c6be77f9
Parents: 8878d58
Author: Beysim Sezgin <be...@microsoft.com>
Authored: Mon Mar 30 11:32:01 2015 -0700
Committer: Markus Weimer <we...@apache.org>
Committed: Tue Mar 31 15:06:22 2015 -0700

----------------------------------------------------------------------
 .../Org.Apache.REEF.Bridge.JAR.csproj           |   1 +
 .../Bridge/ClrClientHelper.cs                   |  24 +---------
 .../Functional/ReefFunctionalTest.cs            |   2 +-
 .../Org.Apache.REEF.Tests.csproj                |  22 ++++-----
 ...e-java-0.11.0-incubating-SNAPSHOT-shaded.jar | Bin 12685493 -> 0 bytes
 lang/cs/Org.Apache.REEF.Tests/bin/run.cmd       |  45 -------------------
 lang/cs/Org.Apache.REEF.Tests/run.cmd           |  45 +++++++++++++++++++
 lang/cs/build.props                             |  18 ++++++++
 8 files changed, 78 insertions(+), 79 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c656bddd/lang/cs/Org.Apache.REEF.Bridge.JAR/Org.Apache.REEF.Bridge.JAR.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Bridge.JAR/Org.Apache.REEF.Bridge.JAR.csproj b/lang/cs/Org.Apache.REEF.Bridge.JAR/Org.Apache.REEF.Bridge.JAR.csproj
index 560ab96..b1f1159 100644
--- a/lang/cs/Org.Apache.REEF.Bridge.JAR/Org.Apache.REEF.Bridge.JAR.csproj
+++ b/lang/cs/Org.Apache.REEF.Bridge.JAR/Org.Apache.REEF.Bridge.JAR.csproj
@@ -23,6 +23,7 @@ under the License.
     <RootNamespace>Org.Apache.REEF.Bridge.JAR</RootNamespace>
     <ProjectGuid>{62905C7C-1A7E-4923-B78D-1BF42D7FAD40}</ProjectGuid>
     <AssemblyName>Org.Apache.REEF.Bridge.JAR</AssemblyName>
+	<OutputType>JAR</OutputType>
     <RestorePackages>true</RestorePackages>
   </PropertyGroup>
   <ItemGroup>

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c656bddd/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrClientHelper.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrClientHelper.cs b/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrClientHelper.cs
index 56c77ce..d032241 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrClientHelper.cs
+++ b/lang/cs/Org.Apache.REEF.Driver/Bridge/ClrClientHelper.cs
@@ -41,6 +41,7 @@ namespace Org.Apache.REEF.Driver.Bridge
                     ClrHandlerHelper.CopyDllsToAppDirectory(appDlls);
                     UpdateJarFileWithAssemblies(reefJar);
                 }
+
                 using (LOGGER.LogScope("ClrHandlerHelper::serialize driverBridgeConfig to clrRuntimeConfigFile"))
                 {
                     string clrRuntimeConfigFile = Path.Combine(clrFolder, Constants.DriverBridgeConfiguration);
@@ -71,34 +72,11 @@ namespace Org.Apache.REEF.Driver.Bridge
                                           " " + clrFolder + " " + driverSubmissionSettings.ToComamndLineArguments();
                 }
                 startInfo.RedirectStandardOutput = true;
-                startInfo.RedirectStandardError = true;
                 startInfo.UseShellExecute = false;
                 startInfo.CreateNoWindow = false;
                 LOGGER.Log(Level.Info, "Executing\r\n" + startInfo.FileName + "\r\n" + startInfo.Arguments);
-                LOGGER.Log(Level.Info, "Current Directroy " + Directory.GetCurrentDirectory());
                 using (Process process = Process.Start(startInfo))
                 {
-                    process.ErrorDataReceived += (sender, errorLine) =>
-                    {
-                        if (errorLine.Data != null)
-                        {
-                            Trace.WriteLine(errorLine.Data);
-                            Console.WriteLine(errorLine.Data);
-                        }
-                        ;
-                    };
-                    process.OutputDataReceived += (sender, outputLine) =>
-                    {
-                        if (outputLine.Data != null)
-                        {
-                            Trace.WriteLine(outputLine.Data);
-                            Console.WriteLine(outputLine.Data);
-                        }
-                        
-                    };
-                    process.BeginErrorReadLine();
-                    process.BeginOutputReadLine();
-
                     process.WaitForExit();
                 }
             }

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c656bddd/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs
index 0654800..08430b7 100644
--- a/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs
+++ b/lang/cs/Org.Apache.REEF.Tests/Functional/ReefFunctionalTest.cs
@@ -42,7 +42,7 @@ namespace Org.Apache.REEF.Tests.Functional
         protected const string _stdout = "driver.stdout";
         protected const string _stderr = "driver.stderr";
         protected const string _cmdFile = "run.cmd";
-        protected const string _binFolder = "bin";
+        protected const string _binFolder = ".";
         // TODO: we will need a proper way to hide this when we are OSS'ed
         protected const string _blobStorageConnectionString =
             @"DefaultEndpointsProtocol=https;AccountName=reeftestlog;AccountKey=cuUmPRF9DiG56bciNc37O/SfHAoh1jFfJW6AsXAtWLPnjlOzXJGWgXhkyDFOGEHIMscqDU41ElUKnjcsJjWD9w==";

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c656bddd/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 055b294..e559ce3 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
@@ -78,11 +78,11 @@ under the License.
     <Compile Include="Utility\TestDriverConfigGenerator.cs" />
     <Compile Include="Utility\TestExceptions.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <None Include="bin\run.cmd">
+  <ItemGroup>  
+    <None Include="run.cmd">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </None>
-    <None Include="ConfigFiles\evaluator.conf">
+  <None Include="ConfigFiles\evaluator.conf">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </None>
     <None Include="packages.config" />
@@ -130,11 +130,6 @@ under the License.
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <Content Include="bin\reef-bridge-java-0.11.0-incubating-SNAPSHOT-shaded.jar">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-  </ItemGroup>
-  <ItemGroup>
     <Folder Include="bin\Debug\" />
     <Folder Include="bin\Release\" />
   </ItemGroup>
@@ -143,11 +138,18 @@ under the License.
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.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">
   </Target>
-  <Target Name="AfterBuild">
-  </Target>
   -->
 </Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c656bddd/lang/cs/Org.Apache.REEF.Tests/bin/reef-bridge-java-0.11.0-incubating-SNAPSHOT-shaded.jar
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/bin/reef-bridge-java-0.11.0-incubating-SNAPSHOT-shaded.jar b/lang/cs/Org.Apache.REEF.Tests/bin/reef-bridge-java-0.11.0-incubating-SNAPSHOT-shaded.jar
deleted file mode 100644
index 533b250..0000000
Binary files a/lang/cs/Org.Apache.REEF.Tests/bin/reef-bridge-java-0.11.0-incubating-SNAPSHOT-shaded.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c656bddd/lang/cs/Org.Apache.REEF.Tests/bin/run.cmd
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/bin/run.cmd b/lang/cs/Org.Apache.REEF.Tests/bin/run.cmd
deleted file mode 100644
index ddff8a7..0000000
--- a/lang/cs/Org.Apache.REEF.Tests/bin/run.cmd
+++ /dev/null
@@ -1,45 +0,0 @@
-@REM
-@REM Copyright (C) 2013 Microsoft Corporation
-@REM
-@REM Licensed under the Apache License, Version 2.0 (the "License");
-@REM you may not use this file except in compliance with the License.
-@REM You may obtain a copy of the License at
-@REM
-@REM         http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing, software
-@REM distributed under the License is distributed on an "AS IS" BASIS,
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@REM See the License for the specific language governing permissions and
-@REM limitations under the License.
-@REM
-
-@echo off
-::
-:: Copyright (C) 2013 Microsoft Corporation
-::
-:: Licensed 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.
-::
-
-
-:: RUNTIME
-set SHADED_JAR=bin\reef-bridge-0.11.0-incubating-SNAPSHOT-shaded.jar
-
-set LOGGING_CONFIG=-Djava.util.logging.config.class=org.apache.reef.util.logging.Config
-
-set CLASSPATH=%HADOOP_HOME%\share\hadoop\hdfs\lib\*;%HADOOP_HOME%\share\hadoop\hdfs\*;%HADOOP_HOME%\share\hadoop\common\*;%HADOOP_HOME%\share\hadoop\common\lib\*;%HADOOP_HOME%\share\hadoop\mapreduce\lib\*;%HADOOP_HOME%\share\hadoop\mapreduce\*;%HADOOP_HOME%\share\hadoop\yarn\*;%HADOOP_HOME%\share\hadoop\yarn\lib\*
-
-set CMD=%JAVA_HOME%\bin\java.exe -cp %HADOOP_HOME%\etc\hadoop;%SHADED_JAR%;%CLASSPATH% %*
-::%LOGGING_CONFIG%
-echo %CMD%
-%CMD%

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c656bddd/lang/cs/Org.Apache.REEF.Tests/run.cmd
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tests/run.cmd b/lang/cs/Org.Apache.REEF.Tests/run.cmd
new file mode 100644
index 0000000..ddff8a7
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tests/run.cmd
@@ -0,0 +1,45 @@
+@REM
+@REM Copyright (C) 2013 Microsoft Corporation
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM You may obtain a copy of the License at
+@REM
+@REM         http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+@REM
+
+@echo off
+::
+:: Copyright (C) 2013 Microsoft Corporation
+::
+:: Licensed 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.
+::
+
+
+:: RUNTIME
+set SHADED_JAR=bin\reef-bridge-0.11.0-incubating-SNAPSHOT-shaded.jar
+
+set LOGGING_CONFIG=-Djava.util.logging.config.class=org.apache.reef.util.logging.Config
+
+set CLASSPATH=%HADOOP_HOME%\share\hadoop\hdfs\lib\*;%HADOOP_HOME%\share\hadoop\hdfs\*;%HADOOP_HOME%\share\hadoop\common\*;%HADOOP_HOME%\share\hadoop\common\lib\*;%HADOOP_HOME%\share\hadoop\mapreduce\lib\*;%HADOOP_HOME%\share\hadoop\mapreduce\*;%HADOOP_HOME%\share\hadoop\yarn\*;%HADOOP_HOME%\share\hadoop\yarn\lib\*
+
+set CMD=%JAVA_HOME%\bin\java.exe -cp %HADOOP_HOME%\etc\hadoop;%SHADED_JAR%;%CLASSPATH% %*
+::%LOGGING_CONFIG%
+echo %CMD%
+%CMD%

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c656bddd/lang/cs/build.props
----------------------------------------------------------------------
diff --git a/lang/cs/build.props b/lang/cs/build.props
index 99b870d..0c59e6c 100644
--- a/lang/cs/build.props
+++ b/lang/cs/build.props
@@ -115,4 +115,22 @@ under the License.
     </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)\**\*.jar"/>
+    </ItemGroup>
+    <Copy
+      SourceFiles="@(MySourceFiles)"
+      DestinationFiles="@(MySourceFiles->'$(TargetDir)%(Filename)%(Extension)')"
+    />
+  </Target>
 </Project>
\ No newline at end of file