[pkg-java] r3641 - in trunk/maven-ant-helper: . debian src/main/java

paulcager-guest at alioth.debian.org paulcager-guest at alioth.debian.org
Wed Jun 13 15:20:00 UTC 2007


Author: paulcager-guest
Date: 2007-06-13 15:20:00 +0000 (Wed, 13 Jun 2007)
New Revision: 3641

Added:
   trunk/maven-ant-helper/debian/build.properties
   trunk/maven-ant-helper/debian/build.xml
   trunk/maven-ant-helper/debian/docs
Removed:
   trunk/maven-ant-helper/Makefile
   trunk/maven-ant-helper/debian/docs
Modified:
   trunk/maven-ant-helper/debian/README
   trunk/maven-ant-helper/debian/changelog
   trunk/maven-ant-helper/debian/control
   trunk/maven-ant-helper/debian/copyright
   trunk/maven-ant-helper/debian/rules
   trunk/maven-ant-helper/src/main/java/ModelloTask.java
Log:
maven-ant-helper (2) unstable; urgency=low

  * Initial public release (Closes: #428643)

  * Changes following review by Michael Koch:
    - Copyright file changed to follow dh_make's format.
    - Version number changed to single integer.
    - Ported to CDBS format.
    - Created ITP closed by this upload.

  * Added brief usage notes in README.

 -- Paul Cager <paul-debian at home.paulcager.org>  Wed, 13 Jun 2007 11:03:27 +0100


Deleted: trunk/maven-ant-helper/Makefile
===================================================================
--- trunk/maven-ant-helper/Makefile	2007-06-13 14:02:52 UTC (rev 3640)
+++ trunk/maven-ant-helper/Makefile	2007-06-13 15:20:00 UTC (rev 3641)
@@ -1,17 +0,0 @@
-build: build/maven-ant-helper.jar
-
-build/maven-ant-helper.jar: $(wildcard src/main/java/*.java)
-	/usr/lib/jvm/java-gcj/bin/javac \
-		-cp /usr/share/java/ant.jar \
-		-d build/classes \
-		$(wildcard src/main/java/*.java)
-	jar cf build/maven-ant-helper.jar -C build/classes .
-
-clean:
-	rm -rf build
-
-install:
-	install -d -o root -g root $(DESTDIR)/usr/share/maven-ant-helper
-	install -o root -g root -m 644 maven-build.xml $(DESTDIR)/usr/share/maven-ant-helper
-	install -o root -g root -m 644 maven-defaults.properties $(DESTDIR)/usr/share/maven-ant-helper
-	install -o root -g root -m 644 build/maven-ant-helper.jar $(DESTDIR)/usr/share/maven-ant-helper

Modified: trunk/maven-ant-helper/debian/README
===================================================================
--- trunk/maven-ant-helper/debian/README	2007-06-13 14:02:52 UTC (rev 3640)
+++ trunk/maven-ant-helper/debian/README	2007-06-13 15:20:00 UTC (rev 3641)
@@ -1,6 +1,20 @@
 The Debian Package maven-ant-helper
-----------------------------
+-----------------------------------
 
-Comments regarding the Package
+This package provides helper scripts for anyone packaging Java components
+within Debian. It will be particularly useful when packaging libraries using
+"modello" to generate sources, such as the maven2 system.
 
+It provides two scripts and one ant task:
+
+    * maven-build.xml -- a base build file providing much of the functionality
+                         needed to build Java projects.
+    * maven-defaults.properties -- default properties for the above.
+    * ModelloTask -- provides an "modello" ant task to generate sources
+                     from Modello definitions.
+
+For an example of how to use maven-ant-helper, please see the Debian packaging
+of "doxia".
+
  -- Trygve Laugstøl <trygvis at inamo.no>  Sun, 27 May 2007 03:30:35 +0200
+ -- Paul Cager <paul-debian at home.paulcager.org>  Wed, 13 Jun 2007 11:03:27 +0100

Added: trunk/maven-ant-helper/debian/build.properties
===================================================================
--- trunk/maven-ant-helper/debian/build.properties	                        (rev 0)
+++ trunk/maven-ant-helper/debian/build.properties	2007-06-13 15:20:00 UTC (rev 3641)
@@ -0,0 +1,15 @@
+# Set the default Maven locations.
+# See http://maven.apache.org/ref/current/maven-model/maven.html for nams
+build.sourceDirectory=src/main/java
+build.testSourceDirectory=src/test/java
+
+build.directory=build
+build.outputDirectory=build/classes
+build.testOutputDirectory=build/test-classes
+javadoc.dir=${build.directory}/api
+classpath.compile=
+classpath.test=
+classpath.full.compile=${build.outputDirectory}:${classpath.compile}
+classpath.full.test=${build.testOutputDirectory}:${classpath.test}:${build.outputDirectory}:${classpath.compile}
+
+maven.test.excludes=

Added: trunk/maven-ant-helper/debian/build.xml
===================================================================
--- trunk/maven-ant-helper/debian/build.xml	                        (rev 0)
+++ trunk/maven-ant-helper/debian/build.xml	2007-06-13 15:20:00 UTC (rev 3641)
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+
+<!--
+    This build file is used internally to build the maven-ant-helper package. Unlike
+    ../maven-build.xml, it is not released as part of the binary package.
+-->
+
+<project name="pkg-java" default="package" basedir="..">
+
+    <target name="init">
+        <available property="available.resources" file="src/main/resources"/>
+
+        <fail unless="artifactId" message="Missing required property: artifactId"/>
+        <fail unless="version" message="Missing required property: version"/>
+        <fail unless="basedir" message="Missing required property: basedir"/>
+
+        <echo message="Compile classpath: ${classpath.full.compile}"/>
+        <echo message="Test classpath: ${classpath.full.test}"/>
+    </target>
+
+    <!--
+     | LIFECYCLE: Clean
+     |-->
+
+    <target name="clean">
+        <delete dir="${build.directory}"/>
+    </target>
+
+    <!--
+     | LIFECYCLE: jar
+     |
+     | This mimics the default Maven build life-cycle: http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
+     |-->
+
+     <target name="process-resources" depends="init" if="available.resources">
+        <mkdir dir="${build.outputDirectory}"/>
+        <copy todir="${build.outputDirectory}">
+            <fileset dir="src/main/resources"/>
+        </copy>
+     </target>
+
+    <target name="compile" depends="process-resources">
+        <mkdir dir="${build.outputDirectory}"/>
+        <mkdir dir="${build.directory}/generated-sources"/>
+        <javac
+            destdir="${build.outputDirectory}"
+            classpath="${classpath.compile}"
+            nowarn="true"
+            source="1.4" target="1.4"
+            debug="on">
+            <src path="${build.sourceDirectory}"/>
+        </javac>
+    </target>
+
+    <target name="package" depends="compile">
+        <jar jarfile="${build.directory}/${artifactId}-${version}.jar"
+            basedir="${build.outputDirectory}"/>
+    </target>
+</project>

Modified: trunk/maven-ant-helper/debian/changelog
===================================================================
--- trunk/maven-ant-helper/debian/changelog	2007-06-13 14:02:52 UTC (rev 3640)
+++ trunk/maven-ant-helper/debian/changelog	2007-06-13 15:20:00 UTC (rev 3641)
@@ -1,5 +1,19 @@
+maven-ant-helper (2) unstable; urgency=low
+
+  * Initial public release (Closes: #428643)
+  
+  * Changes following review by Michael Koch:
+    - Copyright file changed to follow dh_make's format.
+    - Version number changed to single integer.
+    - Ported to CDBS format.
+    - Created ITP closed by this upload.
+
+  * Added brief usage notes in README.
+
+ -- Paul Cager <paul-debian at home.paulcager.org>  Wed, 13 Jun 2007 11:03:27 +0100
+
 maven-ant-helper (1.0) unstable; urgency=low
 
-  * Initial Release.
+  * Initial Release to pkg-java project.
 
  -- Trygve Laugstol <trygvis at inamo.no>  Sun, 27 May 2007 03:30:35 +0200

Modified: trunk/maven-ant-helper/debian/control
===================================================================
--- trunk/maven-ant-helper/debian/control	2007-06-13 14:02:52 UTC (rev 3640)
+++ trunk/maven-ant-helper/debian/control	2007-06-13 15:20:00 UTC (rev 3641)
@@ -3,19 +3,16 @@
 Priority: extra
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
 Uploaders: Trygve Laugstøl <trygvis at inamo.no>, Paul Cager <paul-debian at home.paulcager.org>
-Build-Depends: debhelper (>= 5), java-gcj-compat-dev (>=1.0.65), ant
+Build-Depends: ant, debhelper (>= 5), cdbs (>= 0.4.5.3)
+Build-Depends-Indep: java-gcj-compat-dev (>=1.0.65), ant-optional
 Standards-Version: 3.7.2
 
 Package: maven-ant-helper
 Architecture: all
 Section: devel
-Depends: ${shlibs:Depends}, ${misc:Depends}
-         libplexus-utils-java,
-         libplexus-classworlds-java,
-         libplexus-container-default-java,
-         libmodello-java
+Depends: libmodello-java
 Description: helper scripts for building Maven components with ant
  An environment that can be used to simplify the creation of Debian packages
  to support the Maven system. A "modello" ant task is also provided.
  .
-  Homepage: http://svn.debian.org/wsvn/pkg-java/trunk/
+  Homepage: http://svn.debian.org/wsvn/pkg-java/trunk/maven-ant-helper

Modified: trunk/maven-ant-helper/debian/copyright
===================================================================
--- trunk/maven-ant-helper/debian/copyright	2007-06-13 14:02:52 UTC (rev 3640)
+++ trunk/maven-ant-helper/debian/copyright	2007-06-13 15:20:00 UTC (rev 3641)
@@ -2,11 +2,28 @@
 on Sun, 27 May 2007 03:30:35 +0200.
 
 The original source can always be found at:
-	ftp://ftp.debian.org/dists/unstable/main/source/
+    svn.debian.org/svn/pkg-java/trunk/maven-ant-helper
 
-Copyright Holder:  Trygve Laugstøl
+Author:
+    
+    Trygve Laugstøl <trygvis at inamo.no>
 
 License:
+ 
+    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.
+ 
+
+
                                  Apache License
                            Version 2.0, January 2004
                         http://www.apache.org/licenses/

Deleted: trunk/maven-ant-helper/debian/docs
===================================================================

Added: trunk/maven-ant-helper/debian/docs
===================================================================
--- trunk/maven-ant-helper/debian/docs	                        (rev 0)
+++ trunk/maven-ant-helper/debian/docs	2007-06-13 15:20:00 UTC (rev 3641)
@@ -0,0 +1 @@
+debian/README

Modified: trunk/maven-ant-helper/debian/rules
===================================================================
--- trunk/maven-ant-helper/debian/rules	2007-06-13 14:02:52 UTC (rev 3640)
+++ trunk/maven-ant-helper/debian/rules	2007-06-13 15:20:00 UTC (rev 3641)
@@ -1,89 +1,22 @@
 #!/usr/bin/make -f
-# -*- makefile -*-
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/ant.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
 
-CFLAGS = -Wall -g
+PACKAGE              := $(shell dpkg-parsechangelog | egrep '^Source:' | cut -f2 -d' ')
+VERSION              := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f2 -d' ')
+JAVA_HOME            := /usr/lib/jvm/java-gcj
+ANT_HOME             := /usr/share/ant
+DEB_JARS             := $(ANT_HOME)/lib/ant-launcher.jar $(ANT_HOME)/lib/ant-trax.jar xalan2 
+DEB_ANT_BUILD_TARGET := package
+DEB_ANT_BUILDFILE    := ./debian/build.xml
+DEB_ANT_ARGS         := -DartifactId=$(PACKAGE) -Dpackage=$(PACKAGE) -Dversion=$(VERSION) -propertyfile debian/build.properties
+SVN                  := http://svn.debian.org/svn/pkg-java/trunk/maven-ant-helper
 
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -O0
-else
-	CFLAGS += -O2
-endif
-
-configure: configure-stamp
-configure-stamp:
-	dh_testdir
-	# Add here commands to configure the package.
-
-	touch configure-stamp
-
-build: build-stamp
-
-build-stamp: configure-stamp 
-	dh_testdir
-
-	# Add here commands to compile the package.
-	$(MAKE)
-	#docbook-to-man debian/maven-ant-helper.sgml > maven-ant-helper.1
-
-	touch $@
-
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f build-stamp configure-stamp
-
-	# Add here commands to clean up after the build process.
-	-$(MAKE) clean
-
-	dh_clean 
-
-install: build
-	dh_testdir
-	dh_testroot
-	dh_clean -k 
-	dh_installdirs
-
-	# Add here commands to install the package into debian/maven-ant-helper.
-	$(MAKE) DESTDIR=$(CURDIR)/debian/maven-ant-helper install
-
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
-	dh_testdir
-	dh_testroot
-	dh_installchangelogs 
-	dh_installdocs
-	dh_installexamples
-#	dh_install
-#	dh_installmenu
-#	dh_installdebconf	
-#	dh_installlogrotate
-#	dh_installemacsen
-#	dh_installpam
-#	dh_installmime
-#	dh_python
-#	dh_installinit
-#	dh_installcron
-#	dh_installinfo
-#	dh_installman
-#	dh_link
-#	dh_strip
-#	dh_compress
-	dh_fixperms
-#	dh_perl
-#	dh_makeshlibs
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+binary-post-install/$(PACKAGE)::
+	dh_install build/$(PACKAGE)-$(VERSION).jar usr/share/java
+	dh_link usr/share/java/$(PACKAGE)-$(VERSION).jar usr/share/java/$(PACKAGE).jar
+	dh_installdirs -A usr/share/maven-ant-helper
+	dh_install maven-build.xml usr/share/maven-ant-helper
+	dh_install maven-defaults.properties usr/share/maven-ant-helper

Modified: trunk/maven-ant-helper/src/main/java/ModelloTask.java
===================================================================
--- trunk/maven-ant-helper/src/main/java/ModelloTask.java	2007-06-13 14:02:52 UTC (rev 3640)
+++ trunk/maven-ant-helper/src/main/java/ModelloTask.java	2007-06-13 15:20:00 UTC (rev 3641)
@@ -3,6 +3,22 @@
 import java.net.*;
 import org.apache.tools.ant.*;
 
+/*
+ * Copyright (C) 2007, Trygve Laugstøl
+ *
+ *  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.
+*/
+
 public class ModelloTask extends Task {
     private String model;
     private String plugin;




More information about the pkg-java-commits mailing list