Commit in servicemix/tooling/maven-sar-plugin on MAIN
project.xml+54added 1.1
project.properties+19added 1.1
plugin.jelly+162added 1.1
.cvsignore+2added 1.1
plugin.properties+25added 1.1
+262
5 added files
Initial checkin of Maven SAR Plugin

servicemix/tooling/maven-sar-plugin
project.xml added at 1.1
diff -N project.xml
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ project.xml	2 Aug 2005 19:11:38 -0000	1.1
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- 
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed 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>  
+  <pomVersion>3</pomVersion>
+  <id>maven-sar-plugin</id>
+  <name>Maven SAR Plugin</name>
+  <currentVersion>0.1</currentVersion>
+  <description>JBoss SAR Plugin for Maven</description>
+  <shortDescription>JBoss SAR Plugin for Maven</shortDescription>
+  <developers>
+    <developer>
+      <name>Philip Dodds</name>
+      <id>pdodds</id>
+      <email>Unity Systems</email>      
+    </developer>    
+  </developers>
+  <dependencies/>
+  <build>
+		<!-- This section is compulsory -->
+		<resources>
+			<resource>
+				<directory>${basedir}/src/plugin-resources</directory>
+				<targetPath>plugin-resources</targetPath>
+			</resource>
+			<resource>
+				<directory>${basedir}</directory>
+				<includes>
+					<include>plugin.jelly</include>
+					<include>plugin.properties</include>
+					<include>project.properties</include>
+					<include>project.xml</include>
+				</includes>
+			</resource>
+		</resources>
+	</build>
+</project>

servicemix/tooling/maven-sar-plugin
project.properties added at 1.1
diff -N project.properties
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ project.properties	2 Aug 2005 19:11:38 -0000	1.1
@@ -0,0 +1,19 @@
+# -------------------------------------------------------------------
+# Copyright 2001-2004 The Apache Software Foundation.
+# 
+# Licensed 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.
+# -------------------------------------------------------------------
+
+# -------------------------------------------------------------------
+# P R O J E C T  P R O P E R T I E S
+# -------------------------------------------------------------------

servicemix/tooling/maven-sar-plugin
plugin.jelly added at 1.1
diff -N plugin.jelly
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ plugin.jelly	2 Aug 2005 19:11:38 -0000	1.1
@@ -0,0 +1,162 @@
+<?xml version="1.0"?>
+<!-- 
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed 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:j="jelly:core"
+         xmlns:ant="jelly:ant"
+         xmlns:license="license" 
+         xmlns:util="jelly:util"
+         xmlns:artifact="artifact">
+
+  <!--==================================================================-->
+  <!-- Default goal : Builds a SAR file                                 -->
+  <!--==================================================================-->
+  <goal name="sar" prereqs="sar:sar" description="Build a JBoss SAR file"/>
+
+  <!--==================================================================-->
+  <!-- Initializations                                                  -->
+  <!--==================================================================-->
+  <goal name="sar:init" 
+    description="Initialize filesystem and other resources for an SAR build">
+
+   <j:set var="maven.sar.final.name" 
+      value="${maven.build.dir}/${maven.final.name}.sar"/>
+
+    <j:if test="${sourcesPresent == 'true'}">
+      <attainGoal name="test:test"/>
+    </j:if>
+
+  </goal>
+  
+  <!--==================================================================-->
+  <!-- Builds an SAR file                                               -->
+  <!--==================================================================-->
+  <goal name="sar:sar" prereqs="sar:init" description="Build a JBoss SAR file">
+
+    <ant:echo>Building JBoss SAR ${maven.final.name}</ant:echo>
+   
+    <ant:jar
+      jarfile="${maven.sar.final.name}">
+      
+      <!-- include marked dependencies -->
+      <j:forEach var="lib" items="${pom.artifacts}">
+        <j:set var="dep" value="${lib.dependency}"/>     
+
+        <!-- Just include jars-->
+        <!-- Probably we should also include uberjars -->
+        <j:if test="${dep.getProperty('sar.bundle')=='true' and dep.type=='jar'}">          
+          <ant:echo>Bundling: ${dep.type} - ${dep.id}</ant:echo>                                             
+          <ant:fileset dir="${lib.file.parent}">
+            <ant:include name="${lib.file.name}"/>
+          </ant:fileset>
+        </j:if>   
+                
+      </j:forEach>
+ 
+      <j:set var="licenseFileName"><license:fileName/></j:set>
+      <util:file name="${licenseFileName}" var="licenseFile"/>
+      <ant:metainf dir="${licenseFile.canonicalFile.parent}">
+        <ant:include name="${licenseFile.canonicalFile.name}"/>
+      </ant:metainf>
+
+      <ant:manifest>
+        <ant:attribute name="Built-By" value="${user.name}"/>
+        <ant:attribute name="Created-By" value="Apache Maven"/>
+        <ant:attribute name="Package" value="${pom.package}"/>                
+        <ant:section name="${pom.package}">
+          <ant:attribute name="Specification-Title" value="${pom.artifactId}"/>
+          <ant:attribute name="Specification-Vendor" value="${pom.organization.name}"/>
+          <!--
+          <ant:attribute name="Specification-Version" value="${pom.currentVersion}"/>
+          -->
+          <ant:attribute name="Implementation-Title" value="${pom.package}"/>
+          <ant:attribute name="Implementation-Vendor" value="${pom.organization.name}"/>
+          <ant:attribute name="Implementation-Version" value="${pom.currentVersion}"/>
+        </ant:section>
+      </ant:manifest>
+    
+      <util:available file="${maven.sar.src}">
+        <ant:fileset dir="${maven.sar.src}"/>
+      </util:available>
+      <ant:fileset dir="${maven.build.dest}"
+        includes="${maven.sar.includes}"
+        excludes="${maven.sar.excludes}">
+      </ant:fileset>
+
+    </ant:jar>
+
+  </goal>       
+  
+  <!--==================================================================-->
+  <!-- Install the SAR in the local repository                          -->
+  <!--==================================================================-->    
+  <goal name="sar:install"
+        prereqs="sar:sar"
+        description="Install the JBoss SAR in the local repository">
+     
+     <artifact:install
+        artifact="${maven.sar.final.name}"
+        type="sar"
+        project="${pom}"/> 
+  
+  </goal>
+  
+  <!--==================================================================-->
+  <!-- Install the snapshot version of the SAR in the local repository  -->
+  <!--==================================================================-->      
+  <goal name="sar:install-snapshot"
+        prereqs="sar:sar" 
+        description="Install the snapshot version of the JBoss SAR in the local repository">
+        
+      <artifact:install-snapshot
+        artifact="${maven.sar.final.name}"
+        type="sar"
+        project="${pom}"/> 
+        
+  </goal>
+
+  <!--==================================================================-->
+  <!-- Deploys the SAR to the remote repository                         -->
+  <!--==================================================================-->
+  <goal name="sar:deploy" 
+        prereqs="sar:sar" 
+        description="Deploys the JBoss SAR to the remote repository">
+
+     <artifact:deploy
+        artifact="${maven.sar.final.name}"
+        type="sar"
+        project="${pom}"/>   
+        
+  </goal>
+        
+  <!--==================================================================-->
+  <!-- Deploys the snapshot of the SAR to the remote repository         -->
+  <!--==================================================================-->      
+  <goal name="sar:deploy-snapshot" 
+        prereqs="sar:sar"
+        description="Deploys the snapshot version of the JBoss SAR to remote repository">  
+
+     <artifact:deploy-snapshot
+        artifact="${maven.sar.final.name}"
+        type="sar"
+        project="${pom}"/>    
+        
+  </goal>   
+
+</project>

servicemix/tooling/maven-sar-plugin
.cvsignore added at 1.1
diff -N .cvsignore
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ .cvsignore	2 Aug 2005 19:11:38 -0000	1.1
@@ -0,0 +1,2 @@
+target
+.project

servicemix/tooling/maven-sar-plugin
plugin.properties added at 1.1
diff -N plugin.properties
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ plugin.properties	2 Aug 2005 19:11:38 -0000	1.1
@@ -0,0 +1,25 @@
+# -------------------------------------------------------------------
+# Copyright 2001-2004 The Apache Software Foundation.
+# 
+# Licensed 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.
+# -------------------------------------------------------------------
+
+# -------------------------------------------------------------------
+# P L U G I N  P R O P E R T I E S
+# -------------------------------------------------------------------
+# JBoss SAR plugin
+# -------------------------------------------------------------------
+
+# Location of where SAR sources (non-java) are located.
+maven.sar.src=""
+
CVSspam 0.2.8



Reply via email to