Import Upstream version 8.6
This commit is contained in:
commit
ce389ef4ce
|
@ -0,0 +1,414 @@
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you 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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Minimum version of the Maven components used only for bootstraping
|
||||||
|
the Maven build -->
|
||||||
|
|
||||||
|
<component-set>
|
||||||
|
<components>
|
||||||
|
<component>
|
||||||
|
<role>org.apache.maven.plugin.PluginManager</role>
|
||||||
|
<implementation>org.apache.maven.plugin.DefaultPluginManager</implementation>
|
||||||
|
<requirements>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.project.path.PathTranslator</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.plugin.MavenPluginCollector</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.plugin.version.PluginVersionManager</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.artifact.factory.ArtifactFactory</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.artifact.resolver.ArtifactResolver</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.artifact.metadata.ArtifactMetadataSource</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.plugin.PluginMappingManager</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.execution.RuntimeInformation</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.project.MavenProjectBuilder</role>
|
||||||
|
</requirement>
|
||||||
|
</requirements>
|
||||||
|
</component>
|
||||||
|
|
||||||
|
<component>
|
||||||
|
<role>org.apache.maven.extension.ExtensionManager</role>
|
||||||
|
<implementation>org.apache.maven.extension.DefaultExtensionManager</implementation>
|
||||||
|
<requirements>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.artifact.resolver.ArtifactResolver</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.artifact.factory.ArtifactFactory</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.artifact.metadata.ArtifactMetadataSource</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.artifact.manager.WagonManager</role>
|
||||||
|
</requirement>
|
||||||
|
</requirements>
|
||||||
|
</component>
|
||||||
|
|
||||||
|
<component>
|
||||||
|
<role>org.apache.maven.plugin.PluginMappingManager</role>
|
||||||
|
<implementation>org.apache.maven.plugin.DefaultPluginMappingManager</implementation>
|
||||||
|
<requirements>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager</role>
|
||||||
|
</requirement>
|
||||||
|
</requirements>
|
||||||
|
</component>
|
||||||
|
|
||||||
|
<!-- Duplicated from Maven core as it is used in the plugin manager -->
|
||||||
|
<component>
|
||||||
|
<role>org.apache.maven.project.path.PathTranslator</role>
|
||||||
|
<implementation>org.apache.maven.project.path.DefaultPathTranslator</implementation>
|
||||||
|
</component>
|
||||||
|
<!--
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
-->
|
||||||
|
<component>
|
||||||
|
<role>org.apache.maven.Maven</role>
|
||||||
|
<implementation>org.apache.maven.DefaultMaven</implementation>
|
||||||
|
<requirements>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.project.MavenProjectBuilder</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.lifecycle.LifecycleExecutor</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.usability.diagnostics.ErrorDiagnostics</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.execution.RuntimeInformation</role>
|
||||||
|
</requirement>
|
||||||
|
</requirements>
|
||||||
|
</component>
|
||||||
|
|
||||||
|
<component>
|
||||||
|
<role>org.apache.maven.execution.RuntimeInformation</role>
|
||||||
|
<implementation>org.apache.maven.execution.DefaultRuntimeInformation</implementation>
|
||||||
|
</component>
|
||||||
|
<!--
|
||||||
|
|
|
||||||
|
|MojoExecutionExceptionDiagnoser
|
||||||
|
|
|
||||||
|
-->
|
||||||
|
<component>
|
||||||
|
<role>org.apache.maven.usability.diagnostics.ErrorDiagnoser</role>
|
||||||
|
<role-hint>MojoExecutionExceptionDiagnoser</role-hint>
|
||||||
|
<implementation>org.apache.maven.usability.MojoExecutionExceptionDiagnoser</implementation>
|
||||||
|
</component>
|
||||||
|
<!--
|
||||||
|
|
|
||||||
|
|MojoFailureExceptionDiagnoser
|
||||||
|
|
|
||||||
|
-->
|
||||||
|
<component>
|
||||||
|
<role>org.apache.maven.usability.diagnostics.ErrorDiagnoser</role>
|
||||||
|
<role-hint>MojoFailureExceptionDiagnoser</role-hint>
|
||||||
|
<implementation>org.apache.maven.usability.MojoFailureExceptionDiagnoser</implementation>
|
||||||
|
</component>
|
||||||
|
<!--
|
||||||
|
|
|
||||||
|
|ProjectBuildDiagnoser
|
||||||
|
|
|
||||||
|
-->
|
||||||
|
<component>
|
||||||
|
<role>org.apache.maven.usability.diagnostics.ErrorDiagnoser</role>
|
||||||
|
<role-hint>ProjectBuildDiagnoser</role-hint>
|
||||||
|
<implementation>org.apache.maven.usability.ProjectBuildDiagnoser</implementation>
|
||||||
|
</component>
|
||||||
|
<!--
|
||||||
|
|
|
||||||
|
|ProfileActivationDiagnoser
|
||||||
|
|
|
||||||
|
-->
|
||||||
|
<component>
|
||||||
|
<role>org.apache.maven.usability.diagnostics.ErrorDiagnoser</role>
|
||||||
|
<role-hint>ProfileActivationDiagnoser</role-hint>
|
||||||
|
<implementation>org.apache.maven.usability.ProfileActivationDiagnoser</implementation>
|
||||||
|
</component>
|
||||||
|
<!--
|
||||||
|
|
|
||||||
|
|PluginConfigurationDiagnoser
|
||||||
|
|
|
||||||
|
-->
|
||||||
|
<component>
|
||||||
|
<role>org.apache.maven.usability.diagnostics.ErrorDiagnoser</role>
|
||||||
|
<role-hint>PluginConfigurationDiagnoser</role-hint>
|
||||||
|
<implementation>org.apache.maven.usability.PluginConfigurationDiagnoser</implementation>
|
||||||
|
</component>
|
||||||
|
<!--
|
||||||
|
|
|
||||||
|
|ArtifactNotFoundDiagnoser
|
||||||
|
|
|
||||||
|
-->
|
||||||
|
<component>
|
||||||
|
<role>org.apache.maven.usability.diagnostics.ErrorDiagnoser</role>
|
||||||
|
<role-hint>ArtifactNotFoundDiagnoser</role-hint>
|
||||||
|
<implementation>org.apache.maven.usability.ArtifactNotFoundDiagnoser</implementation>
|
||||||
|
<requirements>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.artifact.manager.WagonManager</role>
|
||||||
|
</requirement>
|
||||||
|
</requirements>
|
||||||
|
</component>
|
||||||
|
<!--
|
||||||
|
|
|
||||||
|
|ArtifactResolverDiagnoser
|
||||||
|
|
|
||||||
|
-->
|
||||||
|
<component>
|
||||||
|
<role>org.apache.maven.usability.diagnostics.ErrorDiagnoser</role>
|
||||||
|
<role-hint>ArtifactResolverDiagnoser</role-hint>
|
||||||
|
<implementation>org.apache.maven.usability.ArtifactResolverDiagnoser</implementation>
|
||||||
|
<requirements>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.artifact.manager.WagonManager</role>
|
||||||
|
</requirement>
|
||||||
|
</requirements>
|
||||||
|
</component>
|
||||||
|
<!--
|
||||||
|
|
|
||||||
|
|InvalidArtifactDiagnoser
|
||||||
|
|
|
||||||
|
-->
|
||||||
|
<component>
|
||||||
|
<role>org.apache.maven.usability.diagnostics.ErrorDiagnoser</role>
|
||||||
|
<role-hint>InvalidArtifactDiagnoser</role-hint>
|
||||||
|
<implementation>org.apache.maven.usability.InvalidArtifactDiagnoser</implementation>
|
||||||
|
</component>
|
||||||
|
|
||||||
|
<component>
|
||||||
|
<role>org.apache.maven.ConfigurationInterpolator</role>
|
||||||
|
<implementation>org.apache.maven.ReflectionConfigurationInterpolator</implementation>
|
||||||
|
<requirements>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.project.path.PathTranslator</role>
|
||||||
|
</requirement>
|
||||||
|
</requirements>
|
||||||
|
</component>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
|
||||||
|
| Lifecycle executor
|
||||||
|
|
|
||||||
|
-->
|
||||||
|
<component>
|
||||||
|
<role>org.apache.maven.lifecycle.LifecycleExecutor</role>
|
||||||
|
<implementation>org.apache.maven.lifecycle.DefaultLifecycleExecutor</implementation>
|
||||||
|
<requirements>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.plugin.PluginManager</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.extension.ExtensionManager</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.artifact.handler.manager.ArtifactHandlerManager</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.project.MavenProjectBuilder</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.project.interpolation.ModelInterpolator</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.ConfigurationInterpolator</role>
|
||||||
|
</requirement>
|
||||||
|
</requirements>
|
||||||
|
<configuration>
|
||||||
|
<lifecycles>
|
||||||
|
<lifecycle>
|
||||||
|
<id>default</id>
|
||||||
|
<!-- START SNIPPET: lifecycle -->
|
||||||
|
<phases>
|
||||||
|
<phase>validate</phase>
|
||||||
|
<phase>initialize</phase>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<phase>process-sources</phase>
|
||||||
|
<phase>generate-resources</phase>
|
||||||
|
<phase>process-resources</phase>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<phase>process-classes</phase>
|
||||||
|
<phase>generate-test-sources</phase>
|
||||||
|
<phase>process-test-sources</phase>
|
||||||
|
<phase>generate-test-resources</phase>
|
||||||
|
<phase>process-test-resources</phase>
|
||||||
|
<phase>test-compile</phase>
|
||||||
|
<phase>process-test-classes</phase>
|
||||||
|
<phase>test</phase>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<phase>package</phase>
|
||||||
|
<phase>pre-integration-test</phase>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<phase>post-integration-test</phase>
|
||||||
|
<phase>verify</phase>
|
||||||
|
<phase>install</phase>
|
||||||
|
<phase>deploy</phase>
|
||||||
|
</phases>
|
||||||
|
<!-- END SNIPPET: lifecycle -->
|
||||||
|
</lifecycle>
|
||||||
|
<lifecycle>
|
||||||
|
<id>clean</id>
|
||||||
|
<phases>
|
||||||
|
<phase>pre-clean</phase>
|
||||||
|
<phase>clean</phase>
|
||||||
|
<phase>post-clean</phase>
|
||||||
|
</phases>
|
||||||
|
<default-phases>
|
||||||
|
<clean>org.apache.maven.plugins:maven-clean-plugin:clean</clean>
|
||||||
|
</default-phases>
|
||||||
|
</lifecycle>
|
||||||
|
</lifecycles>
|
||||||
|
<!-- START SNIPPET: default-reports -->
|
||||||
|
<defaultReports>
|
||||||
|
</defaultReports>
|
||||||
|
<!-- END SNIPPET: default-reports -->
|
||||||
|
<!-- START SNIPPET: default-lifecycle -->
|
||||||
|
<!-- NOT USED, ACCORDING TO CODE.
|
||||||
|
<defaultPhases>
|
||||||
|
<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>
|
||||||
|
<compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile>
|
||||||
|
<process-test-resources>org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources>
|
||||||
|
<test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile>
|
||||||
|
<test>org.apache.maven.plugins:maven-surefire-plugin:test</test>
|
||||||
|
<package>
|
||||||
|
org.apache.maven.plugins:maven-jar-plugin:jar,
|
||||||
|
org.apache.maven.plugins:maven-source-plugin:jar
|
||||||
|
</package>
|
||||||
|
<install>org.apache.maven.plugins:maven-install-plugin:install</install>
|
||||||
|
<deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
|
||||||
|
</defaultPhases>
|
||||||
|
-->
|
||||||
|
<!-- END SNIPPET: default-lifecycle -->
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
|
|
||||||
|
<!-- TODO: issues with the lifecycle:
|
||||||
|
- manually configured lifecycles will not pick up any later additions to the defaults where they are intended to extend defaults (have configuration <includeDefaults/> ?)
|
||||||
|
-->
|
||||||
|
<component>
|
||||||
|
<role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
|
||||||
|
<role-hint>pom</role-hint>
|
||||||
|
<implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
|
||||||
|
<configuration>
|
||||||
|
<lifecycles>
|
||||||
|
<lifecycle>
|
||||||
|
<id>default</id>
|
||||||
|
<!-- START SNIPPET: pom-lifecycle -->
|
||||||
|
<phases>
|
||||||
|
<install>org.apache.maven.plugins:maven-install-plugin:install</install>
|
||||||
|
<deploy></deploy>
|
||||||
|
</phases>
|
||||||
|
<optional-mojos>
|
||||||
|
</optional-mojos>
|
||||||
|
<!-- END SNIPPET: pom-lifecycle -->
|
||||||
|
</lifecycle>
|
||||||
|
</lifecycles>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
|
|
||||||
|
<component>
|
||||||
|
<role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
|
||||||
|
<role-hint>jar</role-hint>
|
||||||
|
<implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
|
||||||
|
<configuration>
|
||||||
|
<lifecycles>
|
||||||
|
<lifecycle>
|
||||||
|
<id>default</id>
|
||||||
|
<!-- START SNIPPET: jar-lifecycle -->
|
||||||
|
<phases>
|
||||||
|
<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>
|
||||||
|
<compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile>
|
||||||
|
<process-test-resources>
|
||||||
|
org.apache.maven.plugins:maven-resources-plugin:testResources
|
||||||
|
</process-test-resources>
|
||||||
|
<test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile>
|
||||||
|
<test></test>
|
||||||
|
<package>
|
||||||
|
org.apache.maven.plugins:maven-jar-plugin:jar
|
||||||
|
</package>
|
||||||
|
<install>org.apache.maven.plugins:maven-install-plugin:install</install>
|
||||||
|
<deploy></deploy>
|
||||||
|
</phases>
|
||||||
|
<!-- END SNIPPET: jar-lifecycle -->
|
||||||
|
</lifecycle>
|
||||||
|
</lifecycles>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
|
|
||||||
|
<component>
|
||||||
|
<role>org.apache.maven.plugin.version.PluginVersionManager</role>
|
||||||
|
<role-hint>default</role-hint>
|
||||||
|
<implementation>org.apache.maven.plugin.version.DefaultPluginVersionManager</implementation>
|
||||||
|
<instantiation-strategy>per-lookup</instantiation-strategy>
|
||||||
|
<requirements>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.artifact.metadata.ArtifactMetadataSource</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.plugin.registry.MavenPluginRegistryBuilder</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.artifact.factory.ArtifactFactory</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.codehaus.plexus.components.interactivity.InputHandler</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.project.MavenProjectBuilder</role>
|
||||||
|
</requirement>
|
||||||
|
<requirement>
|
||||||
|
<role>org.apache.maven.execution.RuntimeInformation</role>
|
||||||
|
</requirement>
|
||||||
|
</requirements>
|
||||||
|
</component>
|
||||||
|
|
||||||
|
<component>
|
||||||
|
<role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>
|
||||||
|
<role-hint>maven</role-hint>
|
||||||
|
<implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>
|
||||||
|
<description>Maven Security dispatcher</description>
|
||||||
|
<requirements>
|
||||||
|
<requirement>
|
||||||
|
<role>org.sonatype.plexus.components.cipher.PlexusCipher</role>
|
||||||
|
<field-name>_cipher</field-name>
|
||||||
|
</requirement>
|
||||||
|
</requirements>
|
||||||
|
<configuration>
|
||||||
|
<_configuration-file>~/.m2/settings-security.xml</_configuration-file>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
|
</components>
|
||||||
|
</component-set>
|
|
@ -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 <trygvis@inamo.no> Sun, 27 May 2007 03:30:35 +0200
|
||||||
|
-- Paul Cager <paul-debian@home.paulcager.org> Wed, 13 Jun 2007 11:03:27 +0100
|
|
@ -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=
|
|
@ -0,0 +1,60 @@
|
||||||
|
<?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"
|
||||||
|
encoding="ISO-8859-1"
|
||||||
|
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>
|
|
@ -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 <jspricke@debian.org> 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 <ebourg@apache.org> 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 <ebourg@apache.org> 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 <ebourg@apache.org> 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 <ebourg@apache.org> 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 <ebourg@apache.org> 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 <ebourg@apache.org> 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 <ebourg@apache.org> 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 <ebourg@apache.org> 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 <ebourg@apache.org> 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 <ebourg@apache.org> 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 <ebourg@apache.org> 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 <ludovic.claude@laposte.net> 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 <drazzib@debian.org> 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 <ludovic.claude@laposte.net> 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 <twerner@debian.org> 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 <drazzib@debian.org> Sun, 26 Jun 2011 19:14:05 +0200
|
||||||
|
|
||||||
|
maven-ant-helper (7.2) unstable; urgency=low
|
||||||
|
|
||||||
|
* Upload to unstable.
|
||||||
|
|
||||||
|
-- Torsten Werner <twerner@debian.org> 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 <drazzib@debian.org> 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 <ludovic.claude@laposte.net> 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 <ludovic.claude@laposte.net> Sun, 28 Mar 2010 21:55:57 +0200
|
||||||
|
|
||||||
|
maven-ant-helper (6.7) unstable; urgency=low
|
||||||
|
|
||||||
|
* Do no longer <gunzip/> the package-list file from openjdk-6-doc.
|
||||||
|
(Closes: #573660)
|
||||||
|
|
||||||
|
-- Torsten Werner <twerner@debian.org> 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 <ludovic.claude@laposte.net> 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 <twerner@debian.org> Sun, 23 Aug 2009 10:13:54 +0200
|
||||||
|
|
||||||
|
maven-ant-helper (6.4) unstable; urgency=low
|
||||||
|
|
||||||
|
* Upload to unstable.
|
||||||
|
|
||||||
|
-- Torsten Werner <twerner@debian.org> 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 <ludovic.claude@laposte.net> 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 <ludovic.claude@laposte.net> 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 <ludovic.claude@laposte.net> Tue, 07 Jul 2009 22:46:18 +0100
|
||||||
|
|
||||||
|
maven-ant-helper (6) unstable; urgency=low
|
||||||
|
|
||||||
|
* Add support for custom manifest
|
||||||
|
|
||||||
|
-- Ludovic Claude <ludovic.claude@laposte.net> 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 <ludovic.claude@laposte.net> 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 <twerner@debian.org> 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 <paul-debian@home.paulcager.org> 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 <paul-debian@home.paulcager.org> Wed, 13 Jun 2007 11:03:27 +0100
|
||||||
|
|
||||||
|
maven-ant-helper (1.0) unstable; urgency=low
|
||||||
|
|
||||||
|
* Initial Release to pkg-java project.
|
||||||
|
|
||||||
|
-- Trygve Laugstol <trygvis@inamo.no> Sun, 27 May 2007 03:30:35 +0200
|
|
@ -0,0 +1,42 @@
|
||||||
|
Source: maven-ant-helper
|
||||||
|
Section: java
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
|
||||||
|
Uploaders:
|
||||||
|
Torsten Werner <twerner@debian.org>,
|
||||||
|
Ludovic Claude <ludovic.claude@laposte.net>
|
||||||
|
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.
|
|
@ -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 <trygvis@inamo.no>
|
||||||
|
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'.
|
|
@ -0,0 +1 @@
|
||||||
|
usr/share/maven-ant-helper
|
|
@ -0,0 +1 @@
|
||||||
|
debian/README
|
|
@ -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
|
|
@ -0,0 +1 @@
|
||||||
|
3.0 (native)
|
|
@ -0,0 +1,2 @@
|
||||||
|
Manifest-Version: 1.0
|
||||||
|
|
|
@ -0,0 +1,526 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<project name="pkg-java" default="build-all" basedir="." xmlns:c="antlib:net.sf.antcontrib">
|
||||||
|
<taskdef uri="antlib:net.sf.antcontrib"
|
||||||
|
resource="net/sf/antcontrib/antlib.xml"
|
||||||
|
classpath="/usr/share/java/ant-contrib.jar"/>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
maven-build.xml - an Ant build script that reproduces the Maven build life-cycle.
|
||||||
|
|
||||||
|
You can use the following properties when launching this script:
|
||||||
|
|
||||||
|
basedir: you need to supply the basedir, otherwise Ant will use the current location of this script,
|
||||||
|
which is not what you want. For example, use:
|
||||||
|
DEB_ANT_ARGS := -Dpackage=$(realpath .)
|
||||||
|
package: the name of the source package. For example, use:
|
||||||
|
DEB_ANT_ARGS := -Dversion=$(DEB_SOURCE_PACKAGE)
|
||||||
|
bin.package: the name of the binary package. Defaults to lib${package}-java
|
||||||
|
version: DEPRECATED - the version of the project, used in the name of the jar.
|
||||||
|
debian.dir: the location of the debian directory. Defaults to ${basedir}/debian
|
||||||
|
project.dir: the location of the current project. Defaults to ""
|
||||||
|
pom.name: the name of the pom file. Must appear as it is in the debian/${bin.package}.poms file
|
||||||
|
pom.file: the location of the pom file. Defaults to ${pom.name}
|
||||||
|
maven.generate.target: if set, calls Maven with the given target before compiling code. For example, use
|
||||||
|
maven.generate.target = plugin:generate to generate the plugin descriptor for a Maven plugin.
|
||||||
|
maven.generate.target2: if set, calls Maven with another given target before compiling code. For example, use
|
||||||
|
maven.generate.target2 = org.codehaus.plexus:plexus-component-metadata:${plexus-component-metadata.version}:generate-metadata
|
||||||
|
to generate the Plexus components descriptor.
|
||||||
|
maven.process-classes.target: if set, calls Maven with the given target after compiling the code. For example, use
|
||||||
|
maven.process-classes.target = plugin:generate to generate the plugin descriptor for a Maven plugin using annotations.
|
||||||
|
maven.package.target: if set, calls Maven with the given target after packaging the jar. For example, use
|
||||||
|
maven.target.target = shade:shade to use the shade plugin and repackage the contents of the jar.
|
||||||
|
keep-cleaned-pom: if set, keeps the cleaned pom after packaging. If can be restored later by calling
|
||||||
|
maven-build.xml with the restore-pom target (without the keep-cleaned-pom property set).
|
||||||
|
use-local-repo: if set, then Maven will use a local repository copied from /usr/share/maven-repo into
|
||||||
|
debian/.mh. This allows you to install some custom or intermediate artifacts, handy for multi modules builds.
|
||||||
|
dependency, dependency2, dependency3...: Give the name of the dependent packages. Those packages will be
|
||||||
|
used to form the links to the Javadoc APIs from the generated Javadoc.
|
||||||
|
The links are of the form: file:///usr/share/doc/${dependency}/api
|
||||||
|
Up to 15 dependencies can be defined here. Example use:
|
||||||
|
dependency=libcommons-lang-java
|
||||||
|
dependency2=libcommons-logging-java
|
||||||
|
javadoc.generate: if set, the default target (build-all) will build the project and generate the Javadoc
|
||||||
|
|
||||||
|
The properties can be defined also in debian/build.properties, and they will override properties
|
||||||
|
defined in /usr/share/maven-ant-helper/maven-defaults.properties.
|
||||||
|
|
||||||
|
If you provide a pom file to your project, or the project already contains a pom file,
|
||||||
|
then it will be read. You need to add /usr/share/java/ant-nodeps.jar to the classpath
|
||||||
|
for this functionality to work.
|
||||||
|
|
||||||
|
When using the Maven target, you need to add libmaven3-core-java to Build-Depends, as well as the
|
||||||
|
library containing the Maven plugin to execute (libmaven-plugin-tools-java for plugin:generate,
|
||||||
|
libplexus-component-metadata-java for org.codehaus.plexus:plexus-component-metadata:generate-metadata)
|
||||||
|
-->
|
||||||
|
|
||||||
|
<property name="bin.package" value="lib${package}-java" />
|
||||||
|
<property name="debian.dir" value="${basedir}/debian" />
|
||||||
|
<property name="project.dir" value="" />
|
||||||
|
<property name="debian.poms" value="${debian.dir}/${bin.package}.poms" />
|
||||||
|
<property file="${debian.dir}/build.properties"/>
|
||||||
|
<property file="/usr/share/maven-ant-helper/maven-defaults.properties"/>
|
||||||
|
<property name="xml-input-factory" value="com.bea.xml.stream.MXParserFactory" />
|
||||||
|
<property name="xml-output-factory" value="com.bea.xml.stream.XMLOutputFactoryBase" />
|
||||||
|
|
||||||
|
<target name="init.pom">
|
||||||
|
<condition property="use-local-repo" value="true">
|
||||||
|
<isset property="maven.package.target" />
|
||||||
|
</condition>
|
||||||
|
<condition property="pom.file" value="pom.xml">
|
||||||
|
<not>
|
||||||
|
<isset property="pom.name" />
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
<condition property="pom.name" value="pom.xml" else="${project.dir}/pom.xml">
|
||||||
|
<equals arg1="" arg2="${project.dir}" />
|
||||||
|
</condition>
|
||||||
|
<property name="pom.file" value="${pom.name}" />
|
||||||
|
<condition property="available.pom">
|
||||||
|
<and>
|
||||||
|
<available file="${debian.poms}"/>
|
||||||
|
<available file="${pom.file}"/>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
|
||||||
|
<echo message="Base dir is ${basedir}" />
|
||||||
|
<echo message="Pom name in ${debian.poms}: ${pom.name}" />
|
||||||
|
<echo message="Pom file ${pom.file} available? ${available.pom}" />
|
||||||
|
|
||||||
|
<path id="repo-helper.classpath">
|
||||||
|
<fileset dir="/usr/share/maven-repo">
|
||||||
|
<include name="org/debian/maven/maven-repo-helper/debian/maven-repo-helper-debian.jar" />
|
||||||
|
<include name="stax/stax-api/debian/stax-api-debian.jar" />
|
||||||
|
<include name="stax/stax/debian/stax-debian.jar" />
|
||||||
|
<include name="xml-apis/xml-apis/debian/xml-apis-debian.jar" />
|
||||||
|
</fileset>
|
||||||
|
</path>
|
||||||
|
|
||||||
|
<path id="maven.classpath">
|
||||||
|
<pathelement location="/usr/share/maven-ant-helper/bootstrap"/>
|
||||||
|
<fileset dir="/usr/share/java">
|
||||||
|
<include name="plexus-classworlds.jar"/>
|
||||||
|
<include name="aopalliance.jar"/>
|
||||||
|
<include name="cdi-api.jar"/>
|
||||||
|
<include name="commons-cli.jar"/>
|
||||||
|
<include name="commons-io.jar"/>
|
||||||
|
<include name="commons-lang3.jar"/>
|
||||||
|
<include name="geronimo-annotation-1.3-spec.jar"/>
|
||||||
|
<include name="guava.jar"/>
|
||||||
|
<include name="guice-no-aop.jar"/>
|
||||||
|
<include name="jansi.jar"/>
|
||||||
|
<include name="atinject-jsr330-api-1.0.jar"/>
|
||||||
|
<include name="jcl-over-slf4j.jar"/>
|
||||||
|
<include name="maven3-artifact.jar"/>
|
||||||
|
<include name="maven3-builder-support.jar"/>
|
||||||
|
<include name="maven3-compat.jar"/>
|
||||||
|
<include name="maven3-core.jar"/>
|
||||||
|
<include name="maven3-embedder.jar"/>
|
||||||
|
<include name="maven3-model.jar"/>
|
||||||
|
<include name="maven3-model-builder.jar"/>
|
||||||
|
<include name="maven3-plugin-api.jar"/>
|
||||||
|
<include name="maven3-repository-metadata.jar"/>
|
||||||
|
<include name="maven-resolver-api.jar"/>
|
||||||
|
<include name="maven-resolver-connector-basic.jar"/>
|
||||||
|
<include name="maven-resolver-impl.jar"/>
|
||||||
|
<include name="maven3-resolver-provider.jar"/>
|
||||||
|
<include name="maven-resolver-spi.jar"/>
|
||||||
|
<include name="maven-resolver-transport-wagon.jar"/>
|
||||||
|
<include name="maven-resolver-util.jar"/>
|
||||||
|
<include name="maven3-settings.jar"/>
|
||||||
|
<include name="maven3-settings-builder.jar"/>
|
||||||
|
<include name="maven-shared-utils.jar"/>
|
||||||
|
<include name="maven3-slf4j-provider.jar"/>
|
||||||
|
<include name="plexus-cipher.jar"/>
|
||||||
|
<include name="plexus-component-annotations.jar"/>
|
||||||
|
<include name="plexus-interpolation.jar"/>
|
||||||
|
<include name="plexus-sec-dispatcher.jar"/>
|
||||||
|
<include name="plexus-utils2.jar"/>
|
||||||
|
<include name="sisu-inject.jar"/>
|
||||||
|
<include name="sisu-plexus.jar"/>
|
||||||
|
<include name="slf4j-api.jar"/>
|
||||||
|
<include name="wagon-file.jar"/>
|
||||||
|
<include name="wagon-http-shaded.jar"/>
|
||||||
|
<include name="wagon-provider-api.jar"/>
|
||||||
|
</fileset>
|
||||||
|
</path>
|
||||||
|
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!-- /usr/share/java/ant-nodeps.jar must be in the classpath -->
|
||||||
|
<target name="read.pom" depends="init.pom" if="available.pom">
|
||||||
|
|
||||||
|
<loadfile srcfile="${debian.poms}" property="cleaner.options">
|
||||||
|
<filterchain>
|
||||||
|
<linecontainsregexp>
|
||||||
|
<regexp pattern="^${pom.name}" />
|
||||||
|
</linecontainsregexp>
|
||||||
|
<tokenfilter>
|
||||||
|
<containsregex
|
||||||
|
pattern="[^ ]*(.*)"
|
||||||
|
replace="\1"/>
|
||||||
|
</tokenfilter>
|
||||||
|
<striplinebreaks/>
|
||||||
|
</filterchain>
|
||||||
|
</loadfile>
|
||||||
|
<!-- Default value -->
|
||||||
|
<condition property="cleaner.options" value="">
|
||||||
|
<not>
|
||||||
|
<isset property="cleaner.options"/>
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
|
||||||
|
<mkdir dir="${debian.dir}/.mh" />
|
||||||
|
<delete>
|
||||||
|
<fileset dir="${debian.dir}/.mh">
|
||||||
|
<include name="pom.xml" />
|
||||||
|
<include name="pom.properties" />
|
||||||
|
</fileset>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<property name="pom.loc" location="${pom.file}" />
|
||||||
|
<c:if>
|
||||||
|
<not><equals arg1="pom.xml" arg2="${pom.name}"/></not>
|
||||||
|
<then>
|
||||||
|
<c:var name="cleaner.options" value="${cleaner.options} --keep-parent-version" />
|
||||||
|
</then>
|
||||||
|
</c:if>
|
||||||
|
<echo message="Cleaner options:${cleaner.options}" />
|
||||||
|
|
||||||
|
<java fork="true" dir="."
|
||||||
|
classname="org.debian.maven.repo.POMCleaner">
|
||||||
|
<classpath refid="repo-helper.classpath"/>
|
||||||
|
<sysproperty key="javax.xml.stream.XMLInputFactory" value="${xml-input-factory}" />
|
||||||
|
<sysproperty key="javax.xml.stream.XMLOutputFactory" value="${xml-output-factory}" />
|
||||||
|
<arg value="-p${bin.package}" />
|
||||||
|
<arg value="-r${debian.dir}/maven.rules" />
|
||||||
|
<arg value="-i${debian.dir}/maven.publishedRules" />
|
||||||
|
<arg value="--maven-repo=${debian.dir}/.mh/maven-repo" />
|
||||||
|
<arg value="--verbose" />
|
||||||
|
<arg line="${cleaner.options} --keep-pom-version" />
|
||||||
|
<arg value="${pom.loc}" />
|
||||||
|
<arg value="${debian.dir}/.mh/pom.xml" />
|
||||||
|
<arg value="${debian.dir}/.mh/pom.properties" />
|
||||||
|
</java>
|
||||||
|
<copy file="${pom.file}" tofile="${pom.file}.save" />
|
||||||
|
<!-- force the pom file to be located in the current dir, we'll need it when running Maven plugins -->
|
||||||
|
<copy file="${debian.dir}/.mh/pom.xml" tofile="${pom.file}" overwrite="true" />
|
||||||
|
|
||||||
|
<!-- Read groupId, artifactId, version from the POM file -->
|
||||||
|
<c:var name="groupId" unset="true" />
|
||||||
|
<c:var name="artifactId" unset="true" />
|
||||||
|
<c:var name="version" unset="true" />
|
||||||
|
<c:var name="debianVersion" unset="true" />
|
||||||
|
<c:var name="classifier" unset="true" />
|
||||||
|
<c:var name="type" unset="true" />
|
||||||
|
<property file="${debian.dir}/.mh/pom.properties"/>
|
||||||
|
|
||||||
|
<pathconvert property="groupPath">
|
||||||
|
<path location="${groupId}"/>
|
||||||
|
<mapper>
|
||||||
|
<chainedmapper>
|
||||||
|
<globmapper from="${basedir}/*" to="*" />
|
||||||
|
<unpackagemapper from="*" to="*"/>
|
||||||
|
</chainedmapper>
|
||||||
|
</mapper>
|
||||||
|
</pathconvert>
|
||||||
|
|
||||||
|
<echo message="Properties read from the POM file:" />
|
||||||
|
<echo message=" groupId: ${groupId}, artifactId: ${artifactId}, version: ${version}, debianVersion: ${debianVersion}" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="init" depends="read.pom">
|
||||||
|
<available property="available.sources" file="${build.sourceDirectory}"/>
|
||||||
|
<available property="available.resources" file="${build.resourcesDirectory}"/>
|
||||||
|
<available property="available.testResources" file="${build.testResourcesDirectory}"/>
|
||||||
|
<available property="available.testSources" file="${build.testSourceDirectory}"/>
|
||||||
|
|
||||||
|
<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}"/>
|
||||||
|
<delete dir="${debian.dir}/.mh"/>
|
||||||
|
</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="${build.resourcesDirectory}"/>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="process-pom" depends="init" if="available.pom">
|
||||||
|
<mkdir dir="${build.outputDirectory}/META-INF/maven/${groupId}/${artifactId}"/>
|
||||||
|
<copy todir="${build.outputDirectory}/META-INF/maven/${groupId}/${artifactId}">
|
||||||
|
<fileset dir="${debian.dir}/.mh">
|
||||||
|
<include name="pom.xml" />
|
||||||
|
<include name="pom.properties" />
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<macrodef name="run-maven">
|
||||||
|
<attribute name="target"/>
|
||||||
|
<sequential>
|
||||||
|
<java fork="true" dir="." classname="org.apache.maven.cli.MavenCli" failonerror="true">
|
||||||
|
<jvmarg value="-Dmaven.multiModuleProjectDirectory=."/>
|
||||||
|
<jvmarg value="-Xmx256M"/>
|
||||||
|
<classpath refid="maven.classpath"/>
|
||||||
|
<arg value="-Dmaven.compiler.source=${build.javaVersion}"/>
|
||||||
|
<arg value="-Dmaven.compiler.target=${build.javaVersion}"/>
|
||||||
|
<arg value="-Dmaven.plugin.skipErrorNoDescriptorsFound=true"/>
|
||||||
|
<arg value="-Dmaven.test.skip"/>
|
||||||
|
<arg value="--offline"/>
|
||||||
|
<arg value="-e"/>
|
||||||
|
<arg value="-B"/>
|
||||||
|
<arg value="-N"/>
|
||||||
|
<arg value="-s${debian.dir}/maven-settings.xml"/>
|
||||||
|
<arg value="@{target}"/>
|
||||||
|
</java>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
|
||||||
|
<macrodef name="run-maven-local-repo">
|
||||||
|
<attribute name="target"/>
|
||||||
|
<element name="before-maven" optional="true" />
|
||||||
|
<sequential>
|
||||||
|
<mkdir dir="${debian.dir}/.mh/maven-repo" />
|
||||||
|
<copy todir="${debian.dir}/.mh/maven-repo">
|
||||||
|
<fileset dir="/usr/share/maven-repo" />
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
<before-maven/>
|
||||||
|
|
||||||
|
<java fork="true" dir="." classname="org.apache.maven.cli.MavenCli" failonerror="true">
|
||||||
|
<jvmarg value="-Dmaven.multiModuleProjectDirectory=."/>
|
||||||
|
<jvmarg value="-Xmx256M"/>
|
||||||
|
<classpath refid="maven.classpath"/>
|
||||||
|
<arg value="-Dmaven.compiler.source=${build.javaVersion}"/>
|
||||||
|
<arg value="-Dmaven.compiler.target=${build.javaVersion}"/>
|
||||||
|
<arg value="-Dmaven.plugin.skipErrorNoDescriptorsFound=true"/>
|
||||||
|
<arg value="-Dmaven.test.skip"/>
|
||||||
|
<arg value="--offline"/>
|
||||||
|
<arg value="-e"/>
|
||||||
|
<arg value="-B"/>
|
||||||
|
<arg value="-N"/>
|
||||||
|
<arg value="-Dmaven.repo.local=${debian.dir}/.mh/maven-repo"/>
|
||||||
|
<arg value="@{target}"/>
|
||||||
|
</java>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
|
||||||
|
<target name="mvn-shared-repo" unless="use-local-repo">
|
||||||
|
<!-- Calls mvn ${maven.generate.target} -->
|
||||||
|
<run-maven target="${_target}" />
|
||||||
|
</target>
|
||||||
|
<target name="mvn-local-repo" if="use-local-repo">
|
||||||
|
<!-- Calls mvn ${maven.generate.target} -->
|
||||||
|
<run-maven-local-repo target="${_target}" />
|
||||||
|
</target>
|
||||||
|
<target name="mvn" depends="mvn-shared-repo,mvn-local-repo" />
|
||||||
|
|
||||||
|
<target name="mvn-generate" depends="init" if="maven.generate.target">
|
||||||
|
<antcall target="mvn" inheritRefs="true">
|
||||||
|
<param name="_target" value="${maven.generate.target}" />
|
||||||
|
</antcall>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="mvn-generate2" depends="init" if="maven.generate.target2">
|
||||||
|
<antcall target="mvn" inheritRefs="true">
|
||||||
|
<param name="_target" value="${maven.generate.target2}" />
|
||||||
|
</antcall>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="compile" depends="process-resources,process-pom,mvn-generate,mvn-generate2" if="available.sources">
|
||||||
|
<mkdir dir="${build.outputDirectory}"/>
|
||||||
|
<mkdir dir="${build.directory}/generated-sources"/>
|
||||||
|
<javac
|
||||||
|
destdir="${build.outputDirectory}"
|
||||||
|
classpath="${classpath.compile}"
|
||||||
|
nowarn="true"
|
||||||
|
source="${build.javaVersion}" target="${build.javaVersion}"
|
||||||
|
debug="on">
|
||||||
|
<src path="${build.sourceDirectory}"/>
|
||||||
|
<src path="${build.directory}/generated-sources"/>
|
||||||
|
</javac>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="process-classes" depends="compile" if="maven.process-classes.target">
|
||||||
|
<echo message="Processing compiled classes with ${maven.process-classes.target}..."/>
|
||||||
|
<antcall target="mvn" inheritRefs="true">
|
||||||
|
<param name="_target" value="${maven.process-classes.target}" />
|
||||||
|
</antcall>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="process-test-resources" depends="process-classes" if="available.testResources" unless="maven.test.skip">
|
||||||
|
<mkdir dir="${build.testOutputDirectory}"/>
|
||||||
|
<copy todir="${build.testOutputDirectory}">
|
||||||
|
<fileset dir="${build.testResourcesDirectory}">
|
||||||
|
<exclude name="**/*.java" />
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="test-compile" depends="process-test-resources" if="available.testSources" unless="maven.test.skip">
|
||||||
|
<mkdir dir="${build.testOutputDirectory}"/>
|
||||||
|
<javac
|
||||||
|
destdir="${build.testOutputDirectory}"
|
||||||
|
classpath="${classpath.full.test}"
|
||||||
|
nowarn="true"
|
||||||
|
source="${build.javaVersion}" target="${build.javaVersion}"
|
||||||
|
debug="on">
|
||||||
|
<src path="${build.testSourceDirectory}"/>
|
||||||
|
</javac>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="test" depends="test-compile" if="available.testSources" unless="maven.test.skip">
|
||||||
|
<mkdir dir="${build.directory}/test-output"/>
|
||||||
|
<junit printsummary="yes" haltonfailure="no"> <!-- fork="yes" forkmode="once" -->
|
||||||
|
<sysproperty key="basedir" value="${basedir}"/>
|
||||||
|
<classpath>
|
||||||
|
<pathelement path="${classpath.full.test}"/>
|
||||||
|
</classpath>
|
||||||
|
|
||||||
|
<formatter type="plain"/>
|
||||||
|
<batchtest todir="${build.directory}/test-output">
|
||||||
|
<fileset dir="${build.testSourceDirectory}">
|
||||||
|
<include name="**/*Test.java"/>
|
||||||
|
<exclude name="**/Abstract*"/>
|
||||||
|
<exclude name="${maven.test.exclude}"/>
|
||||||
|
</fileset>
|
||||||
|
</batchtest>
|
||||||
|
</junit>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="jar" depends="test">
|
||||||
|
<jar jarfile="${build.directory}/${artifactId}-${version}.jar"
|
||||||
|
basedir="${build.outputDirectory}"
|
||||||
|
manifest="${manifest}" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="mvn-package" depends="jar" if="maven.package.target">
|
||||||
|
<!-- Calls mvn ${maven.package.target} -->
|
||||||
|
<run-maven-local-repo target="${maven.package.target}" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="local-install" depends="jar">
|
||||||
|
<mkdir dir="${debian.dir}/.mh/maven-repo/${groupPath}/${artifactId}/${debianVersion}" />
|
||||||
|
<copy file="${pom.file}" tofile="${debian.dir}/.mh/maven-repo/${groupPath}/${artifactId}/${debianVersion}/${artifactId}-${debianVersion}.pom" />
|
||||||
|
<c:if>
|
||||||
|
<or>
|
||||||
|
<equals arg1="${type}" arg2="jar" />
|
||||||
|
<equals arg1="${type}" arg2="bundle" />
|
||||||
|
</or>
|
||||||
|
<then>
|
||||||
|
<copy todir="${debian.dir}/.mh/maven-repo/${groupPath}/${artifactId}/${debianVersion}/">
|
||||||
|
<fileset dir="${build.directory}">
|
||||||
|
<include name="${artifactId}-${version}.jar"/>
|
||||||
|
</fileset>
|
||||||
|
<regexpmapper from="^(.*)-${version}.jar$$" to="\1-${debianVersion}.jar"/>
|
||||||
|
</copy>
|
||||||
|
</then>
|
||||||
|
</c:if>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="restore-pom" depends="init.pom" unless="keep-cleaned-pom">
|
||||||
|
<!-- restore the pom file -->
|
||||||
|
<copy file="${pom.file}.save" tofile="${pom.file}" overwrite="true"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="package" depends="jar,mvn-package,restore-pom" />
|
||||||
|
<target name="package-and-local-install" depends="package,local-install" />
|
||||||
|
|
||||||
|
<target name="build-all" depends="package">
|
||||||
|
<c:if>
|
||||||
|
<isset property="javadoc.generate" />
|
||||||
|
<then>
|
||||||
|
<antcall target="javadoc-jar" />
|
||||||
|
</then>
|
||||||
|
</c:if>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
| Javadoc
|
||||||
|
|-->
|
||||||
|
|
||||||
|
<target name="javadoc" depends="read.pom">
|
||||||
|
<mkdir dir="${javadoc.dir}"/>
|
||||||
|
<javadoc
|
||||||
|
source="${build.javaVersion}"
|
||||||
|
sourcepath="${build.sourceDirectory}"
|
||||||
|
destdir="${javadoc.dir}"
|
||||||
|
author="true"
|
||||||
|
version="true"
|
||||||
|
windowtitle="${package} API"
|
||||||
|
doctitle="${package} - ${version}"
|
||||||
|
locale="en"
|
||||||
|
additionalparam="-notimestamp"
|
||||||
|
classpath="${classpath.full.compile}" >
|
||||||
|
|
||||||
|
<packageset dir="${build.sourceDirectory}" defaultexcludes="yes">
|
||||||
|
<include name="**"/>
|
||||||
|
</packageset>
|
||||||
|
<link href="file:///usr/share/doc/default-jdk-doc/api" packagelistLoc="/usr/share/doc/default-jdk/api/" />
|
||||||
|
<link href="file:///usr/share/doc/classpath-doc/api" />
|
||||||
|
<link href="file:///usr/share/doc/${dependency}/api" />
|
||||||
|
<link href="file:///usr/share/doc/${dependency2}/api" />
|
||||||
|
<link href="file:///usr/share/doc/${dependency3}/api" />
|
||||||
|
<link href="file:///usr/share/doc/${dependency4}/api" />
|
||||||
|
<link href="file:///usr/share/doc/${dependency5}/api" />
|
||||||
|
<link href="file:///usr/share/doc/${dependency6}/api" />
|
||||||
|
<link href="file:///usr/share/doc/${dependency7}/api" />
|
||||||
|
<link href="file:///usr/share/doc/${dependency8}/api" />
|
||||||
|
<link href="file:///usr/share/doc/${dependency9}/api" />
|
||||||
|
<link href="file:///usr/share/doc/${dependency10}/api" />
|
||||||
|
<link href="file:///usr/share/doc/${dependency11}/api" />
|
||||||
|
<link href="file:///usr/share/doc/${dependency12}/api" />
|
||||||
|
<link href="file:///usr/share/doc/${dependency13}/api" />
|
||||||
|
<link href="file:///usr/share/doc/${dependency14}/api" />
|
||||||
|
<link href="file:///usr/share/doc/${dependency15}/api" />
|
||||||
|
</javadoc>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="javadoc-jar" depends="javadoc">
|
||||||
|
<echoxml file="${build.directory}/${artifactId}.javadoc.pom">
|
||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>${groupId}</groupId>
|
||||||
|
<artifactId>${artifactId}</artifactId>
|
||||||
|
<version>${version}</version>
|
||||||
|
</project>
|
||||||
|
</echoxml>
|
||||||
|
<jar jarfile="${build.directory}/${artifactId}.javadoc.jar"
|
||||||
|
basedir="${javadoc.dir}" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="local-install-doc" depends="javadoc-jar">
|
||||||
|
<mkdir dir="${debian.dir}/.mh/maven-repo/${groupPath}/${artifactId}/${debianVersion}" />
|
||||||
|
<c:if>
|
||||||
|
<or>
|
||||||
|
<equals arg1="${type}" arg2="jar" />
|
||||||
|
<equals arg1="${type}" arg2="bundle" />
|
||||||
|
</or>
|
||||||
|
<then>
|
||||||
|
<copy tofile="${debian.dir}/.mh/maven-repo/${groupPath}/${artifactId}/${debianVersion}/${artifactId}.javadoc.jar"
|
||||||
|
file="${build.directory}/${artifactId}.javadoc.jar"/>
|
||||||
|
</then>
|
||||||
|
</c:if>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
</project>
|
|
@ -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=
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue