Added a 'deploy' profile that fetches and includes a private jclouds.properties file, and now copying META-INF resources into <webapproot>/META-INF rather than <webapproot>/WEB-INF/META-INF

This commit is contained in:
Andrew Phillips 2011-06-02 02:15:05 +02:00
parent 3f60d4f707
commit a089151981
1 changed files with 70 additions and 0 deletions

View File

@ -37,6 +37,7 @@
</modules> </modules>
<properties> <properties>
<remoteResourcesDirectory>target/maven-shared-archive-resources</remoteResourcesDirectory>
<jclouds.tweetstore.blobstores>cloudfiles-us,aws-s3,azureblob</jclouds.tweetstore.blobstores> <jclouds.tweetstore.blobstores>cloudfiles-us,aws-s3,azureblob</jclouds.tweetstore.blobstores>
</properties> </properties>
@ -117,6 +118,14 @@
<build> <build>
<finalName>${project.artifactId}</finalName> <finalName>${project.artifactId}</finalName>
<plugins> <plugins>
<plugin>
<artifactId>maven-remote-resources-plugin</artifactId>
<version>1.2</version>
<configuration>
<!-- prevents the maven-war-plugin from including the resources in WEB-INF/classes -->
<attached>false</attached>
</configuration>
</plugin>
<plugin> <plugin>
<artifactId>maven-war-plugin</artifactId> <artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version> <version>2.1.1</version>
@ -129,9 +138,70 @@
<targetPath>WEB-INF</targetPath> <targetPath>WEB-INF</targetPath>
<filtering>true</filtering> <filtering>true</filtering>
</resource> </resource>
<resource>
<directory>${remoteResourcesDirectory}/META-INF</directory>
<targetPath>META-INF</targetPath>
</resource>
</webResources> </webResources>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<profiles>
<profile>
<id>deploy</id>
<build>
<plugins>
<plugin>
<artifactId>maven-remote-resources-plugin</artifactId>
<version>1.2</version>
<configuration>
<!-- prevents the maven-war-plugin from including the resources in WEB-INF/classes -->
<attached>false</attached>
</configuration>
<executions>
<execution>
<id>include-jclouds-properties</id>
<goals>
<goal>process</goal>
</goals>
<configuration>
<resourceBundles>
<resourceBundle>org.jclouds:jclouds-properties:${project.version}</resourceBundle>
</resourceBundles>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<!-- see http://jira.codehaus.org/browse/MWAR-248 -->
<packagingExcludes>WEB-INF/web.xml</packagingExcludes>
<webResources>
<resource>
<directory>src/main/platform</directory>
<targetPath>WEB-INF</targetPath>
<filtering>true</filtering>
</resource>
<resource>
<directory>${remoteResourcesDirectory}/META-INF</directory>
<targetPath>META-INF</targetPath>
</resource>
<resource>
<directory>${remoteResourcesDirectory}</directory>
<targetPath>WEB-INF</targetPath>
<filtering>true</filtering>
<includes>
<include>jclouds.properties</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project> </project>