Author: lcorneliussen
Date: Thu Dec 22 13:05:48 2011
New Revision: 1222212

URL: http://svn.apache.org/viewvc?rev=1222212&view=rev
Log:
[NPANDAY-480] Support Windows Azure Cloud Service Project and Packaging (CCPack)

o working azure packaging / still w. custom-lifecycle, though

Added:
    
incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_480_AzureSupportOneWebRole.java
      - copied, changed from r1197418, 
incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_459_MsBuildProjectReferencesTest.java
Modified:
    
incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld/pom.xml
    
incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/pom.xml
    
incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/pom.xml

Copied: 
incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_480_AzureSupportOneWebRole.java
 (from r1197418, 
incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_459_MsBuildProjectReferencesTest.java)
URL: 
http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_480_AzureSupportOneWebRole.java?p2=incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_480_AzureSupportOneWebRole.java&p1=incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_459_MsBuildProjectReferencesTest.java&r1=1197418&r2=1222212&rev=1222212&view=diff
==============================================================================
--- 
incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_459_MsBuildProjectReferencesTest.java
 (original)
+++ 
incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_480_AzureSupportOneWebRole.java
 Thu Dec 22 13:05:48 2011
@@ -19,37 +19,35 @@ package npanday.its;
  */
 
 import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
 
-import java.io.File;
-
-public class NPANDAY_459_MsBuildProjectReferencesTest
+public class NPANDAY_480_AzureSupportOneWebRole
     extends AbstractNPandayIntegrationTestCase
 {
-    public NPANDAY_459_MsBuildProjectReferencesTest()
+    public NPANDAY_480_AzureSupportOneWebRole()
     {
         super( "[1.4.1-incubating,)" );
     }
 
-    public void testMsBuildWithProjectReferences()
+    public void test()
         throws Exception
     {
-        File testDir = ResourceExtractor.simpleExtractResources( getClass(), 
"/NPANDAY_459_MSBuildProjectReferences" );
-        Verifier verifier = getVerifier( testDir );
-        // TODO: would be better to ensure each IT has unique IDs for required 
test artifacts in a better namespace for deleting
-        verifier.deleteArtifacts( "test" );
+        NPandayIntegrationTestContext context = createDefaultTestContext();
+        Verifier verifier = context.getPreparedVerifier();
 
         verifier.executeGoal( "install" );
-        verifier.assertFileNotPresent(
-            new File( testDir, 
"ClassLibrary1/.references/test/test-snapshot-1.0-SNAPSHOT/test-snapshot.dll" 
).getAbsolutePath() );
+        final String a = "HelloWorld_CloudService";
+        final String v = "1.0.0-SNAPSHOT";
+        verifier.assertArtifactPresent(context.getGroupId(), a, v, "cspkg" );
+
         verifier.assertFilePresent(
-            new File( testDir, 
"ConsoleApplication1/.references/test/test-snapshot-1.0-SNAPSHOT/test-snapshot.dll"
 ).getAbsolutePath() );
-        verifier.assertFilePresent( new File( testDir, 
"ConsoleApplication1/bin/Debug/ConsoleApplication1.exe" ).getAbsolutePath() );
-        verifier.assertFilePresent( new File( testDir, 
"ClassLibrary1/bin/Debug/ClassLibrary1.dll" ).getAbsolutePath() );
-        verifier.assertFilePresent( new File( testDir, 
"ConsoleApplication1/bin/Debug/ClassLibrary1.dll" ).getAbsolutePath() );
-        // TODO: need to properly support transitive dependencies in the 
projects that copy files
-        //verifier.assertFilePresent( new File( testDir, 
"ConsoleApplication1/bin/Debug/test-snapshot.dll" ).getAbsolutePath() );
+            verifier.getArtifactPath(
+                context.getGroupId(), a, v, "cscfg", "configtemplate"
+            )
+        );
+
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
     }
+
 }
+

Modified: 
incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld/pom.xml?rev=1222212&r1=1222211&r2=1222212&view=diff
==============================================================================
--- 
incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld/pom.xml
 (original)
+++ 
incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld/pom.xml
 Thu Dec 22 13:05:48 2011
@@ -7,8 +7,8 @@
   <modelVersion>4.0.0</modelVersion>
 
   <parent>
-    <groupId>NPanday.ITs.NPANDAY_480</groupId>
-    <artifactId>NPANDAY_480_AzureCloudService-parent</artifactId>
+    <groupId>NPanday.ITs.NPANDAY_480_AzureSupportOneWebRole</groupId>
+    <artifactId>NPANDAY_480_AzureSupportOneWebRole-parent</artifactId>
     <version>1-SNAPSHOT</version>
   </parent>
 
@@ -16,11 +16,11 @@
   <packaging>azure-cloud-service</packaging>
   <version>1.0.0-SNAPSHOT</version>
 
-  <name>NPanday.ITs.NPANDAY_480 :: Hello World Cloud Service</name>
+  <name>NPanday.ITs.NPANDAY_480_AzureSupportOneWebRole :: Hello World Cloud 
Service</name>
 
   <dependencies>
     <dependency>
-      <groupId>NPanday.ITs.NPANDAY_480</groupId>
+      <groupId>NPanday.ITs.NPANDAY_480_AzureSupportOneWebRole</groupId>
       <artifactId>HelloWorld_WebRole</artifactId>
       <version>1.0.0-SNAPSHOT</version>
       <type>msdeploy-package</type>
@@ -33,9 +33,39 @@
         <groupId>org.apache.npanday.plugins</groupId>
         <artifactId>custom-lifecycle-maven-plugin</artifactId>
         <extensions>true</extensions>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
       </plugin>
-
       <plugin>
+        <groupId>org.apache.npanday.plugins</groupId>
+        <artifactId>msdeploy-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>prepare-package</phase>
+            <goals>
+              <goal>unpack-dependencies</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.npanday.plugins</groupId>
+        <artifactId>azure-maven-plugin</artifactId>
+        <configuration>
+
+        </configuration>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>create-cloud-service-package</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!--plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-dependency-plugin</artifactId>
         <version>2.3</version>
@@ -48,7 +78,6 @@
             </goals>
             <configuration>
               <stripVersion>true</stripVersion>
-              <!-- configure the plugin here -->
             </configuration>
           </execution>
         </executions>
@@ -76,7 +105,7 @@
           </execution>
           <execution>
             <id>cspack</id>
-            <phase>package</phase>
+            <phase>prepare-package</phase>
             <goals>
               <goal>exec</goal>
             </goals>
@@ -93,7 +122,8 @@
             </configuration>
           </execution>
         </executions>
-      </plugin>
+      </plugin-->
+
       <!--<plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>build-helper-maven-plugin</artifactId>

Modified: 
incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/pom.xml?rev=1222212&r1=1222211&r2=1222212&view=diff
==============================================================================
--- 
incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/pom.xml
 (original)
+++ 
incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/pom.xml
 Thu Dec 22 13:05:48 2011
@@ -7,8 +7,8 @@
   <modelVersion>4.0.0</modelVersion>
 
   <parent>
-    <groupId>NPanday.ITs.NPANDAY_480</groupId>
-    <artifactId>NPANDAY_480_AzureCloudService-parent</artifactId>
+    <groupId>NPanday.ITs.NPANDAY_480_AzureSupportOneWebRole</groupId>
+    <artifactId>NPANDAY_480_AzureSupportOneWebRole-parent</artifactId>
     <version>1-SNAPSHOT</version>
   </parent>
 
@@ -16,7 +16,7 @@
   <packaging>dotnet-library</packaging>
   <version>1.0.0-SNAPSHOT</version>
 
-  <name>NPanday.ITs.NPANDAY_480 :: Hello World Web Role</name>
+  <name>NPanday.ITs.NPANDAY_480_AzureSupportOneWebRole :: Hello World Web 
Role</name>
 
   <build>
     <sourceDirectory>.</sourceDirectory>
@@ -24,84 +24,32 @@
       <plugin>
         <groupId>org.apache.npanday.plugins</groupId>
         <artifactId>maven-compile-plugin</artifactId>
+        <version>${npanday.version}</version>
         <extensions>true</extensions>
       </plugin>
       <plugin>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.2.1</version>
-        <executions>
-          <execution>
-            <id>assemble</id>
-            <phase>prepare-package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <finalName>prepare-package</finalName>
-              <appendAssemblyId>false</appendAssemblyId>
-              <attach>false</attach>
-              <descriptors>
-                <descriptor>assembly.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>exec-maven-plugin</artifactId>
-        <version>1.2.1</version>
+        <groupId>org.apache.npanday.plugins</groupId>
+        <artifactId>aspnet-maven-plugin</artifactId>
         <executions>
           <execution>
-            <id>xdt-transform</id>
+            <id>prepare-package</id>
             <phase>prepare-package</phase>
             <goals>
-              <goal>exec</goal>
-            </goals>
-            <configuration>
-              <executable>msbuild</executable>
-              <arguments>
-                <argument>copy-transformed.xml</argument>
-                
<argument>/p:WorkDirectory=${build.directory}/prepare-package</argument>
-              </arguments>
-            </configuration>
-          </execution>
-          <execution>
-            <id>msbuild</id>
-            <phase>package</phase>
-            <goals>
-              <goal>exec</goal>
+              <goal>assemble-package-files</goal>
             </goals>
-            <configuration>
-              <executable>msdeploy</executable>
-              <arguments>
-                <argument>-verb:sync</argument>
-                
<argument>-source:dirPath=${build.directory}/prepare-package/03-transformed</argument>
-                
<argument>-dest:package=${build.directory}/${artifactId}.msdeploy.zip</argument>
-              </arguments>
-            </configuration>
           </execution>
         </executions>
       </plugin>
       <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <version>1.7</version>
+        <groupId>org.apache.npanday.plugins</groupId>
+        <artifactId>msdeploy-maven-plugin</artifactId>
         <executions>
           <execution>
-            <id>add-msdeploy-package</id>
+            <id>create-msdeploy-package</id>
             <phase>package</phase>
             <goals>
-              <goal>attach-artifact</goal>
+              <goal>create-package</goal>
             </goals>
-            <configuration>
-              <artifacts>
-                <artifact>
-                  <file>${build.directory}/${artifactId}.msdeploy.zip</file>
-                  <type>msdeploy-package</type>
-                </artifact>
-              </artifacts>
-            </configuration>
           </execution>
         </executions>
       </plugin>

Modified: 
incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/pom.xml?rev=1222212&r1=1222211&r2=1222212&view=diff
==============================================================================
--- 
incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/pom.xml
 (original)
+++ 
incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/pom.xml
 Thu Dec 22 13:05:48 2011
@@ -8,42 +8,58 @@
     <artifactId>NPanday.ITs.Parent</artifactId>
     <version>1-SNAPSHOT</version>
   </parent>
-  <groupId>NPanday.ITs.NPANDAY_480</groupId>
-  <artifactId>NPANDAY_480_AzureCloudService-parent</artifactId>
+  <groupId>NPanday.ITs.NPANDAY_480_AzureSupportOneWebRole</groupId>
+  <artifactId>NPANDAY_480_AzureSupportOneWebRole-parent</artifactId>
   <packaging>pom</packaging>
-  <name>NPANDAY_480_AzureCloudService : 
NPANDAY_480_AzureCloudService-parent</name>
-  
+  <name>NPANDAY_480_AzureSupportOneWebRole : 
NPANDAY_480_AzureSupportOneWebRole-parent</name>
+
   <properties>
-    <npandayVersion>1.4.1-incubating-SNAPSHOT</npandayVersion>
+    <frameworkVersion>4.0</frameworkVersion>
   </properties>
 
+  <profiles>
+    <profile>
+      <id>standalone</id>
+      <activation>
+        <property>
+          <name>!npanday.version</name>
+        </property>
+      </activation>
+      <properties>
+        <npanday.version>1.5.0-incubating-SNAPSHOT</npanday.version>
+      </properties>
+    </profile>
+  </profiles>
+
   <build>
     <pluginManagement>
       <plugins>
         <plugin>
           <groupId>org.apache.npanday.plugins</groupId>
           <artifactId>maven-compile-plugin</artifactId>
-          <version>${npandayVersion}</version>
-          <configuration>
-            <frameworkVersion>4.0</frameworkVersion>
-          </configuration>
+          <version>${npanday.version}</version>
         </plugin>
         <plugin>
           <groupId>org.apache.npanday.plugins</groupId>
           <artifactId>custom-lifecycle-maven-plugin</artifactId>
-          <version>${npandayVersion}</version>
+          <version>${npanday.version}</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.npanday.plugins</groupId>
+          <artifactId>msdeploy-maven-plugin</artifactId>
+          <version>${npanday.version}</version>
         </plugin>
         <plugin>
           <groupId>org.apache.npanday.plugins</groupId>
-          <artifactId>maven-webapp-plugin</artifactId>
-          <version>${npandayVersion}</version>
+          <artifactId>azure-maven-plugin</artifactId>
+          <version>${npanday.version}</version>
         </plugin>
       </plugins>
     </pluginManagement>
   </build>
   
   <modules>
-       <module>HelloWorld</module>
-       <module>HelloWorld_WebRole</module>
+    <module>HelloWorld</module>
+    <module>HelloWorld_WebRole</module>
   </modules>
 </project>
\ No newline at end of file


Reply via email to