|
|
e8641a5 |
diff --git a/doc/ant.txt b/doc/ant.txt
|
|
|
e8641a5 |
index 06ba3f3..fc500c3 100644
|
|
|
e8641a5 |
--- a/doc/ant.txt
|
|
|
e8641a5 |
+++ b/doc/ant.txt
|
|
|
e8641a5 |
@@ -22,7 +22,7 @@ Repository for it, ship it as another source and install it.
|
|
|
e8641a5 |
[source,spec]
|
|
|
e8641a5 |
-------------
|
|
|
e8641a5 |
BuildRequires: ant
|
|
|
e8641a5 |
-BuildRequires: maven-local
|
|
|
e8641a5 |
+BuildRequires: javapackages-local
|
|
|
e8641a5 |
...
|
|
|
e8641a5 |
%build
|
|
|
e8641a5 |
ant test
|
|
|
e8641a5 |
diff --git a/doc/core_java_packages.txt b/doc/core_java_packages.txt
|
|
|
e8641a5 |
index 34e0728..2baf4b2 100644
|
|
|
e8641a5 |
--- a/doc/core_java_packages.txt
|
|
|
e8641a5 |
+++ b/doc/core_java_packages.txt
|
|
|
e8641a5 |
@@ -51,9 +51,39 @@ non-zero epoch in order to keep version ordering correct.
|
|
|
e8641a5 |
=======
|
|
|
e8641a5 |
|
|
|
e8641a5 |
|
|
|
e8641a5 |
+==== Java Packages Tools
|
|
|
e8641a5 |
+
|
|
|
e8641a5 |
+Java Packages Tools are packaged as severas binary RPM packages
|
|
|
e8641a5 |
+
|
|
|
e8641a5 |
+*`maven-local`*::
|
|
|
e8641a5 |
+
|
|
|
e8641a5 |
+ This package provides a complete environment which is required to
|
|
|
e8641a5 |
+ build Java packages using Apache Maven build system. This
|
|
|
e8641a5 |
+ includes a default system version of Java Development Kit (JDK),
|
|
|
e8641a5 |
+ Maven, a number of Maven plugins commonly used to build packages,
|
|
|
e8641a5 |
+ various macros and utlilty tools. `maven-local` is usually
|
|
|
e8641a5 |
+ declared as build dependency of Maven packages.
|
|
|
e8641a5 |
+
|
|
|
e8641a5 |
+*`ivy-local`*::
|
|
|
e8641a5 |
+
|
|
|
e8641a5 |
+ Analogously to `maven-local`, this package provides an environment
|
|
|
e8641a5 |
+ required to build Java packages using Apache Ivy as dependency
|
|
|
e8641a5 |
+ manager.
|
|
|
e8641a5 |
+
|
|
|
e8641a5 |
+*`javapackages-local`*::
|
|
|
e8641a5 |
+
|
|
|
e8641a5 |
+ Package providing a basic environment necessary to geterate and
|
|
|
e8641a5 |
+ install metadata for system artifact repository.
|
|
|
e8641a5 |
+
|
|
|
e8641a5 |
+*`javapackages-tools`*::
|
|
|
e8641a5 |
+
|
|
|
e8641a5 |
+ Package owning basic Java directories and providing runtime
|
|
|
e8641a5 |
+ support for Java packages. The great majority of Java packages
|
|
|
e8641a5 |
+ depend on `javapackages-tools`.
|
|
|
e8641a5 |
+
|
|
|
e8641a5 |
+
|
|
|
e8641a5 |
TODO
|
|
|
e8641a5 |
|
|
|
e8641a5 |
-* Java Packages Tools
|
|
|
e8641a5 |
* Ant
|
|
|
e8641a5 |
** extra tasks and /etc/ant.d
|
|
|
e8641a5 |
* Maven
|
|
|
e8641a5 |
diff --git a/doc/directory_layout.txt b/doc/directory_layout.txt
|
|
|
e8641a5 |
index 862ccd4..907777d 100644
|
|
|
e8641a5 |
--- a/doc/directory_layout.txt
|
|
|
e8641a5 |
+++ b/doc/directory_layout.txt
|
|
|
e8641a5 |
@@ -34,13 +34,6 @@ short description.
|
|
|
e8641a5 |
Maven are installed. Each POM must have name that strictly
|
|
|
e8641a5 |
corresponds to JAR file in `%{_javadir}` or `%{_jnidir}`.
|
|
|
e8641a5 |
|
|
|
e8641a5 |
-*`%{_mavendepmapfragdir}`* -- `/usr/share/maven-fragments`::
|
|
|
e8641a5 |
-
|
|
|
e8641a5 |
- Directory containing package metadata in XML format. Typically
|
|
|
e8641a5 |
- each binary package installs there a single XML file containing
|
|
|
e8641a5 |
- various information (metadata) about artifacts associated with
|
|
|
e8641a5 |
- that package.
|
|
|
e8641a5 |
-
|
|
|
e8641a5 |
|
|
|
e8641a5 |
.Other directories
|
|
|
e8641a5 |
[glossary]
|
|
|
e8641a5 |
diff --git a/doc/generic_java_build.txt b/doc/generic_java_build.txt
|
|
|
e8641a5 |
index 6fb09bb..5c29c95 100644
|
|
|
e8641a5 |
--- a/doc/generic_java_build.txt
|
|
|
e8641a5 |
+++ b/doc/generic_java_build.txt
|
|
|
e8641a5 |
@@ -11,49 +11,18 @@ POM or JAR file, we may use the `%add_maven_depmap` macro. However, if package
|
|
|
e8641a5 |
is build in standard way (i.e.: `%mvn_build` and `%mvn_install`), then calling
|
|
|
e8641a5 |
`%add_maven_depmap` is neither needed nor recommended. This macro is usually
|
|
|
e8641a5 |
useful only for packages that use other build tool than Maven (e.g.: ant,
|
|
|
e8641a5 |
-gradle). It creates files in `%{_mavendepmapfragdir}` that map
|
|
|
e8641a5 |
-groupId:artifactId pairs to JAR files under `%{_javadir}`. These files are
|
|
|
e8641a5 |
-called depmap fragments. The macro can read the groupId and artifactId from the
|
|
|
e8641a5 |
-POM file or maintainer can pass this information as an argument. All fragments
|
|
|
e8641a5 |
-in `%{_mavendepmapfragdir}` directory are read by XMvn, allowing the
|
|
|
e8641a5 |
-locally installed JAR and POM files to be used as a maven repository.
|
|
|
e8641a5 |
-
|
|
|
e8641a5 |
-Note that -- unless you use the `-f` option as shown below -- all
|
|
|
e8641a5 |
-depmap fragments for a given package are written to the same file,
|
|
|
e8641a5 |
-`%{_mavendepmapfragdir}/%{name}`. You should be sure to include this
|
|
|
e8641a5 |
-file in the `%files` section of your RPM.
|
|
|
e8641a5 |
+gradle).
|
|
|
e8641a5 |
|
|
|
e8641a5 |
For the macro to work properly, all JAR files must be copied into `%{_javadir}`
|
|
|
e8641a5 |
-and all POM files must be copied into `%{_mavenpomdir}` and given file names of
|
|
|
e8641a5 |
-the following form, where `jarname` is the name of the JAR without the .jar
|
|
|
e8641a5 |
-suffix:
|
|
|
e8641a5 |
+and all POM files must be copied into `%{_mavenpomdir}`.
|
|
|
e8641a5 |
|
|
|
e8641a5 |
-[source,spec]
|
|
|
e8641a5 |
---------
|
|
|
e8641a5 |
-%{_mavenpomdir}/JPP[.subdirectory]-jarname.pom
|
|
|
e8641a5 |
---------
|
|
|
e8641a5 |
-
|
|
|
e8641a5 |
-Note that the subdirectory is only necessary if the JAR file is put into a
|
|
|
e8641a5 |
-subdirectory of `%{_javadir}`. For example:
|
|
|
e8641a5 |
-
|
|
|
e8641a5 |
-* For junit, the JAR is `%{_javadir}/junit.jar`, so the POM would be
|
|
|
e8641a5 |
- `%{_mavenpomdir}/JPP-junit.pom`.
|
|
|
e8641a5 |
-* For plexus-ant-factory, the JAR is `%{_javadir}/plexus/ant-factory.jar`, so
|
|
|
e8641a5 |
- the POM would named `%{_mavenpomdir}/JPP.plexus-ant-factory.pom`.
|
|
|
e8641a5 |
-
|
|
|
e8641a5 |
-If a POM is installed with no corresponding JAR file -- for example, for parent
|
|
|
e8641a5 |
-POM files -- the same convention should be followed:
|
|
|
e8641a5 |
-
|
|
|
e8641a5 |
-* The Apache commons parent POM is installed in
|
|
|
e8641a5 |
- `%{_mavenpomdir}/JPP-commons-parent.pom`.
|
|
|
e8641a5 |
-
|
|
|
e8641a5 |
-In its simplest form (a POM without a JAR file), `%add_maven_depmap` looks like
|
|
|
e8641a5 |
+In simplest form (a POM without a JAR file), `%add_maven_depmap` looks like
|
|
|
e8641a5 |
this:
|
|
|
e8641a5 |
|
|
|
e8641a5 |
.Parent POM
|
|
|
e8641a5 |
[source,spec]
|
|
|
e8641a5 |
--------
|
|
|
e8641a5 |
-%add_maven_depmap JPP-%{name}.pom
|
|
|
e8641a5 |
+%add_maven_depmap %{name}.pom
|
|
|
e8641a5 |
--------
|
|
|
e8641a5 |
|
|
|
e8641a5 |
This will read the POM file in question and provide a mapping between the
|
|
|
e8641a5 |
@@ -65,7 +34,7 @@ For a POM that maps directly to a JAR file, the following is the correct form:
|
|
|
e8641a5 |
.Standard invocation
|
|
|
e8641a5 |
[source,spec]
|
|
|
e8641a5 |
--------
|
|
|
e8641a5 |
-%add_maven_depmap JPP-%{name}.pom %{name}.jar
|
|
|
e8641a5 |
+%add_maven_depmap %{name}.pom %{name}.jar
|
|
|
e8641a5 |
--------
|
|
|
e8641a5 |
|
|
|
e8641a5 |
In addition to creating the POM mapping, this will also ensure that the correct
|
|
|
e8641a5 |
@@ -82,7 +51,7 @@ mapping between Maven artifact and corresponding JAR file:
|
|
|
e8641a5 |
.Providing additional artifact mappings
|
|
|
e8641a5 |
[source,spec]
|
|
|
e8641a5 |
--------
|
|
|
e8641a5 |
-%add_maven_depmap JPP-%{name}.pom %{name}.jar -a "org.apache.commons:commons-lang"
|
|
|
e8641a5 |
+%add_maven_depmap %{name}.pom %{name}.jar -a "org.apache.commons:commons-lang"
|
|
|
e8641a5 |
--------
|
|
|
e8641a5 |
This form also adds additional mappings for given POM/JAR file. For example, if
|
|
|
e8641a5 |
the POM file indicates that it contains groupId commons-lang, artifactId
|
|
|
e8641a5 |
@@ -94,16 +63,16 @@ require different IDs than those reflected in the installed POM.
|
|
|
e8641a5 |
.Multiple subpackages
|
|
|
e8641a5 |
[source,spec]
|
|
|
e8641a5 |
--------
|
|
|
e8641a5 |
-%add_maven_depmap JPP-%{name}.pom %{name}.jar -f "XXX"
|
|
|
e8641a5 |
+%add_maven_depmap %{name}.pom %{name}.jar -f "XXX"
|
|
|
e8641a5 |
--------
|
|
|
e8641a5 |
-This form stores dependency mapping inside `%{_mavendepmapfragdir}/%{name}-XXX`
|
|
|
e8641a5 |
-instead of standard location. This is useful for packages with multiple
|
|
|
e8641a5 |
-subpackages where each has its own JAR files.
|
|
|
e8641a5 |
+This form stores metadata information in file with suffix "XXX". This
|
|
|
e8641a5 |
+is useful for packages with multiple subpackages where each has its own
|
|
|
e8641a5 |
+JAR files.
|
|
|
e8641a5 |
|
|
|
e8641a5 |
.Multiple artifacts in a subdirectory
|
|
|
e8641a5 |
[source,spec]
|
|
|
e8641a5 |
--------
|
|
|
e8641a5 |
-%add_maven_depmap JPP.%{name}-sub.pom %{name}/sub.jar
|
|
|
e8641a5 |
+%add_maven_depmap %{name}-sub.pom %{name}/sub.jar
|
|
|
e8641a5 |
--------
|
|
|
e8641a5 |
|
|
|
e8641a5 |
This form should be used when a package consists of multiple JAR files that are
|
|
|
e8641a5 |
diff --git a/doc/index.txt b/doc/index.txt
|
|
|
e8641a5 |
index f9af27e..22c9ab2 100644
|
|
|
e8641a5 |
--- a/doc/index.txt
|
|
|
e8641a5 |
+++ b/doc/index.txt
|
|
|
e8641a5 |
@@ -63,22 +63,6 @@ References
|
|
|
e8641a5 |
'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999.
|
|
|
e8641a5 |
ISBN 1-56592-580-7.
|
|
|
e8641a5 |
|
|
|
e8641a5 |
-
|
|
|
e8641a5 |
-[glossary]
|
|
|
e8641a5 |
-Glossary
|
|
|
e8641a5 |
---------
|
|
|
e8641a5 |
-Glossaries are optional. Glossaries entries are an example of a style
|
|
|
e8641a5 |
-of AsciiDoc labeled lists.
|
|
|
e8641a5 |
-
|
|
|
e8641a5 |
-[glossary]
|
|
|
e8641a5 |
-[[Xdepmap]]depmap::
|
|
|
e8641a5 |
- Depmap is a special file telling Maven relationships between
|
|
|
e8641a5 |
- groupId,artifactId and JAR file on the filesystem
|
|
|
e8641a5 |
-
|
|
|
e8641a5 |
-A second glossary term::
|
|
|
e8641a5 |
- The corresponding (indented) definition.
|
|
|
e8641a5 |
-
|
|
|
e8641a5 |
-
|
|
|
e8641a5 |
ifdef::backend-docbook[]
|
|
|
e8641a5 |
[index]
|
|
|
e8641a5 |
Example Index
|
|
|
e8641a5 |
diff --git a/doc/maven.txt b/doc/maven.txt
|
|
|
e8641a5 |
index 7539d00..63c8cc8 100644
|
|
|
e8641a5 |
--- a/doc/maven.txt
|
|
|
e8641a5 |
+++ b/doc/maven.txt
|
|
|
e8641a5 |
@@ -35,7 +35,7 @@ BuildRequires: maven-local
|
|
|
e8641a5 |
|
|
|
e8641a5 |
The macros `%mvn_build` and `%mvn_install` automatically handle building of the
|
|
|
e8641a5 |
JAR files and their subsequent installation to the correct directory. The
|
|
|
e8641a5 |
-corresponding POM and <<Xdepmap,depmap>> files are also installed.
|
|
|
e8641a5 |
+corresponding POM and metadata files are also installed.
|
|
|
e8641a5 |
|
|
|
e8641a5 |
[[packaging_maven_project]]
|
|
|
e8641a5 |
=== Packaging Maven project
|
|
|
e8641a5 |
diff --git a/doc/mvn_macros.txt b/doc/mvn_macros.txt
|
|
|
e8641a5 |
index c1b9aa2..1115cc8 100644
|
|
|
e8641a5 |
--- a/doc/mvn_macros.txt
|
|
|
e8641a5 |
+++ b/doc/mvn_macros.txt
|
|
|
e8641a5 |
@@ -66,7 +66,7 @@ If the project consists of multiple artifacts, it is recommended to install each
|
|
|
e8641a5 |
artifact to the separate subpackage. The macro `%mvn_build -s` will generate
|
|
|
e8641a5 |
separate `.mfiles` file for every artifact in the project. This file contains
|
|
|
e8641a5 |
list of files related to specific artifact (typically JAR file, POM file and
|
|
|
e8641a5 |
-depmap). It can be later used in `%files` section of the spec file.
|
|
|
e8641a5 |
+metadata). It can be later used in `%files` section of the spec file.
|
|
|
e8641a5 |
|
|
|
e8641a5 |
.Creating one subpackage for each generated artifact
|
|
|
e8641a5 |
[source,spec]
|