Author: dan.j.allen
Date: 2010-06-18 21:16:43 -0400 (Fri, 18 Jun 2010)
New Revision: 6490
Added:
archetypes/branches/prototype/generated-archetype/
archetypes/branches/prototype/generated-archetype/pom.xml
Modified:
archetypes/branches/prototype/build.sh
Log:
remove parent from generated pom
add placeholder which is needed for tagging
Modified: archetypes/branches/prototype/build.sh
===================================================================
--- archetypes/branches/prototype/build.sh 2010-06-19 00:46:07 UTC (rev 6489)
+++ archetypes/branches/prototype/build.sh 2010-06-19 01:16:43 UTC (rev 6490)
@@ -1,26 +1,34 @@
#!/bin/sh
ARCHETYPE_DIR=target/generated-sources/archetype
-ARCHETYPE_RESOURCES_DIR=$ARCHETYPE_DIR/src/main/resources/archetype-resources
echo Generating archetype from project into $ARCHETYPE_DIR...
+rm -Rf generated-archetype/src
mvn clean archetype:create-from-project -Darchetype.properties=archetype.properties
-echo Cleaning generated archetype project...
-mvn -f $ARCHETYPE_DIR/pom.xml clean
+echo Relocating generated archetype project...
+mv $ARCHETYPE_DIR/src generated-archetype/
+mv -f $ARCHETYPE_DIR/pom.xml generated-archetype/
+ARCHETYPE_DIR=generated-archetype
+ARCHETYPE_RESOURCES_DIR=$ARCHETYPE_DIR/src/main/resources/archetype-resources
+#mvn -f $ARCHETYPE_DIR/pom.xml clean
+echo Patching generated archetype...
rm -f $ARCHETYPE_RESOURCES_DIR/`basename $0`
# could also use col -b
sed -i 's;
;;' $ARCHETYPE_RESOURCES_DIR/pom.xml
+sed -i '/<parent>/,/^$/d' $ARCHETYPE_RESOURCES_DIR/pom.xml
sed -i 's;
;;' $ARCHETYPE_RESOURCES_DIR/readme.txt
sed -i 's;<name>weld-basic-javaee6-webapp</name>;<name>Weld Basic
Java EE 6 Webapp</name>;' $ARCHETYPE_DIR/pom.xml
sed -i
's;<name>weld-basic-javaee6-webapp-src</name>;<name>${name}</name>;'
$ARCHETYPE_RESOURCES_DIR/pom.xml
if [ ! -z $1 ] && [ "$1" = "install" ]; then
+ echo Installing archetype...
shift
mvn -f $ARCHETYPE_DIR/pom.xml install
fi
if [ ! -z $1 ] && [ "$1" = "generate" ]; then
+ echo Generating project from archetype...
cd target
mvn archetype:generate -B -DarchetypeCatalog=local \
-DarchetypeArtifactId=weld-basic-javaee6-webapp
-DarchetypeGroupId=org.jboss.weld.archetypes -DarchetypeVersion=1.0.0-SNAPSHOT \
Property changes on: archetypes/branches/prototype/generated-archetype
___________________________________________________________________
Name: svn:ignore
+ target
src
Added: archetypes/branches/prototype/generated-archetype/pom.xml
===================================================================
--- archetypes/branches/prototype/generated-archetype/pom.xml (rev
0)
+++ archetypes/branches/prototype/generated-archetype/pom.xml 2010-06-19 01:16:43 UTC (rev
6490)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.jboss.weld.archetypes</groupId>
+ <artifactId>weld-basic-javaee6-webapp</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>maven-archetype</packaging>
+
+ <name>Weld Basic Java EE 6 Webapp</name>
+
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.archetype</groupId>
+ <artifactId>archetype-packaging</artifactId>
+ <version>2.0-alpha-5</version>
+ </extension>
+ </extensions>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-archetype-plugin</artifactId>
+ <version>2.0-alpha-5</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <distributionManagement>
+ <repository>
+ <
id>oss.sonatype.org/jboss-staging</id>
+ <name>Sonatype Nexus Maven Repository</name>
+ <
url>http://oss.sonatype.org/service/local/staging/deploy/maven2</ur...
+ </repository>
+ <snapshotRepository>
+ <
id>oss.sonatype.org/jboss-snapshots</id>
+ <name>Sonatype Nexus Snapshot Repository</name>
+
<
url>http://oss.sonatype.org/content/repositories/jboss-snapshots</u...
+ </snapshotRepository>
+ </distributionManagement>
+</project>