commit b72eb700637a8b3f73db7a77bb6d4a1ba88b579a
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Tue Apr 21 11:37:39 2015 +0200
Merge macros.xmvn into macros.fjava
macros.d/macros.fjava | 123 +++++++++++++++++++++++++++++++++++++++-
macros.d/macros.xmvn | 151 -------------------------------------------------
2 files changed, 122 insertions(+), 152 deletions(-)
---
diff --git a/macros.d/macros.fjava b/macros.d/macros.fjava
index 7aa8446..73f51df 100644
--- a/macros.d/macros.fjava
+++ b/macros.d/macros.fjava
@@ -1,4 +1,4 @@
-# Copyright (c) 2012-2013, Red Hat, Inc
+# Copyright (c) 2012-2015, Red Hat, Inc
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -31,6 +31,127 @@
# Mikolaj Izdebski <mizdebsk(a)redhat.com>
+# %mvn_package - assign Maven artifact(s) to a subpackage
+#
+# Usage: %mvn_package [gId]:[aId[:ver]] <subpackage name>
+#
+# This macro causes given artifact(s) to be installed in given subpackage.
+#
+# GId, aId and ver can contain wildcards and alternatives, which allows
+# multiple artifacts to be matched. If any of gId, aId or ver is omited
+# then any value will match the respective part. In particular a bare :
+# symbol will match any artifact.
+#
+# Subpackage name can contain backreferences in form @n.
+#
+%mvn_package %{pyinterpreter} %{javadir}-utils/mvn_package.py
+
+
+# %mvn_alias - create alias(es) for given Maven artifact(s)
+#
+# Usage: %mvn_alias [gId]:[aId[:ver]] [aliasGId]:[aliasAId[:aliasVer]] [...]
+#
+# This macro adds one or more aliases for specified artifacts. Aliases are
+# additional groupId, artifactId and version triples under which artifacts
+# can be found. After resulting package is installed any attempts to
+# resolve any of aliases will result in resolving the original artifact.
+#
+# GId, aId and ver can contain wildcards and alternatives, which allows
+# multiple artifacts to be matched. If any of gId, aId or ver is omited
+# then any value will match the respective part. In particular a bare :
+# symbol will match any artifact.
+#
+# AliasGId, aliasAId and aliasVer can contain backreferences in form @n,
+# which can refer only to respective parts.
+#
+%mvn_alias %{pyinterpreter} %{javadir}-utils/mvn_alias.py
+
+
+# %mvn_file - specify file name(s) for Maven artifact(s)
+#
+# Usage: %mvn_file [gId]:[aId[:ver]] <file1> [file2 ...]
+#
+# GId, aId and ver can contain wildcards and alternatives, which allows
+# multiple artifacts to be matched. If any of gId, aId or ver is omited
+# then any value will match the respective part. In particular a bare :
+# symbol will match any artifact.
+#
+# File names can contain backreferences in form @n. If multiple names
+# are given then the first one will be primary name of the artifact and
+# additional names will be symbolic links pointing to the primary file.
+#
+%mvn_file %{pyinterpreter} %{javadir}-utils/mvn_file.py
+
+# %mvn_compat_version - specify file name(s) for Maven artifact(s)
+#
+# Usage: %mvn_compat_version [gId]:[aId[:ver]] <version1> [version2 ...]
+#
+# GId, aId and ver can contain wildcards and alternatives, which allows
+# multiple artifacts to be matched. If any of gId, aId or ver is omited
+# then any value will match the respective part. In particular a bare :
+# symbol will match any artifact.
+#
+# Versions can contain backreferences in form @n. If multiple versions are
+# given then the first one will be primary version of the artifact and
+# additional versions will be symbolic links pointing to the primary
+# version.
+#
+%mvn_compat_version %{pyinterpreter} %{javadir}-utils/mvn_compat_version.py
+
+
+# %mvn_config - set XMvn configuration option
+#
+# Usage: %mvn_config <option> <value>
+#
+# This macro sets value of specified XMvn configuration option.
+#
+# Option is a sequence of slash-delimited XML node names that identify
+# XMvn configuration option, as in XMvn configuration reference; for
+# example: buildSettings/compilerSource.
+#
+# For information about available configuration options, see XMvn
+# configuration reference, available on XMvn website.
+#
+%mvn_config %{pyinterpreter} %{javadir}-utils/mvn_config.py
+
+
+# %mvn_artifact - add Maven artifact to be installed
+#
+# Usage: %mvn_artifact <pom> [<artifact-file>]
+#
+%mvn_artifact %{pyinterpreter} %{javadir}-utils/mvn_artifact.py
+
+
+# %mvn_build - build Maven project
+#
+# Usage: %mvn_build [options]
+#
+# This macro causes Maven project to be built (usually compiled and
+# packaged). It is intended to be placed in %build section of spec file.
+#
+# For summary of accepted options execute `mvn-build --help` command.
+#
+%mvn_build %{pyinterpreter} %{javadir}-utils/mvn_build.py %{?xmvn_bootstrap: -b}
%{?_without_javadoc: -j $(> .mfiles-javadoc)}%{?_without_tests: -f}
+
+
+# %mvn_install - install Maven project
+#
+# Usage: %mvn_install
+#
+# This macro causes previously built Maven project to be installed into
+# buildroot. It is intended to be placed in %install section of spec file.
+#
+%mvn_install(J:X) \
+xmvn-install %{?-X} -R .xmvn-reactor -n %{?scl:%{pkg_name}}%{!?scl:%{name}} -d
"%{buildroot}" \
+%{-J*:jdir="%{-J*}"}%{!-J*:jdir=target/site/apidocs; [ -d .xmvn/apidocs ]
&& jdir=.xmvn/apidocs} \
+if [ -d "${jdir}" ]; then \
+ install -dm755 %{buildroot}%{_javadocdir}/%{?scl:%{pkg_name}}%{!?scl:%{name}} \
+ cp -pr "${jdir}"/*
%{buildroot}%{_javadocdir}/%{?scl:%{pkg_name}}%{!?scl:%{name}} \
+ echo '%{_javadocdir}/%{?scl:%{pkg_name}}%{!?scl:%{name}}'
>>.mfiles-javadoc \
+fi \
+%{nil}
+
+
#==============================================================================
#
# add_maven_depmap is simplified version of jpackage-style add_to_maven_depmap
Show replies by date