You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-commits@incubator.apache.org by lc...@apache.org on 2011/11/28 12:56:22 UTC

svn commit: r1207119 - in /incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole: ChainedXdtTransform.targets Properties/ assembly.xml copy-transformed.xml msdeploy-manifest.xml web.package.config

Author: lcorneliussen
Date: Mon Nov 28 12:56:21 2011
New Revision: 1207119

URL: http://svn.apache.org/viewvc?rev=1207119&view=rev
Log:
[NPANDAY-480] Undid a file move

Added:
    incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/ChainedXdtTransform.targets
    incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/assembly.xml
    incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/copy-transformed.xml
    incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/msdeploy-manifest.xml
    incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/web.package.config
Removed:
    incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/Properties/

Added: incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/ChainedXdtTransform.targets
URL: http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/ChainedXdtTransform.targets?rev=1207119&view=auto
==============================================================================
--- incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/ChainedXdtTransform.targets (added)
+++ incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/ChainedXdtTransform.targets Mon Nov 28 12:56:21 2011
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+  
+  <UsingTask TaskName="TransformXml"  AssemblyFile="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.Tasks.dll"/>
+
+  <!-- SETUP [ -->
+  
+  <PropertyGroup>
+    <RawContentsDirectory Condition="'$(RawContentsDirectory)' == ''">$(WorkDirectory)\01-source-raw</RawContentsDirectory>
+    <TransformationsDirectory Condition="'$(TransformationsDirectory)' == ''">$(WorkDirectory)\01-source-transformations</TransformationsDirectory>
+    <IntermediateTransformationDirectory Condition="'$(IntermediateTransformationDirectory)' == ''">$(WorkDirectory)\02-xdt-intermediate</IntermediateTransformationDirectory>
+    <TargetDirectory Condition="'$(TargetDirectory)' == ''">$(WorkDirectory)\03-transformed</TargetDirectory>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <TransformationFileIdentifiers Include="$(TransformationFileIdentifiers)"/>
+  </ItemGroup>
+
+  <ItemGroup>
+    <SourceFiles Include="$(RawContentsDirectory)\**\*.*"/>
+    <Transformations Include="$(TransformationsDirectory)\**\*.*"/>
+  </ItemGroup>
+
+  <!-- ] SETUP -->
+  
+  <PropertyGroup>
+    <TransformAndCopyDependsOn>
+      ValidateParameters;
+      SetupDefaults;
+      MatchTransformations;
+      PrepareTransformationInstructions;
+      TransformEach;
+      CopyAll;
+      IncrementalCleanup
+    </TransformAndCopyDependsOn>
+  </PropertyGroup>
+
+  <Target Name="TransformAndCopy" DependsOnTargets="$(TransformAndCopyDependsOn)">
+    <Message Text="Copy with transform from '$(RawContentsDirectory)' to '$(TargetDirectory)' has run successfully!" Importance="high"/>
+  </Target>
+
+  <Target Name="ValidateParameters">
+    
+    <Error Condition="!Exists($(WorkDirectory))"
+           Text="WorkDirectory: Could not find the directory $(WorkDirectory)" />
+
+    <Error Condition="!Exists($(RawContentsDirectory))"
+           Text="RawContentsDirectory: Could not find the directory $(RawContentsDirectory)" />
+
+    <Error Condition="!Exists($(TransformationsDirectory))"
+           Text="TransformationsDirectory: Could not find the directory $(TransformationsDirectory)" />
+
+  </Target>
+
+  <Target Name="SetupDefaults">
+    <ItemGroup>
+      <SourceFiles Condition="'%(SourceFiles.Identity)' != ''">
+        <TargetFile>$(TargetDirectory)\%(SourceFiles.RecursiveDir)%(Filename)%(Extension)</TargetFile>
+        <IntermediateTransformedFile>$(IntermediateTransformationDirectory)\%(SourceFiles.RecursiveDir)%(Filename)%(Extension)</IntermediateTransformedFile>
+      </SourceFiles>
+    </ItemGroup>
+  </Target>
+
+  <Target Name="MatchTransformations"
+          Inputs="%(SourceFiles.Identity)"
+          Outputs="DUMMY"
+          >
+    <PropertyGroup>
+      <SourceFile>%(SourceFiles.Identity)</SourceFile>
+      
+      <TransformationFileBefore>$(TransformationsDirectory)\%(SourceFiles.RecursiveDir)%(Filename).</TransformationFileBefore>
+      <TransformationFileAfter>%(SourceFiles.Extension)</TransformationFileAfter>
+    </PropertyGroup>
+
+    <ItemGroup>
+      <!-- clear the temp list -->
+      <_Transformations Remove="@(_Transformations)" />
+      
+      <!-- add an include per %(TransformationFileIdentifiers.Identity) -->
+      <_Transformations Include="$(TransformationFileBefore)%(TransformationFileIdentifiers.Identity)$(TransformationFileAfter)"/>
+      
+      <!-- remove those, where the file doesn't exist -->
+      <_Transformations Remove="%(_Transformations.Identity)" Condition="!Exists(%(FullPath))"/>
+
+      <!-- Add found transformations to metadata -->
+      <SourceFiles Condition="'%(SourceFiles.Identity)' == '$(SourceFile)'">
+        <TransformationFiles>@(_Transformations)</TransformationFiles>
+      </SourceFiles>
+    </ItemGroup>
+
+    <Message Text="Found %(SourceFiles.TransformationFiles) for %(SourceFiles.Identity)" 
+             Condition="%(SourceFiles.TransformationFiles) != ''"/>
+  </Target>
+
+  <Target Name="PrepareTransformationInstructions"
+          Inputs="%(SourceFiles.Identity)"
+          Outputs="DUMMY"
+          >
+    <PropertyGroup>
+      <SourceFile>%(SourceFiles.Identity)</SourceFile>
+      <IntermediateTransformedFile>%(SourceFiles.IntermediateTransformedFile)</IntermediateTransformedFile>
+    </PropertyGroup>
+
+    <ItemGroup>
+      <TransformationInstructions Include="%(SourceFiles.TransformationFiles)">
+        <TransformationTarget>$(IntermediateTransformedFile)</TransformationTarget>
+      </TransformationInstructions>
+    </ItemGroup>
+
+    <Copy SourceFiles="$(SourceFile)"
+         DestinationFiles="$(IntermediateTransformedFile)"
+         Condition="'%(SourceFiles.TransformationFiles)' != ''"/>
+  </Target>
+  
+  <!-- 
+  Will run per %(SourceFiles.Identity) as specified on parent [TransformEach]. 
+  -->
+  <Target Name="TransformEach"
+          Inputs="%(TransformationInstructions.Identity)"
+          Outputs="DUMMY">
+    <PropertyGroup>
+      <CurrentTransformationFile>%(TransformationInstructions.Identity)</CurrentTransformationFile>
+      <TransformationTarget>%(TransformationInstructions.TransformationTarget)</TransformationTarget>
+    
+      <TempFile1>$([System.IO.Path]::GetTempFileName())</TempFile1>
+      <TempFile2>$([System.IO.Path]::GetTempFileName())</TempFile2>
+    </PropertyGroup>
+
+    <Message Text="# applying $(CurrentTransformationFile)
+  to $(TransformationTarget)"/>
+
+    <!-- 
+    Using TMP-files, since XmlTransform locks the all files
+    -->
+    <Copy SourceFiles="$(TransformationTarget)"
+          DestinationFiles="$(TempFile1)"
+          />
+
+    <TransformXml Source="$(TempFile1)"
+                  Transform="$(CurrentTransformationFile)"
+                  Destination="$(TempFile2)" />
+
+    <Copy SourceFiles="$(TempFile2)"
+          DestinationFiles="$(TransformationTarget)"
+          />
+    
+  </Target>
+
+  <Target Name="CopyAll">
+    <Copy SourceFiles="@(SourceFiles -> '%(IntermediateTransformedFile)')"
+          DestinationFiles="@(SourceFiles -> '%(TargetFile)')"
+          Condition="Exists(%(IntermediateTransformedFile))"/>
+    
+    <Copy SourceFiles="@(SourceFiles)"
+          DestinationFiles="@(SourceFiles -> '%(TargetFile)')"
+          Condition="!Exists(%(IntermediateTransformedFile))"/>
+  </Target>
+
+  <Target Name="IncrementalCleanup">
+    <ItemGroup>
+      <OrphanedTargetFiles Include="$(TargetDirectory)\**\*.*" Exclude="@(SourceFiles -> '%(TargetFile)')"/>
+    </ItemGroup>
+    
+    <Delete Files="@(OrphanedTargetFiles)" />
+  </Target>
+
+</Project>

Added: incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/assembly.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/assembly.xml?rev=1207119&view=auto
==============================================================================
--- incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/assembly.xml (added)
+++ incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/assembly.xml Mon Nov 28 12:56:21 2011
@@ -0,0 +1,73 @@
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+  <id>assembled-package</id>
+  <baseDirectory>.</baseDirectory>
+  <formats>
+    <format>dir</format>
+  </formats>
+  <dependencySets>
+    <!-- factor this out to a reusable component xml -->
+    <dependencySet>
+      <useProjectArtifact>true</useProjectArtifact>
+      <useTransitiveDependencies>true</useTransitiveDependencies>
+      <scope>runtime</scope>
+      <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
+      <outputDirectory>01-source-raw\bin</outputDirectory>
+    </dependencySet>
+  </dependencySets>
+  <fileSets>
+    <fileSet>
+      <!-- factor this out to "raw-contents.xml" -->
+      <directory>.</directory>
+      <outputDirectory>01-source-raw</outputDirectory>
+      <includes>
+        <!-- .NET specifics -->
+        <include>**/*.aspx</include>
+        <include>**/*.ascx</include>
+        <include>**/*.asax</include>
+        <include>**/*.config</include>
+        
+        <!-- web developers-->
+        <include>**/*.css</include>
+        <include>**/*.js</include>
+        <include>**/*.htm</include>
+        <include>**/*.html</include>
+        
+        <!-- graphics -->
+        <include>**/*.jpg</include>
+        <include>**/*.jpeg</include>
+        <include>**/*.png</include>
+        <include>**/*.gif</include>
+        
+        <!-- silverlight? -->
+      </includes>
+      <excludes>
+        <!-- exclude transformation files -->
+        <exclude>**/*.package.*</exclude>
+        <exclude>**/*.debug.*</exclude>
+        <exclude>**/*.release.*</exclude>
+
+        <!-- .NET specific -->
+        <exclude>bin/</exclude>
+        <exclude>obj/</exclude>
+      </excludes>
+    </fileSet>
+    <fileSet>
+      <!-- factor this out to "transformations.xml" -->
+      <directory>.</directory>
+      <outputDirectory>01-source-transformations</outputDirectory>
+      <includes>
+        <!-- bring over the actual transformations -->
+        <include>**/*.package.*</include>
+        <include>**/*.debug.*</include>
+        <include>**/*.release.*</include>
+      </includes>
+      <excludes>
+        <!-- .NET specific -->
+        <exclude>bin/</exclude>
+        <exclude>obj/</exclude>
+      </excludes>
+    </fileSet>
+  </fileSets>
+</assembly>
\ No newline at end of file

Added: incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/copy-transformed.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/copy-transformed.xml?rev=1207119&view=auto
==============================================================================
--- incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/copy-transformed.xml (added)
+++ incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/copy-transformed.xml Mon Nov 28 12:56:21 2011
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0" 
+         DefaultTargets="TransformAndCopy">
+
+  <PropertyGroup>
+    <!-- set these from the outside!-->
+    <WorkDirectory Condition="'$(WorkDirectory)' == ''">target\packaging-workdir</WorkDirectory>
+    <TransformationFileIdentifiers Condition="'$(TransformationFileIdentifiers)' == ''">package</TransformationFileIdentifiers>
+  </PropertyGroup>
+
+  <Import Project="ChainedXdtTransform.targets"/>
+
+</Project>

Added: incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/msdeploy-manifest.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/msdeploy-manifest.xml?rev=1207119&view=auto
==============================================================================
--- incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/msdeploy-manifest.xml (added)
+++ incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/msdeploy-manifest.xml Mon Nov 28 12:56:21 2011
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Manifest>
+  <dirPath path="target/prepare-package/03-transformed"/>
+</Manifest>
\ No newline at end of file

Added: incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/web.package.config
URL: http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/web.package.config?rev=1207119&view=auto
==============================================================================
--- incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/web.package.config (added)
+++ incubator/npanday/npanday-its/trunk/src/test/resources/NPANDAY_480_AzureSupportOneWebRole/HelloWorld_WebRole/web.package.config Mon Nov 28 12:56:21 2011
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
+  <connectionStrings xdt:Transform="Replace">
+    <!--
+      Please reconfigure your connection strings in web.package.config!
+      
+      <add name="MyDB" 
+        connectionString="PLEASE SPECIFY" 
+        xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
+        -->
+  </connectionStrings>
+  <system.web>
+    <customErrors xdt:Transform="Replace"
+      defaultRedirect="GenericError.htm"
+      mode="RemoteOnly">
+      <error statusCode="500" redirect="InternalError.htm"/>
+    </customErrors>
+  </system.web>
+</configuration>
\ No newline at end of file