commit ce389ef4ce736df799cfdfa011a5118a80210653 Author: denghao Date: Wed Mar 22 10:58:04 2023 +0800 Import Upstream version 8.6 diff --git a/bootstrap/META-INF/plexus/components.xml b/bootstrap/META-INF/plexus/components.xml new file mode 100644 index 0000000..fdc41a7 --- /dev/null +++ b/bootstrap/META-INF/plexus/components.xml @@ -0,0 +1,414 @@ + + + + + + + + org.apache.maven.plugin.PluginManager + org.apache.maven.plugin.DefaultPluginManager + + + org.apache.maven.project.path.PathTranslator + + + org.apache.maven.plugin.MavenPluginCollector + + + org.apache.maven.plugin.version.PluginVersionManager + + + org.apache.maven.artifact.factory.ArtifactFactory + + + org.apache.maven.artifact.resolver.ArtifactResolver + + + org.apache.maven.artifact.metadata.ArtifactMetadataSource + + + org.apache.maven.plugin.PluginMappingManager + + + org.apache.maven.execution.RuntimeInformation + + + org.apache.maven.project.MavenProjectBuilder + + + + + + org.apache.maven.extension.ExtensionManager + org.apache.maven.extension.DefaultExtensionManager + + + org.apache.maven.artifact.resolver.ArtifactResolver + + + org.apache.maven.artifact.factory.ArtifactFactory + + + org.apache.maven.artifact.metadata.ArtifactMetadataSource + + + org.apache.maven.artifact.manager.WagonManager + + + + + + org.apache.maven.plugin.PluginMappingManager + org.apache.maven.plugin.DefaultPluginMappingManager + + + org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager + + + + + + + org.apache.maven.project.path.PathTranslator + org.apache.maven.project.path.DefaultPathTranslator + + + + org.apache.maven.Maven + org.apache.maven.DefaultMaven + + + org.apache.maven.project.MavenProjectBuilder + + + org.apache.maven.lifecycle.LifecycleExecutor + + + org.apache.maven.usability.diagnostics.ErrorDiagnostics + + + org.apache.maven.execution.RuntimeInformation + + + + + + org.apache.maven.execution.RuntimeInformation + org.apache.maven.execution.DefaultRuntimeInformation + + + + org.apache.maven.usability.diagnostics.ErrorDiagnoser + MojoExecutionExceptionDiagnoser + org.apache.maven.usability.MojoExecutionExceptionDiagnoser + + + + org.apache.maven.usability.diagnostics.ErrorDiagnoser + MojoFailureExceptionDiagnoser + org.apache.maven.usability.MojoFailureExceptionDiagnoser + + + + org.apache.maven.usability.diagnostics.ErrorDiagnoser + ProjectBuildDiagnoser + org.apache.maven.usability.ProjectBuildDiagnoser + + + + org.apache.maven.usability.diagnostics.ErrorDiagnoser + ProfileActivationDiagnoser + org.apache.maven.usability.ProfileActivationDiagnoser + + + + org.apache.maven.usability.diagnostics.ErrorDiagnoser + PluginConfigurationDiagnoser + org.apache.maven.usability.PluginConfigurationDiagnoser + + + + org.apache.maven.usability.diagnostics.ErrorDiagnoser + ArtifactNotFoundDiagnoser + org.apache.maven.usability.ArtifactNotFoundDiagnoser + + + org.apache.maven.artifact.manager.WagonManager + + + + + + org.apache.maven.usability.diagnostics.ErrorDiagnoser + ArtifactResolverDiagnoser + org.apache.maven.usability.ArtifactResolverDiagnoser + + + org.apache.maven.artifact.manager.WagonManager + + + + + + org.apache.maven.usability.diagnostics.ErrorDiagnoser + InvalidArtifactDiagnoser + org.apache.maven.usability.InvalidArtifactDiagnoser + + + + org.apache.maven.ConfigurationInterpolator + org.apache.maven.ReflectionConfigurationInterpolator + + + org.apache.maven.project.path.PathTranslator + + + + + + + org.apache.maven.lifecycle.LifecycleExecutor + org.apache.maven.lifecycle.DefaultLifecycleExecutor + + + org.apache.maven.plugin.PluginManager + + + org.apache.maven.extension.ExtensionManager + + + org.apache.maven.artifact.handler.manager.ArtifactHandlerManager + + + org.apache.maven.project.MavenProjectBuilder + + + org.apache.maven.project.interpolation.ModelInterpolator + + + org.apache.maven.ConfigurationInterpolator + + + + + + default + + + validate + initialize + generate-sources + process-sources + generate-resources + process-resources + compile + process-classes + generate-test-sources + process-test-sources + generate-test-resources + process-test-resources + test-compile + process-test-classes + test + prepare-package + package + pre-integration-test + integration-test + post-integration-test + verify + install + deploy + + + + + clean + + pre-clean + clean + post-clean + + + org.apache.maven.plugins:maven-clean-plugin:clean + + + + + + + + + + + + + + + + org.apache.maven.lifecycle.mapping.LifecycleMapping + pom + org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping + + + + default + + + org.apache.maven.plugins:maven-install-plugin:install + + + + + + + + + + + + org.apache.maven.lifecycle.mapping.LifecycleMapping + jar + org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping + + + + default + + + org.apache.maven.plugins:maven-resources-plugin:resources + org.apache.maven.plugins:maven-compiler-plugin:compile + + org.apache.maven.plugins:maven-resources-plugin:testResources + + org.apache.maven.plugins:maven-compiler-plugin:testCompile + + + org.apache.maven.plugins:maven-jar-plugin:jar + + org.apache.maven.plugins:maven-install-plugin:install + + + + + + + + + + org.apache.maven.plugin.version.PluginVersionManager + default + org.apache.maven.plugin.version.DefaultPluginVersionManager + per-lookup + + + org.apache.maven.artifact.metadata.ArtifactMetadataSource + + + org.apache.maven.plugin.registry.MavenPluginRegistryBuilder + + + org.apache.maven.artifact.factory.ArtifactFactory + + + org.codehaus.plexus.components.interactivity.InputHandler + + + org.apache.maven.project.MavenProjectBuilder + + + org.apache.maven.execution.RuntimeInformation + + + + + + org.sonatype.plexus.components.sec.dispatcher.SecDispatcher + maven + org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher + Maven Security dispatcher + + + org.sonatype.plexus.components.cipher.PlexusCipher + _cipher + + + + <_configuration-file>~/.m2/settings-security.xml + + + + diff --git a/debian-orig/README b/debian-orig/README new file mode 100644 index 0000000..8038021 --- /dev/null +++ b/debian-orig/README @@ -0,0 +1,20 @@ +The Debian Package maven-ant-helper +----------------------------------- + +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 Sun, 27 May 2007 03:30:35 +0200 + -- Paul Cager Wed, 13 Jun 2007 11:03:27 +0100 diff --git a/debian-orig/build.properties b/debian-orig/build.properties new file mode 100644 index 0000000..2f91ecc --- /dev/null +++ b/debian-orig/build.properties @@ -0,0 +1,15 @@ +# Set the default Maven locations. +# See http://maven.apache.org/ref/current/maven-model/maven.html for names +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= diff --git a/debian-orig/build.xml b/debian-orig/build.xml new file mode 100644 index 0000000..0a0ab78 --- /dev/null +++ b/debian-orig/build.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/debian-orig/changelog b/debian-orig/changelog new file mode 100644 index 0000000..c8ae6df --- /dev/null +++ b/debian-orig/changelog @@ -0,0 +1,332 @@ +maven-ant-helper (8.7) unstable; urgency=medium + + * Team upload. + + [ Edward Betts ] + * Use canonical Salsa URL for homepage. + + [ Jochen Sprickerhof ] + * Cleanup debian/.mh in dh_clean + * Strip trailing whitespace in d/changelog + * Add R³ + * Make d/copyright machine readable + + -- Jochen Sprickerhof Mon, 27 Feb 2023 08:26:02 +0100 + +maven-ant-helper (8.6) unstable; urgency=medium + + * Team upload. + * Depend on the no-aop variant of Guice + * Standards-Version updated to 4.5.1 + * Switch to debhelper level 13 + * Changed the priority from extra to optional + + -- Emmanuel Bourg Wed, 10 Feb 2021 09:57:35 +0100 + +maven-ant-helper (8.5) unstable; urgency=medium + + * Team upload. + * Added the missing dependency on libstax-java (Closes: #902404) + * Use salsa.debian.org Vcs-* URLs + + -- Emmanuel Bourg Tue, 26 Jun 2018 09:53:25 +0200 + +maven-ant-helper (8.4) unstable; urgency=medium + + * Team upload. + * Added geronimo-annotation to the classpath to run on Java 9 + (Closes: #893343) + * Standards-Version updated to 4.1.4 + + -- Emmanuel Bourg Fri, 06 Apr 2018 09:48:48 +0200 + +maven-ant-helper (8.3) unstable; urgency=medium + + * Team upload. + * Fixed the build failure with Java 9 (Closes: #893299) + * Removed Damien Raude-Morvan from the uploaders (Closes: #889395) + * Standards-Version updated to 4.1.3 + * Switch to debhelper level 11 + + -- Emmanuel Bourg Sat, 17 Mar 2018 23:10:20 +0100 + +maven-ant-helper (8.2) unstable; urgency=medium + + * Team upload. + * Updated the Maven classpath + * Standards-Version updated to 4.1.1 + + -- Emmanuel Bourg Sat, 11 Nov 2017 21:48:36 +0100 + +maven-ant-helper (8.1) unstable; urgency=medium + + * Team upload. + * Switch to the Plexus dependencies used by Maven 3 to run Modello + * Standards-Version updated to 4.1.0 + + -- Emmanuel Bourg Tue, 05 Sep 2017 12:59:00 +0200 + +maven-ant-helper (8.0) unstable; urgency=medium + + * Team upload. + * Depend on libmaven3-core-java instead of libmaven2-core-java + * Build with the DH sequencer instead of CDBS + * Standards-Version updated to 4.0.0 + * Switch to debhelper level 10 + * Use secure Vcs-* URLs + + -- Emmanuel Bourg Thu, 27 Jul 2017 17:16:19 +0200 + +maven-ant-helper (7.11) unstable; urgency=medium + + * Team upload. + * Improved the reproducibility of the Javadoc: removed the timestamps + and use an english locale. + * Standards-Version updated to 3.9.6 (no changes) + * Moved the package to Git (Closes: #703789) + + -- Emmanuel Bourg Wed, 09 Sep 2015 15:48:19 +0200 + +maven-ant-helper (7.10) unstable; urgency=medium + + * Team upload. + * Add maven-toolchain.jar to the Maven classpath (Closes: #735834) + + -- Emmanuel Bourg Thu, 30 Jan 2014 13:03:39 +0100 + +maven-ant-helper (7.9) unstable; urgency=low + + * Team upload. + * Added a process-classes target to allow the post processing of the compiled + classes. This enables the generation of plugin and component descriptors + when Java annotations are used instead of Javadoc tags. + * Propagate the source/target level set with the javaVersion property to Maven + * Removed backport-util-concurrent from the Maven classpath + * Updated Standards-Version to 3.9.5 (no changes) + + -- Emmanuel Bourg Fri, 08 Nov 2013 15:11:54 +0100 + +maven-ant-helper (7.8) unstable; urgency=low + + * Team upload. + * Modello Task: Use Guava instead of Google Collections (Closes: #724211) + * debian/control: + - Updated Standards-Version to 3.9.4 (no changes) + - Use canonical URLs for the Vcs-* fields + - Removed the duplicate Section field for the binary package + - Build depend on debhelper >= 9 + * Removed the Javadoc link with the OpenJDK 6 documentation + + -- Emmanuel Bourg Tue, 24 Sep 2013 10:41:57 +0200 + +maven-ant-helper (7.7) unstable; urgency=low + + * Add target local-install-doc to maven-build.xml + + -- Ludovic Claude Tue, 24 Jan 2012 23:43:23 +0100 + +maven-ant-helper (7.6) unstable; urgency=low + + * Better handling of install in local-repo during build (Closes: #652804). + + -- Damien Raude-Morvan Thu, 29 Dec 2011 01:32:56 +0100 + +maven-ant-helper (7.5) unstable; urgency=low + + * Use Java 1.5 for compiling and source level compatibility + by default (Closes: #644941) + * Fix issue when test sources are missing and maven.test.skip is not set + to true + + -- Ludovic Claude Sun, 30 Oct 2011 19:56:27 +0100 + +maven-ant-helper (7.4) unstable; urgency=low + + [ Ludovic Claude ] + * process-test-resources now ignores Java files when copying + + [ Torsten Werner ] + * Remove Trydge and Paul from Uploaders list. + + -- Torsten Werner Tue, 27 Sep 2011 17:38:59 +0200 + +maven-ant-helper (7.3) unstable; urgency=low + + * maven-build.xml: Fix read of properties in *.poms files by changing + regexp and set cleaner.options only if not already defined. + (Closes: #629894). + * debian/rules: Remove ant-trax from classpath (doesn't exist anymore since + Ant 1.8). + + -- Damien Raude-Morvan Sun, 26 Jun 2011 19:14:05 +0200 + +maven-ant-helper (7.2) unstable; urgency=low + + * Upload to unstable. + + -- Torsten Werner Wed, 09 Feb 2011 21:34:32 +0100 + +maven-ant-helper (7.1) experimental; urgency=low + + [ Ludovic Claude ] + * Add a javadoc-jar target which generates a jar file containing the javadoc + * Add a default build-all target which can run the build and optionally + generate javadoc and its jar if generate.javadoc property is set + + [ Damien Raude-Morvan ] + * d/rules: Remove simple-patchsys.mk since d/source/format is 3.0 (native). + * d/control, d/compat: Bump debhelper compat level to 7. + * d/control: Add myself as Uploaders. + + -- Damien Raude-Morvan Sun, 05 Dec 2010 20:01:13 +0100 + +maven-ant-helper (7.0) experimental; urgency=low + + * Update Standards-Version to 3.9.1, use source format 3.0 (native) + * Use default-jdk-doc instead of openjdk-6-doc when linking + Javadoc files (Closes: #587361) + * d/control: add Suggests: default-jdk-doc, move all Recommends: to Suggest + as they are not needed except when Maven is called within the Ant build, + add maven-repo-helper to Depends as it's now always used from the jar task + * maven-build.xml: add -N option to Maven to avoid recursive actions, + reorder actions in mvn-package and give to the POMCleaner the location + of the local Maven repository which can be used when deciding when to + replace a parent version by a its symbolic version (fixes + maven-debian-helper build), + add local-install and package-and-local-install target to deal with + composite projects which need to install some of their build elements in + the local repository, for consuption by other parts of the build, + deprecate passing the 'version' variable to Ant as it's read from the POM file, + remove macro prepare-package-list, update paths to the JDK docs. + + -- Ludovic Claude Thu, 14 Oct 2010 00:08:38 +0200 + +maven-ant-helper (6.8) unstable; urgency=low + + * Use default-jdk-doc instead of openjdk-6-doc when linking + Javadoc files + + -- Ludovic Claude Sun, 28 Mar 2010 21:55:57 +0200 + +maven-ant-helper (6.7) unstable; urgency=low + + * Do no longer the package-list file from openjdk-6-doc. + (Closes: #573660) + + -- Torsten Werner Sat, 13 Mar 2010 10:24:35 +0100 + +maven-ant-helper (6.6) unstable; urgency=low + + * Revert previous change as openjdk6-doc is not required + for most builds. Update the affected packages in a + separate update. + * Bump up Standards-Version to 3.8.3, no changes + + -- Ludovic Claude Wed, 02 Sep 2009 21:22:49 +0100 + +maven-ant-helper (6.5) unstable; urgency=low + + * Add Build-Depends: openjdk-6-doc to fix build errors. (Closes: #543106, + #543112, #543115, #543116) + + -- Torsten Werner Sun, 23 Aug 2009 10:13:54 +0200 + +maven-ant-helper (6.4) unstable; urgency=low + + * Upload to unstable. + + -- Torsten Werner Sun, 09 Aug 2009 13:04:01 +0200 + +maven-ant-helper (6.3) experimental; urgency=low + + * Update Standards-Version to 3.8.2 + * Add ant and ant-optional to Depends: + * Add more Suggest: packages (libmaven-plugin-plugin-java and + libplexus-components-metadata-java as they provide useful + Maven plugin often used in the build) + * Add support for linking generated Javadoc to other + documented libraries. + + -- Ludovic Claude Thu, 16 Jul 2009 22:34:35 +0100 + +maven-ant-helper (6.2) experimental; urgency=low + + * Fix a bug introduced by previous version. It was affecting + only the builds which execute a Maven plugin. + * Add more workaround to use gcj with maven-ant-helper, this time + avoid using gnu xml stream when reading XML documents. + + -- Ludovic Claude Wed, 08 Jul 2009 23:41:02 +0100 + +maven-ant-helper (6.1) unstable; urgency=low + + * Provide a workaround to use gcj with maven-ant-helper + + -- Ludovic Claude Tue, 07 Jul 2009 22:46:18 +0100 + +maven-ant-helper (6) unstable; urgency=low + + * Add support for custom manifest + + -- Ludovic Claude Tue, 07 Jul 2009 19:46:22 +0100 + +maven-ant-helper (5) unstable; urgency=low + + * Change section to java, bump up Standards-Version: 3.8.1. + * Add myself to uploaders + * Add a Build-Depends-Indep dependency on ${misc:Depends} + * Fix ModelloTask to work with modello >= 1.0, add new properties + useJava5 and encoding. + * maven-build.xml: add build.javaVersion property to allow + building Java 1.5 sources with this script, defaults to 1.4, + fix javadoc target to use any packages under the current sources + * Change the dependency on java-gcj to default-jdk (Closes: #526298) + * Support optional source folders + * Use maven-repo-helper to clean and include the pom information + into the META-INF folder, as Maven does + * Add support for running Maven plugins without using the full Maven + program. Great for building core Maven plugins used in the Maven + build itself. + * Add Recommends on libmaven2-core-java and maven-repo-helper as those + are used in optional parts of maven-build.xml + + -- Ludovic Claude Mon, 30 Mar 2009 18:11:32 +0100 + +maven-ant-helper (4) experimental; urgency=low + + * Update modello ant task to support the new modello package. + * Add myself to Uploaders. + * Add Homepage and Vcs headers in debian/control. + * Bump up Standards-Version: 3.8.0. + * Do no longer quote the full text of the Apache license in + debian/copyright. + * Add a copyright statement. + + -- Torsten Werner Wed, 07 Jan 2009 20:07:51 +0100 + +maven-ant-helper (3) unstable; urgency=low + + * Changed "Depends: libmodello-java" to a "Recommends". + - Some clients may not use the Modello Ant task. + + -- Paul Cager Fri, 15 Jun 2007 21:53:48 +0100 + +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 Wed, 13 Jun 2007 11:03:27 +0100 + +maven-ant-helper (1.0) unstable; urgency=low + + * Initial Release to pkg-java project. + + -- Trygve Laugstol Sun, 27 May 2007 03:30:35 +0200 diff --git a/debian-orig/control b/debian-orig/control new file mode 100644 index 0000000..1f63468 --- /dev/null +++ b/debian-orig/control @@ -0,0 +1,42 @@ +Source: maven-ant-helper +Section: java +Priority: optional +Maintainer: Debian Java Maintainers +Uploaders: + Torsten Werner , + Ludovic Claude +Build-Depends: + ant, + ant-contrib, + ant-optional, + debhelper-compat (= 13), + default-jdk +Standards-Version: 4.5.1 +Rules-Requires-Root: no +Vcs-Git: https://salsa.debian.org/java-team/maven-ant-helper.git +Vcs-Browser: https://salsa.debian.org/java-team/maven-ant-helper +Homepage: https://salsa.debian.org/java-team/maven-ant-helper + +Package: maven-ant-helper +Architecture: all +Depends: + ant, + ant-contrib, + ant-optional, + libstax-java, + maven-repo-helper (>= 1.4), + ${misc:Depends} +Suggests: + default-jdk-doc, + libmaven-plugin-tools-java, + libmaven3-core-java, + libmodello-java (>= 1.0), + libplexus-component-metadata-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. + . + maven-build.xml attempts to reproduce the Maven build life-cycle. + You can use it to build your jar or javadoc. If you have libmaven2-core-java + installed, you can even use it to launch some Maven plugins to generate + some code. diff --git a/debian-orig/copyright b/debian-orig/copyright new file mode 100644 index 0000000..29770cb --- /dev/null +++ b/debian-orig/copyright @@ -0,0 +1,22 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: https://salsa.debian.org/java-team/maven-ant-helper + +Files: * +Copyright: 2007 Trygve Laugstøl +License: Apache-2.0 + +License: Apache-2.0 + 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. + . + The full text of the license can be found in + `/usr/share/common-licenses/Apache-2.0'. diff --git a/debian-orig/dirs b/debian-orig/dirs new file mode 100644 index 0000000..adf371d --- /dev/null +++ b/debian-orig/dirs @@ -0,0 +1 @@ +usr/share/maven-ant-helper diff --git a/debian-orig/docs b/debian-orig/docs new file mode 100644 index 0000000..df6f1f3 --- /dev/null +++ b/debian-orig/docs @@ -0,0 +1 @@ +debian/README diff --git a/debian-orig/rules b/debian-orig/rules new file mode 100755 index 0000000..03b704d --- /dev/null +++ b/debian-orig/rules @@ -0,0 +1,21 @@ +#!/usr/bin/make -f + +include /usr/share/dpkg/pkg-info.mk + +%: + dh $@ --buildsystem=ant + +override_dh_auto_build: + dh_auto_build -- -f debian/build.xml -DartifactId=$(DEB_SOURCE) -Dpackage=$(DEB_SOURCE) -Dversion=$(DEB_VERSION) -propertyfile debian/build.properties package + +override_dh_auto_clean: + dh_auto_clean -- -f debian/build.xml -propertyfile debian/build.properties + +override_dh_auto_install: + dh_install build/$(DEB_SOURCE)-$(DEB_VERSION).jar usr/share/java + dh_link usr/share/java/$(DEB_SOURCE)-$(DEB_VERSION).jar usr/share/java/$(DEB_SOURCE).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 + dh_install manifest.mf usr/share/maven-ant-helper + dh_install bootstrap usr/share/maven-ant-helper diff --git a/debian-orig/source/format b/debian-orig/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian-orig/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/manifest.mf b/manifest.mf new file mode 100644 index 0000000..59499bc --- /dev/null +++ b/manifest.mf @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/maven-build.xml b/maven-build.xml new file mode 100644 index 0000000..9651f3b --- /dev/null +++ b/maven-build.xml @@ -0,0 +1,526 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 4.0.0 + ${groupId} + ${artifactId} + ${version} + + + + + + + + + + + + + + + + + + + diff --git a/maven-defaults.properties b/maven-defaults.properties new file mode 100644 index 0000000..6687a01 --- /dev/null +++ b/maven-defaults.properties @@ -0,0 +1,21 @@ +# Set the default Maven locations. +# See http://maven.apache.org/ref/current/maven-model/maven.html for names +build.sourceDirectory=src/main/java +build.testSourceDirectory=src/test/java +build.resourcesDirectory=src/main/resources +build.testResourcesDirectory=src/test/resources + +build.directory=build +build.outputDirectory=${build.directory}/classes +build.testOutputDirectory=${build.directory}/test-classes +build.javaVersion=1.5 +javadoc.dir=${build.directory}/docs/api +classpath.compile= +classpath.test= +classpath.full.compile=${build.outputDirectory}:${classpath.compile} +classpath.full.test=${build.testOutputDirectory}:${classpath.test}:${build.outputDirectory}:${classpath.compile} +manifest=/usr/share/maven-ant-helper/manifest.mf + +# To skip tests, set this property to true +#maven.test.skip=true +maven.test.excludes= diff --git a/src/main/java/ModelloTask.java b/src/main/java/ModelloTask.java new file mode 100644 index 0000000..887282e --- /dev/null +++ b/src/main/java/ModelloTask.java @@ -0,0 +1,142 @@ +import java.lang.reflect.*; +import java.io.*; +import java.net.*; +import java.util.*; +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; + private String output; + private String version; + private boolean packageWithVersion; + private boolean useJava5; + private String encoding = "UTF-8"; + private List classpath = new ArrayList(); + + public void execute() throws BuildException { + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + + try + { + work(); + } + catch( Exception e ) + { + // Temporary logging - until it's all working. + System.err.println("Exception: " + e); + e.printStackTrace(); + throw new BuildException( "Error while invoking Modello", e ); + } + finally + { + Thread.currentThread().setContextClassLoader( cl ); + } + } + + private void addToClassPath(String jar) throws Exception { + if (! new File(jar).exists()) { + System.err.println("Cannot find file " + jar); + System.exit(1); + } + classpath.add(new URL( "file:" + jar)); + } + + private URL[] getClassPath() { + return (URL[]) classpath.toArray(new URL[classpath.size()]); + } + + private void work() throws Exception { + log( "Running the '" + plugin + "' Modello plugin using model file " + model + " for version " + version ); + + addToClassPath("/usr/share/java/plexus-build-api.jar"); + addToClassPath("/usr/share/java/plexus-utils2.jar"); + addToClassPath("/usr/share/java/plexus-classworlds.jar"); + addToClassPath("/usr/share/java/plexus-container-default.jar"); + addToClassPath("/usr/share/java/modello-core.jar"); + addToClassPath("/usr/share/java/modello-plugin-converters.jar"); + addToClassPath("/usr/share/java/modello-plugin-dom4j.jar"); + addToClassPath("/usr/share/java/modello-plugin-java.jar"); + addToClassPath("/usr/share/java/modello-plugin-jdom.jar"); + // new URL( "file:/usr/share/java/modello-plugin-jpox.jar"); + // new URL( "file:/usr/share/java/modello-plugin-plexus-registry.jar"); + addToClassPath("/usr/share/java/modello-plugin-stax.jar"); + // new URL( "file:/usr/share/java/modello-plugin-store.jar"); + addToClassPath("/usr/share/java/modello-plugin-xdoc.jar"); + addToClassPath("/usr/share/java/modello-plugin-xml.jar"); + addToClassPath("/usr/share/java/modello-plugin-xpp3.jar"); + addToClassPath("/usr/share/java/modello-plugin-xsd.jar"); + addToClassPath("/usr/share/java/guava.jar"); + addToClassPath("/usr/share/java/xbean-reflect.jar"); + + ClassLoader cl = new URLClassLoader( getClassPath() ); + + Thread.currentThread().setContextClassLoader( cl ); + + String[] args = new String[]{ + new File( getProject().getBaseDir(), model ).getAbsolutePath(), + plugin, + output, + version, + Boolean.toString( packageWithVersion ), + Boolean.toString( useJava5 ), + encoding}; + + try { + Class modelloCli = cl.loadClass( "org.codehaus.modello.ModelloCli" ); + Method main = modelloCli.getMethod( "main", new Class[] { String[].class } ); + main.invoke( null, new Object[] { args } ); + } catch (Error e) { + e.printStackTrace(); + throw e; + } catch (RuntimeException e) { + e.printStackTrace(); + throw e; + } + } + + public void setModel( String model ) { + this.model = model; + } + + public void setPlugin( String plugin ) { + this.plugin = plugin; + } + + public void setOutput( String output ) { + this.output = output; + } + + public void setVersion( String version ) { + this.version = version; + } + + public void setPackageWithVersion( boolean packageWithVersion ) { + this.packageWithVersion = packageWithVersion; + } + + public void setUseJava5( boolean useJava5 ) { + this.useJava5 = useJava5; + } + + public void setEncoding( String encoding ) { + this.encoding = encoding; + } + +}