Author: suresh
Date: Fri Oct 19 22:40:58 2012
New Revision: 1400322

URL: http://svn.apache.org/viewvc?rev=1400322&view=rev
Log:
HADOOP-8946. winutils: compile codebase during Maven build on branch-trunk-win. 
Contributed by Chris Nauroth.

Modified:
    
hadoop/common/branches/branch-trunk-win/hadoop-common-project/hadoop-common/CHANGES.branch-trunk-win.txt
    
hadoop/common/branches/branch-trunk-win/hadoop-common-project/hadoop-common/pom.xml

Modified: 
hadoop/common/branches/branch-trunk-win/hadoop-common-project/hadoop-common/CHANGES.branch-trunk-win.txt
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/branch-trunk-win/hadoop-common-project/hadoop-common/CHANGES.branch-trunk-win.txt?rev=1400322&r1=1400321&r2=1400322&view=diff
==============================================================================
--- 
hadoop/common/branches/branch-trunk-win/hadoop-common-project/hadoop-common/CHANGES.branch-trunk-win.txt
 (original)
+++ 
hadoop/common/branches/branch-trunk-win/hadoop-common-project/hadoop-common/CHANGES.branch-trunk-win.txt
 Fri Oct 19 22:40:58 2012
@@ -5,5 +5,7 @@ branch-trunk-win changes - unreleased
 
   HADOOP-8945. Merge winutils from branch-1-win to branch-trunk-win.
   (Bikas Saha, Chuan Liu, Giridharan Kesavan, Ivan Mitic, and Steve Maine
-  ported by Chris Nauroth)
+  ported by Chris Nauroth via suresh)
 
+  HADOOP-8946. winutils: compile codebase during Maven build on 
+  branch-trunk-win. (Chris Nauroth via suresh)

Modified: 
hadoop/common/branches/branch-trunk-win/hadoop-common-project/hadoop-common/pom.xml
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/branch-trunk-win/hadoop-common-project/hadoop-common/pom.xml?rev=1400322&r1=1400321&r2=1400322&view=diff
==============================================================================
--- 
hadoop/common/branches/branch-trunk-win/hadoop-common-project/hadoop-common/pom.xml
 (original)
+++ 
hadoop/common/branches/branch-trunk-win/hadoop-common-project/hadoop-common/pom.xml
 Fri Oct 19 22:40:58 2012
@@ -471,6 +471,28 @@
       <build>
         <plugins>
           <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-enforcer-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>enforce-os</id>
+                <goals>
+                  <goal>enforce</goal>
+                </goals>
+                <configuration>
+                  <rules>
+                    <requireOS>
+                      <family>mac</family>
+                      <family>unix</family>
+                      <message>native build only supported on Mac or 
Unix</message>
+                    </requireOS>
+                  </rules>  
+                  <fail>true</fail>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
             <groupId>org.codehaus.mojo</groupId>
             <artifactId>native-maven-plugin</artifactId>
             <executions>
@@ -537,6 +559,58 @@
       </build>
     </profile>
 
+    <profile>
+      <id>native-win</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-enforcer-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>enforce-os</id>
+                <goals>
+                  <goal>enforce</goal>
+                </goals>
+                <configuration>
+                  <rules>
+                    <requireOS>
+                      <family>windows</family>
+                      <message>native-win build only supported on 
Windows</message>
+                    </requireOS>
+                  </rules>  
+                  <fail>true</fail>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>exec-maven-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>compile-ms-winutils</id>
+                <phase>compile</phase>
+                <goals>
+                  <goal>exec</goal>
+                </goals>
+                <configuration>
+                  <executable>msbuild</executable>
+                  <arguments>
+                    
<argument>${basedir}/src/main/winutils/winutils.sln</argument>
+                    
<argument>/p:Configuration=Release;OutDir=${project.build.directory}/bin/</argument>
+                  </arguments>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+
     <!-- profile that starts ApacheDS KDC server -->
     <profile>
       <id>startKdc</id>


Reply via email to