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/12/01 15:59:11 UTC
svn commit: r1209128 - in /incubator/npanday/branches/1.5.0-azuresupport:
components/dotnet-core/src/main/java/npanday/ plugins/
plugins/aspnet-maven-plugin/ plugins/aspnet-maven-plugin/src/
plugins/aspnet-maven-plugin/src/it/ plugins/aspnet-maven-plug...
Author: lcorneliussen
Date: Thu Dec 1 15:59:06 2011
New Revision: 1209128
URL: http://svn.apache.org/viewvc?rev=1209128&view=rev
Log:
[NPANDAY-488] MSDeploy Packaging for Web Applications (also Azure Web Roles)
o Support for Assembly descriptor composition + integration test
o Mixin Support: extend predefined assembly descriptors with local components
Added:
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/pom.xml
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/deep/
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/deep/deeper/
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/deep/deeper/do-not-copy.sql
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/deep/deeper/please-copy.aspx
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/do-not-copy.sql
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/goals.txt
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/please-copy.aspx
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/pom.xml
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/verify.groovy
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/custom-assembly.xml
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/do-not-copy.aspx
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/goals.txt
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/please-copy.aspx
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/pom.xml
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/verify.groovy
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/copy-also.txt
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/copy-anyway.aspx
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/custom-assembly-component.xml
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/goals.txt
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/pom.xml
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/verify.groovy
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/java/
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/java/npanday/
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/java/npanday/plugin/
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/java/npanday/plugin/aspnet/
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/java/npanday/plugin/aspnet/AssemblePackageFilesMojo.java
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/java/npanday/plugin/aspnet/MixinAsssemblyReader.java
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/java/npanday/plugin/aspnet/PackagePreparationConfigurationSource.java
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/META-INF/
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/META-INF/plexus/
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/META-INF/plexus/components.xml
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/assemblies/
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/assemblies/aspnet-webapp-defaults.xml
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/assemblies/components/
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/assemblies/components/aspnet-webapp-binaries.xml
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/assemblies/components/aspnet-webapp-contents.xml
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/site/
incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/site/site.xml
Modified:
incubator/npanday/branches/1.5.0-azuresupport/components/dotnet-core/src/main/java/npanday/PathUtil.java
incubator/npanday/branches/1.5.0-azuresupport/plugins/pom.xml
Modified: incubator/npanday/branches/1.5.0-azuresupport/components/dotnet-core/src/main/java/npanday/PathUtil.java
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/components/dotnet-core/src/main/java/npanday/PathUtil.java?rev=1209128&r1=1209127&r2=1209128&view=diff
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/components/dotnet-core/src/main/java/npanday/PathUtil.java (original)
+++ incubator/npanday/branches/1.5.0-azuresupport/components/dotnet-core/src/main/java/npanday/PathUtil.java Thu Dec 1 15:59:06 2011
@@ -20,26 +20,12 @@ package npanday;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
-import npanday.ArtifactTypeHelper;
-import npanday.ArtifactType;
-import org.codehaus.plexus.util.DirectoryScanner;
+import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.util.FileUtils;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
import java.io.IOException;
-import java.nio.MappedByteBuffer;
-import java.nio.channels.FileChannel;
import java.util.logging.Logger;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
/**
* This class provides methods for obtaining the location of artifacts.
@@ -348,4 +334,10 @@ public final class PathUtil
{
return new File(System.getProperty( "user.home" ), ".m2").getAbsolutePath();
}
+
+ public static File getPreparedPackageFolder( MavenProject project )
+ {
+ String folderName = project.getArtifactId();
+ return new File(new File(project.getBuild().getDirectory(), "packages"), folderName);
+ }
}
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/pom.xml?rev=1209128&view=auto
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/pom.xml (added)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/pom.xml Thu Dec 1 15:59:06 2011
@@ -0,0 +1,89 @@
+<?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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.apache.npanday.plugins</groupId>
+ <version>1.5.0-azuresupport-SNAPSHOT</version>
+ <artifactId>maven-dotnet-plugins</artifactId>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>aspnet-maven-plugin</artifactId>
+ <packaging>maven-plugin</packaging>
+ <name>NPanday :: ASP.NET Maven Plugin</name>
+ <description>Maven Plugin for .NET: Support for ASP.NET web projects and applications</description>
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-archiver</artifactId>
+ <version>1.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>${plexus.utils.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>run-its</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <version>1.5</version>
+ <configuration>
+ <projectsDirectory>src/it</projectsDirectory>
+ <cloneProjectsTo>target/it</cloneProjectsTo>
+ <pomIncludes>
+ <pomInclude>*/pom.xml</pomInclude>
+ </pomIncludes>
+ <!-- Can't use localRepositoryPath or -Dmaven.repo.local with NPanday
+ See https://issues.apache.org/jira/browse/NPANDAY-284
+ <localRepositoryPath>target/local-repo</localRepositoryPath> -->
+ <postBuildHookScript>verify</postBuildHookScript>
+ </configuration>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <goals>
+ <goal>install</goal>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/deep/deeper/do-not-copy.sql
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/deep/deeper/do-not-copy.sql?rev=1209128&view=auto
==============================================================================
(empty)
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/deep/deeper/please-copy.aspx
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/deep/deeper/please-copy.aspx?rev=1209128&view=auto
==============================================================================
(empty)
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/do-not-copy.sql
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/do-not-copy.sql?rev=1209128&view=auto
==============================================================================
(empty)
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/goals.txt
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/goals.txt?rev=1209128&view=auto
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/goals.txt (added)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/goals.txt Thu Dec 1 15:59:06 2011
@@ -0,0 +1 @@
+prepare-package
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/please-copy.aspx
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/please-copy.aspx?rev=1209128&view=auto
==============================================================================
(empty)
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/pom.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/pom.xml?rev=1209128&view=auto
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/pom.xml (added)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/pom.xml Thu Dec 1 15:59:06 2011
@@ -0,0 +1,48 @@
+<?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 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>@project.groupId@.@project.artifactId@-its</groupId>
+ <artifactId>IT001_AssembleWithZeroConfig</artifactId>
+ <version>@project.version@</version>
+ <packaging>pom</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>@project.groupId@</groupId>
+ <artifactId>@project.artifactId@</artifactId>
+ <version>@project.version@</version>
+ <extensions>true</extensions>
+ <executions>
+ <execution>
+ <id>assemble</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>assemble-package-files</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/verify.groovy
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/verify.groovy?rev=1209128&view=auto
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/verify.groovy (added)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT001_AssembleWithZeroConfig/verify.groovy Thu Dec 1 15:59:06 2011
@@ -0,0 +1,27 @@
+/*
+* 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.
+*/
+def packageDir = new File(basedir, "target\\packages\\IT001_AssembleWithZeroConfig")
+assert packageDir.exists()
+assert new File(packageDir, "please-copy.aspx").exists();
+assert !new File(packageDir, "do-not-copy.sql").exists();
+
+assert new File(packageDir, "deep\\deeper\\please-copy.aspx").exists();
+assert !new File(packageDir, "deep\\deeper\\do-not-copy.sql").exists();
+
+return true;
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/custom-assembly.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/custom-assembly.xml?rev=1209128&view=auto
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/custom-assembly.xml (added)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/custom-assembly.xml Thu Dec 1 15:59:06 2011
@@ -0,0 +1,19 @@
+<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>custom-assembly</id>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <formats>
+ <format>dir</format>
+ </formats>
+ <fileSets>
+ <fileSet>
+ <useDefaultExcludes>true</useDefaultExcludes>
+ <directory>${project.basedir}</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>please-copy.aspx</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/do-not-copy.aspx
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/do-not-copy.aspx?rev=1209128&view=auto
==============================================================================
(empty)
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/goals.txt
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/goals.txt?rev=1209128&view=auto
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/goals.txt (added)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/goals.txt Thu Dec 1 15:59:06 2011
@@ -0,0 +1 @@
+prepare-package
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/please-copy.aspx
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/please-copy.aspx?rev=1209128&view=auto
==============================================================================
(empty)
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/pom.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/pom.xml?rev=1209128&view=auto
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/pom.xml (added)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/pom.xml Thu Dec 1 15:59:06 2011
@@ -0,0 +1,51 @@
+<?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 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>@project.groupId@.@project.artifactId@-its</groupId>
+ <artifactId>IT002_UserDefinedAssemblyDescriptor</artifactId>
+ <version>@project.version@</version>
+ <packaging>pom</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>@project.groupId@</groupId>
+ <artifactId>@project.artifactId@</artifactId>
+ <version>@project.version@</version>
+ <extensions>true</extensions>
+ <executions>
+ <execution>
+ <id>default-package</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>assemble-package-files</goal>
+ </goals>
+ <configuration>
+ <assemblyDescriptor>custom-assembly.xml</assemblyDescriptor>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/verify.groovy
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/verify.groovy?rev=1209128&view=auto
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/verify.groovy (added)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT002_UserDefinedAssemblyDescriptor/verify.groovy Thu Dec 1 15:59:06 2011
@@ -0,0 +1,24 @@
+/*
+* 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.
+*/
+def packageDir = new File(basedir, "target\\packages\\IT002_UserDefinedAssemblyDescriptor")
+assert packageDir.exists()
+assert new File(packageDir, "please-copy.aspx").exists();
+assert !new File(packageDir, "do-not-copy.aspx").exists();
+
+return true;
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/copy-also.txt
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/copy-also.txt?rev=1209128&view=auto
==============================================================================
(empty)
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/copy-anyway.aspx
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/copy-anyway.aspx?rev=1209128&view=auto
==============================================================================
(empty)
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/custom-assembly-component.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/custom-assembly-component.xml?rev=1209128&view=auto
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/custom-assembly-component.xml (added)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/custom-assembly-component.xml Thu Dec 1 15:59:06 2011
@@ -0,0 +1,13 @@
+<component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2 http://maven.apache.org/xsd/component-1.1.2.xsd">
+ <fileSets>
+ <fileSet>
+ <useDefaultExcludes>true</useDefaultExcludes>
+ <directory>${project.basedir}</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>copy-also.txt</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</component>
\ No newline at end of file
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/goals.txt
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/goals.txt?rev=1209128&view=auto
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/goals.txt (added)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/goals.txt Thu Dec 1 15:59:06 2011
@@ -0,0 +1 @@
+prepare-package
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/pom.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/pom.xml?rev=1209128&view=auto
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/pom.xml (added)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/pom.xml Thu Dec 1 15:59:06 2011
@@ -0,0 +1,53 @@
+<?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 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>@project.groupId@.@project.artifactId@-its</groupId>
+ <artifactId>IT002_UserDefinedAssemblyDescriptor</artifactId>
+ <version>@project.version@</version>
+ <packaging>pom</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>@project.groupId@</groupId>
+ <artifactId>@project.artifactId@</artifactId>
+ <version>@project.version@</version>
+ <extensions>true</extensions>
+ <executions>
+ <execution>
+ <id>default-package</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>assemble-package-files</goal>
+ </goals>
+ <configuration>
+ <mixinAssemblyComponentDescriptors>
+ <mixinAssemblyComponentDescriptor>custom-assembly-component.xml</mixinAssemblyComponentDescriptor>
+ </mixinAssemblyComponentDescriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/verify.groovy
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/verify.groovy?rev=1209128&view=auto
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/verify.groovy (added)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/it/IT003_AdditionalComponents/verify.groovy Thu Dec 1 15:59:06 2011
@@ -0,0 +1,24 @@
+/*
+* 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.
+*/
+def packageDir = new File(basedir, "target\\packages\\IT002_UserDefinedAssemblyDescriptor")
+assert packageDir.exists()
+assert new File(packageDir, "copy-anyway.aspx").exists();
+assert new File(packageDir, "copy-also.txt").exists();
+
+return true;
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/java/npanday/plugin/aspnet/AssemblePackageFilesMojo.java
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/java/npanday/plugin/aspnet/AssemblePackageFilesMojo.java?rev=1209128&view=auto
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/java/npanday/plugin/aspnet/AssemblePackageFilesMojo.java (added)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/java/npanday/plugin/aspnet/AssemblePackageFilesMojo.java Thu Dec 1 15:59:06 2011
@@ -0,0 +1,221 @@
+package npanday.plugin.aspnet;
+
+/*
+ * 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.
+ */
+
+import com.google.common.base.Objects;
+import com.google.common.base.Splitter;
+import com.google.common.collect.Iterables;
+import org.apache.maven.execution.MavenSession;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugin.assembly.AssemblerConfigurationSource;
+import org.apache.maven.plugin.assembly.InvalidAssemblerConfigurationException;
+import org.apache.maven.plugin.assembly.archive.ArchiveCreationException;
+import org.apache.maven.plugin.assembly.archive.AssemblyArchiver;
+import org.apache.maven.plugin.assembly.format.AssemblyFormattingException;
+import org.apache.maven.plugin.assembly.io.AssemblyReadException;
+import org.apache.maven.plugin.assembly.io.AssemblyReader;
+import org.apache.maven.plugin.assembly.model.Assembly;
+import org.apache.maven.shared.filtering.MavenFileFilter;
+
+import java.util.List;
+
+import static com.google.common.base.Strings.*;
+import static com.google.common.collect.Iterables.toArray;
+
+/**
+ * Maven Mojo preparing the packaging of ASP.NET web applications.
+ *
+ * @author <a href="mailto:lcorneliussen@apache.org">Lars Corneliussen</a>
+ * @goal assemble-package-files
+ * @description Maven Mojo for preparing the packaging of ASP.NET web applications
+ * @since 1.5.0-incubating
+ */
+public class AssemblePackageFilesMojo
+ extends AbstractMojo
+{
+ Splitter COMMANDLINE_LISTS_SPLITTER = Splitter.on( "," ).omitEmptyStrings().trimResults();
+
+ /**
+ * @parameter expression="${assemblyDescriptor}"
+ * @description Assembly XML Descriptor file. This must be the path to your customized descriptor file.
+ * <br><b>assemblyDescriptor will take precedence over {@see assemblyDescriptorRef}</b>
+ */
+ private String assemblyDescriptor;
+
+ /**
+ * @parameter expression="${mixinAssemblyComponentDescriptorList}"
+ * @description Commandline version of {@see mixinAssemblyComponentDescriptors}. Spearate each item with a comma.
+ */
+ private String mixinAssemblyComponentDescriptorList;
+
+ /**
+ * @parameter
+ * @description Component descriptors to be mixed into the main assembly descriptor from
+ * {@see assemblyDescriptorRef} or {@see assemblyDescriptor}.
+ * <br/>This is particularly useful, when the assembly descriptor is provided via the classpath.
+ */
+ private String[] mixinAssemblyComponentDescriptors;
+
+ /**
+ * @parameter expression="${assemblyDescriptorRef}" default-value="aspnet-webapp-defaults"
+ * @description A references to an assembly descriptor available on the plugin's classpath. The default
+ * classpath includes these built-in descriptors. You can add others by adding dependencies to the plugin.
+ * <br><b>assemblyDescriptorRef will be ignored, if {@see assemblyDescriptor} is configured</b>
+ */
+ private String assemblyDescriptorRef;
+
+ /**
+ * The Maven Session Object providing both the
+ * current project and the local repository.
+ *
+ * @parameter default-value="${session}"
+ * @required
+ * @readonly
+ */
+ private MavenSession mavenSession;
+
+ /**
+ * @component
+ */
+ private MixinAsssemblyReader assemblyReader;
+
+ /**
+ * @component
+ */
+ private AssemblyArchiver assemblyArchiver;
+
+ /**
+ * @component
+ */
+ private MavenFileFilter fileFilter;
+
+
+ public void execute()
+ throws MojoExecutionException, MojoFailureException
+ {
+ long startTime = System.currentTimeMillis();
+
+ setupParameters();
+
+ final PackagePreparationConfigurationSource packageConfig =
+ new PackagePreparationConfigurationSource( mavenSession, fileFilter );
+
+ if ( !isNullOrEmpty( assemblyDescriptor ) )
+ {
+ packageConfig.setDescriptorFile( assemblyDescriptor );
+ }
+ else if ( !isNullOrEmpty( assemblyDescriptorRef ) )
+ {
+ packageConfig.setDescriptorRef( assemblyDescriptorRef );
+ }
+ else
+ {
+ throw new MojoFailureException( "NPANDAY-109-008: Please configure either assemblyDescriptorRef or assemblyDescriptor" );
+ }
+
+ assemblyReader.setComponentDescriptors( Objects.firstNonNull( mixinAssemblyComponentDescriptors, new String[0] ));
+
+ createPackage( packageConfig );
+
+ long endTime = System.currentTimeMillis();
+ getLog().debug( "Mojo Execution Time = " + ( endTime - startTime ) );
+ }
+
+ /**
+ * Copies from commandline parameters to "real" parameters.
+ */
+ private void setupParameters()
+ {
+ if ( !isNullOrEmpty( mixinAssemblyComponentDescriptorList ) )
+ {
+ mixinAssemblyComponentDescriptors =
+ toArray( COMMANDLINE_LISTS_SPLITTER.split( mixinAssemblyComponentDescriptorList ), String.class );
+ }
+ }
+
+ public void createPackage( AssemblerConfigurationSource configurationSource )
+ throws MojoExecutionException, MojoFailureException
+ {
+ List<Assembly> assemblies;
+ try
+ {
+ assemblies = assemblyReader.readAssemblies( configurationSource );
+ }
+ catch ( final AssemblyReadException e )
+ {
+ throw new MojoExecutionException( "NPANDAY-109-001: Error reading assembly descriptors: " + e.getMessage(),
+ e );
+ }
+ catch ( final InvalidAssemblerConfigurationException e )
+ {
+ throw new MojoFailureException( assemblyReader, e.getMessage(),
+ "NPANDAY-109-002: Mojo configuration is invalid: " + e.getMessage() );
+ }
+
+ if ( assemblies.size() == 0 )
+ {
+ throw new MojoExecutionException(
+ "NPANDAY-109-003: Somehow the assembly reader couldn't find the configured assembly descriptor" );
+ }
+
+ if ( assemblies.size() > 1 )
+ {
+ throw new MojoExecutionException(
+ "NPANDAY-109-004: Somehow the assembly reader provided multiple assembly descriptors, which is not supported by this mojo." );
+ }
+
+ Assembly singleAssembly = assemblies.get( 0 );
+ createDirectory( singleAssembly, configurationSource );
+ }
+
+ private void createDirectory( final Assembly assembly, AssemblerConfigurationSource configurationSource )
+ throws MojoExecutionException, MojoFailureException
+ {
+ final AssemblyArchiver archiver = assemblyArchiver;
+
+ String fullName = configurationSource.getFinalName();
+
+ try
+ {
+ archiver.createArchive( assembly, fullName, "dir", configurationSource );
+ getLog().info(
+ "NPANDAY-109-009: Prepared package " + fullName + " using assembly " + assembly.getId() + " in '"
+ + configurationSource.getOutputDirectory() + "'." );
+ }
+ catch ( final ArchiveCreationException e )
+ {
+ throw new MojoExecutionException( "NPANDAY-109-005: Error creating aspnet package: " + e.getMessage(), e );
+ }
+ catch ( final AssemblyFormattingException e )
+ {
+ throw new MojoExecutionException( "NPANDAY-109-006: Error creating aspnet package: " + e.getMessage(), e );
+ }
+ catch ( final InvalidAssemblerConfigurationException e )
+ {
+ throw new MojoFailureException( assembly,
+ "NPANDAY-109-007: Assembly for aspnet package is incorrectly configured: "
+ + assembly.getId(),
+ "Assembly: " + assembly.getId() + " is not configured correctly: "
+ + e.getMessage() );
+ }
+ }
+}
\ No newline at end of file
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/java/npanday/plugin/aspnet/MixinAsssemblyReader.java
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/java/npanday/plugin/aspnet/MixinAsssemblyReader.java?rev=1209128&view=auto
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/java/npanday/plugin/aspnet/MixinAsssemblyReader.java (added)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/java/npanday/plugin/aspnet/MixinAsssemblyReader.java Thu Dec 1 15:59:06 2011
@@ -0,0 +1,56 @@
+package npanday.plugin.aspnet;
+
+import org.apache.maven.plugin.assembly.AssemblerConfigurationSource;
+import org.apache.maven.plugin.assembly.InvalidAssemblerConfigurationException;
+import org.apache.maven.plugin.assembly.interpolation.AssemblyInterpolator;
+import org.apache.maven.plugin.assembly.io.AssemblyReadException;
+import org.apache.maven.plugin.assembly.io.DefaultAssemblyReader;
+import org.apache.maven.plugin.assembly.model.Assembly;
+
+import java.io.File;
+import java.io.Reader;
+
+/**
+ * @author <a href="mailto:lcorneliussen@apache.org">Lars Corneliussen</a>
+ */
+public class MixinAsssemblyReader extends DefaultAssemblyReader
+{
+ private String[] componentDescriptors;
+
+ /**
+ * Add the contents of all included components to main assembly
+ *
+ * @throws org.apache.maven.plugin.assembly.io.AssemblyReadException
+ *
+ * @throws org.apache.maven.plugin.MojoFailureException
+ *
+ * @throws org.apache.maven.plugin.MojoExecutionException
+ *
+ */
+ @Override
+ protected void mergeComponentsWithMainAssembly( Assembly assembly, File assemblyDir,
+ AssemblerConfigurationSource configSource )
+ throws AssemblyReadException
+ {
+ appendComponentDescriptors( assembly );
+
+ super.mergeComponentsWithMainAssembly( assembly, assemblyDir,
+ configSource ); //To change body of overridden methods use File | Settings | File Templates.
+ }
+
+ /**
+ * Add component descriptors from other sources.
+ */
+ protected void appendComponentDescriptors( Assembly assembly )
+ {
+ for (String componentDescriptor : componentDescriptors){
+ getLogger().debug( "NPANDAY-110-001: Mixing in component descriptor '" + componentDescriptor + "' to assembly with id '" + assembly.getId() + "'.");
+ assembly.addComponentDescriptor( componentDescriptor );
+ }
+ }
+
+ public void setComponentDescriptors( String[] componentDescriptors )
+ {
+ this.componentDescriptors = componentDescriptors;
+ }
+}
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/java/npanday/plugin/aspnet/PackagePreparationConfigurationSource.java
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/java/npanday/plugin/aspnet/PackagePreparationConfigurationSource.java?rev=1209128&view=auto
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/java/npanday/plugin/aspnet/PackagePreparationConfigurationSource.java (added)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/java/npanday/plugin/aspnet/PackagePreparationConfigurationSource.java Thu Dec 1 15:59:06 2011
@@ -0,0 +1,225 @@
+package npanday.plugin.aspnet;
+
+import npanday.PathUtil;
+import org.apache.maven.archiver.MavenArchiveConfiguration;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.execution.MavenSession;
+import org.apache.maven.plugin.assembly.AssemblerConfigurationSource;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.shared.filtering.MavenFileFilter;
+
+import java.io.File;
+import java.util.Collections;
+import java.util.List;
+
+
+/**
+ * Used as a quite static configuration source for preparation of NPanday
+ * packages.
+ *
+ * @author <a href="mailto:lcorneliussen@apache.org">Lars Corneliussen</a>
+ */
+public class PackagePreparationConfigurationSource
+ implements AssemblerConfigurationSource
+{
+ private File outputDirectory;
+
+ private String finalName;
+
+ private String assemblyDescriptorRef;
+
+ private String assemblyDescriptorFile;
+
+ private MavenSession session;
+
+ private MavenFileFilter fileFilter;
+
+ private MavenProject project;
+
+ public PackagePreparationConfigurationSource( MavenSession session, MavenFileFilter fileFilter )
+ {
+ this.session = session;
+ this.project = session.getCurrentProject();
+ this.fileFilter = fileFilter;
+
+ File prepackageDir = PathUtil.getPreparedPackageFolder( project );
+ outputDirectory = prepackageDir.getParentFile();
+ finalName = prepackageDir.getName();
+ }
+
+ public String getDescriptor()
+ {
+ return null;
+ }
+
+ public String getDescriptorId()
+ {
+ return null;
+ }
+
+ public String[] getDescriptors()
+ {
+ if (assemblyDescriptorFile != null){
+ return new String[] {assemblyDescriptorFile};
+ }
+
+ return new String[0];
+ }
+
+ public String[] getDescriptorReferences()
+ {
+ if ( assemblyDescriptorRef != null){
+ return new String[] { assemblyDescriptorRef };
+ }
+
+ return new String[0];
+ }
+
+ public File getDescriptorSourceDirectory()
+ {
+ return null;
+ }
+
+ public File getBasedir()
+ {
+ return project.getBasedir();
+ }
+
+ public MavenProject getProject()
+ {
+ return project;
+ }
+
+ public boolean isSiteIncluded()
+ {
+ return false;
+ }
+
+ public File getSiteDirectory()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getFinalName()
+ {
+ return finalName;
+ }
+
+ public boolean isAssemblyIdAppended()
+ {
+ return false;
+ }
+
+ public String getClassifier()
+ {
+ throw new UnsupportedOperationException("The classifier will be part of the final name already.");
+ }
+
+ public String getTarLongFileMode()
+ {
+ throw new UnsupportedOperationException("Tar is not supported for packaging preparations!");
+ }
+
+ public File getOutputDirectory()
+ {
+ return this.outputDirectory;
+ }
+
+ public File getWorkingDirectory()
+ {
+ return new File(project.getBuild().getDirectory(), "packages\\temp\\workdir");
+ }
+
+ public MavenArchiveConfiguration getJarArchiveConfiguration()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public ArtifactRepository getLocalRepository()
+ {
+ return session.getLocalRepository();
+ }
+
+ public File getTemporaryRootDirectory()
+ {
+ return new File(project.getBuild().getDirectory(), "packages\\temp\\tmpdir");
+ }
+
+ public File getArchiveBaseDirectory()
+ {
+ return project.getBasedir();
+ }
+
+ public List<String> getFilters()
+ {
+ return null;
+ }
+
+ public List<MavenProject> getReactorProjects()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public List<ArtifactRepository> getRemoteRepositories()
+ {
+ return Collections.<ArtifactRepository>emptyList();
+ }
+
+ public boolean isDryRun()
+ {
+ return false;
+ }
+
+ public boolean isIgnoreDirFormatExtensions()
+ {
+ return true;
+ }
+
+ public boolean isIgnoreMissingDescriptor()
+ {
+ return false;
+ }
+
+ public MavenSession getMavenSession()
+ {
+ return session;
+ }
+
+ public String getArchiverConfig()
+ {
+ // we won't do any archiving
+ return null;
+ }
+
+ public MavenFileFilter getMavenFileFilter()
+ {
+ return fileFilter;
+ }
+
+ public boolean isUpdateOnly()
+ {
+ return false;
+ }
+
+ public boolean isUseJvmChmod()
+ {
+ return false;
+ }
+
+ public boolean isIgnorePermissions()
+ {
+ return false;
+ }
+
+ public void setDescriptorFile( String assemblyDescriptorFile )
+ {
+ this.assemblyDescriptorFile = assemblyDescriptorFile;
+ }
+
+ public void setDescriptorRef( String assemblyDescriptorRef )
+ {
+ this.assemblyDescriptorRef = assemblyDescriptorRef;
+ }
+}
+
+
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/META-INF/plexus/components.xml?rev=1209128&view=auto
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/META-INF/plexus/components.xml (added)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/META-INF/plexus/components.xml Thu Dec 1 15:59:06 2011
@@ -0,0 +1,26 @@
+<!--
+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.
+-->
+<component-set>
+ <components>
+ <component>
+ <role>npanday.plugin.aspnet.MixinAsssemblyReader</role>
+ <implementation>npanday.plugin.aspnet.MixinAsssemblyReader</implementation>
+ </component>
+ </components>
+</component-set>
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/assemblies/aspnet-webapp-defaults.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/assemblies/aspnet-webapp-defaults.xml?rev=1209128&view=auto
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/assemblies/aspnet-webapp-defaults.xml (added)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/assemblies/aspnet-webapp-defaults.xml Thu Dec 1 15:59:06 2011
@@ -0,0 +1,18 @@
+<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>aspnet-webapp-defaults</id>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <formats>
+ <format>dir</format>
+ </formats>
+
+ <componentDescriptors>
+ <!--
+ Just specifying bare file names would need a fix for:
+ http://jira.codehaus.org/browse/MASSEMBLY-585
+ -->
+ <componentDescriptor>/assemblies/components/aspnet-webapp-binaries.xml</componentDescriptor>
+ <componentDescriptor>/assemblies/components/aspnet-webapp-contents.xml</componentDescriptor>
+ </componentDescriptors>
+</assembly>
\ No newline at end of file
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/assemblies/components/aspnet-webapp-binaries.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/assemblies/components/aspnet-webapp-binaries.xml?rev=1209128&view=auto
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/assemblies/components/aspnet-webapp-binaries.xml (added)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/assemblies/components/aspnet-webapp-binaries.xml Thu Dec 1 15:59:06 2011
@@ -0,0 +1,12 @@
+<component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2 http://maven.apache.org/xsd/component-1.1.2.xsd">
+ <dependencySets>
+ <dependencySet>
+ <useProjectArtifact>true</useProjectArtifact>
+ <useTransitiveDependencies>true</useTransitiveDependencies>
+ <scope>runtime</scope>
+ <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
+ <outputDirectory>bin</outputDirectory>
+ </dependencySet>
+ </dependencySets>
+</component>
\ No newline at end of file
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/assemblies/components/aspnet-webapp-contents.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/assemblies/components/aspnet-webapp-contents.xml?rev=1209128&view=auto
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/assemblies/components/aspnet-webapp-contents.xml (added)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/main/resources/assemblies/components/aspnet-webapp-contents.xml Thu Dec 1 15:59:06 2011
@@ -0,0 +1,45 @@
+<component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2 http://maven.apache.org/xsd/component-1.1.2.xsd">
+ <fileSets>
+ <fileSet>
+ <useDefaultExcludes>true</useDefaultExcludes>
+ <directory>${project.basedir}</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <!-- .NET specifics -->
+ <include>**/*.aspx</include>
+ <include>**/*.ascx</include>
+ <include>**/*.asax</include>
+
+ <!-- web developers-->
+ <include>**/*.css</include>
+ <include>**/*.js</include>
+ <include>**/*.htm</include>
+ <include>**/*.html</include>
+ <include>**/*.asax</include>
+ <include>robots.txt</include>
+
+ <!-- graphics -->
+ <include>**/*.jpg</include>
+ <include>**/*.jpeg</include>
+ <include>**/*.png</include>
+ <include>**/*.gif</include>
+ <include>**/*.bmp</include>
+ <include>**/*.ico</include>
+
+ <!-- silverlight? -->
+
+ <!-- flash -->
+ <include>**/*.swf</include>
+ <include>**/*.flv</include>
+ <include>crossdomain.xml</include>
+ </includes>
+ <excludes>
+ <exclude>bin/</exclude>
+ <exclude>obj/</exclude>
+ <exclude>target/</exclude>
+ </excludes>
+ </fileSet>
+ </fileSets>
+</component>
\ No newline at end of file
Added: incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/site/site.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/site/site.xml?rev=1209128&view=auto
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/site/site.xml (added)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/aspnet-maven-plugin/src/site/site.xml Thu Dec 1 15:59:06 2011
@@ -0,0 +1,31 @@
+<?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 xmlns="http://maven.apache.org/DECORATION/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
+ <body>
+ <menu ref="parent" />
+
+ <menu name="Overview">
+ <item name="About" href="index.html"/>
+ <item name="Goals" href="plugin-info.html"/>
+ </menu>
+
+ <menu ref="reports" />
+ </body>
+</project>
Modified: incubator/npanday/branches/1.5.0-azuresupport/plugins/pom.xml
URL: http://svn.apache.org/viewvc/incubator/npanday/branches/1.5.0-azuresupport/plugins/pom.xml?rev=1209128&r1=1209127&r2=1209128&view=diff
==============================================================================
--- incubator/npanday/branches/1.5.0-azuresupport/plugins/pom.xml (original)
+++ incubator/npanday/branches/1.5.0-azuresupport/plugins/pom.xml Thu Dec 1 15:59:06 2011
@@ -18,84 +18,91 @@ KIND, either express or implied. See th
specific language governing permissions and limitations
under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
<groupId>org.apache.npanday</groupId>
- <version>1.5.0-azuresupport-SNAPSHOT</version>
- <artifactId>npanday-project</artifactId>
- </parent>
- <modelVersion>4.0.0</modelVersion>
+ <version>1.5.0-azuresupport-SNAPSHOT</version>
+ <artifactId>npanday-project</artifactId>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
<groupId>org.apache.npanday.plugins</groupId>
- <artifactId>maven-dotnet-plugins</artifactId>
- <packaging>pom</packaging>
+ <artifactId>maven-dotnet-plugins</artifactId>
+ <packaging>pom</packaging>
<name>NPanday :: Maven Plugins</name>
- <modules>
- <module>netplugins/NPanday.Plugin.Addin/javabinding</module>
- <module>netplugins/NPanday.Plugin.Devenv/javabinding</module>
+ <modules>
+ <module>netplugins/NPanday.Plugin.Addin/javabinding</module>
+ <module>netplugins/NPanday.Plugin.Devenv/javabinding</module>
<module>netplugins/NPanday.Plugin.Settings/javabinding</module>
<module>netplugins/NPanday.Plugin.SysRef/javabinding</module>
<module>netplugins/NPanday.Plugin.Msbuild/javabinding</module>
<module>custom-lifecycle-maven-plugin</module>
<module>maven-compile-plugin</module>
<module>maven-aspx-plugin</module>
- <module>maven-fxcop-plugin</module>
- <module>maven-install-plugin</module>
- <module>maven-ilmerge-plugin</module>
- <module>maven-link-plugin</module>
- <module>maven-mojo-generator-plugin</module>
- <module>maven-resgen-plugin</module>
- <module>maven-repository-plugin</module>
- <module>maven-resolver-plugin</module>
- <module>maven-test-plugin</module>
- <module>maven-vsinstaller-plugin</module>
- <module>maven-webapp-plugin</module>
- <module>maven-xsd-plugin</module>
- <module>maven-xsp-plugin</module>
- <module>maven-wsdl-plugin</module>
+ <module>aspnet-maven-plugin</module>
+ <module>maven-fxcop-plugin</module>
+ <module>maven-install-plugin</module>
+ <module>maven-ilmerge-plugin</module>
+ <module>maven-link-plugin</module>
+ <module>maven-mojo-generator-plugin</module>
+ <module>maven-resgen-plugin</module>
+ <module>maven-repository-plugin</module>
+ <module>maven-resolver-plugin</module>
+ <module>maven-test-plugin</module>
+ <module>maven-vsinstaller-plugin</module>
+ <module>maven-webapp-plugin</module>
+ <module>maven-xsd-plugin</module>
+ <module>maven-xsp-plugin</module>
+ <module>maven-wsdl-plugin</module>
<module>wix-maven-plugin</module>
<module>partcover-maven-plugin</module>
</modules>
<dependencies>
- <dependency>
+ <dependency>
<groupId>org.apache.npanday</groupId>
- <artifactId>dotnet-assembler</artifactId>
- </dependency>
- <dependency>
+ <artifactId>dotnet-assembler</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.apache.npanday</groupId>
- <artifactId>dotnet-dao-project</artifactId>
- </dependency>
- <dependency>
+ <artifactId>dotnet-dao-project</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.apache.npanday</groupId>
- <artifactId>dotnet-executable</artifactId>
- </dependency>
- <dependency>
+ <artifactId>dotnet-executable</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.apache.npanday</groupId>
- <artifactId>dotnet-artifact</artifactId>
- </dependency>
- <dependency>
+ <artifactId>dotnet-artifact</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.apache.npanday</groupId>
- <artifactId>dotnet-plugin</artifactId>
- </dependency>
+ <artifactId>dotnet-plugin</artifactId>
+ </dependency>
<dependency>
<groupId>org.apache.maven</groupId>
- <artifactId>maven-core</artifactId>
+ <artifactId>maven-core</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>${plexus.utils.version}</version>
</dependency>
- </dependencies>
- <build>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <!-- version is defined in parent pom -->
+ </dependency>
+ </dependencies>
+ <build>
<plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <reportFormat>plain</reportFormat>
- </configuration>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <reportFormat>plain</reportFormat>
+ </configuration>
</plugin>
- </plugins>
+ </plugins>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
@@ -108,19 +115,19 @@ under the License.
<version>1.1</version>
</extension>
</extensions>
- </build>
- <reporting>
+ </build>
+ <reporting>
<excludeDefaults>true</excludeDefaults>
- <plugins>
- <plugin>
+ <plugins>
+ <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>emma-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-project-info-reports-plugin</artifactId>
- <version>2.1.2</version>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>2.1.2</version>
<reportSets>
<reportSet>
<reports>
@@ -128,19 +135,19 @@ under the License.
</reports>
</reportSet>
</reportSets>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-plugin-plugin</artifactId>
- <version>2.5.1</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <version>2.5.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.2</version>
- </plugin>
- </plugins>
- </reporting>
+ </plugin>
+ </plugins>
+ </reporting>
<distributionManagement>
<site>
<id>apache.website</id>