From 6e9f7d4a41992e8116f7914b1818bafad0f80b0a Mon Sep 17 00:00:00 2001 From: mkoncek-jenkins Date: Mar 24 2020 11:37:45 +0000 Subject: Upstream commit: ... --- diff --git a/modules/ROOT/examples/java_project/Makefile b/modules/ROOT/examples/java_project/Makefile deleted file mode 100755 index daad053..0000000 --- a/modules/ROOT/examples/java_project/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/make -f - -compile: - rm -rf compiled/ - mkdir compiled/ - javac `find . -name *java` -d compiled -cp src/ - -jar: compile - rm -f helloworld.jar - jar cfe helloworld.jar org.fedoraproject.helloworld.HelloWorld -C compiled . - - -clean: - rm -rf *jar compiled diff --git a/modules/ROOT/examples/java_project/src/org/fedoraproject/helloworld/input/Input.java b/modules/ROOT/examples/java_project/src/org/fedoraproject/helloworld/input/Input.java deleted file mode 100644 index 4ac348d..0000000 --- a/modules/ROOT/examples/java_project/src/org/fedoraproject/helloworld/input/Input.java +++ /dev/null @@ -1,11 +0,0 @@ - -package org.fedoraproject.helloworld.input; - -import java.util.Scanner; - -public class Input { - public static String getInput() { - Scanner s = new Scanner(System.in); - return s.next(); - } -} diff --git a/modules/ROOT/examples/java_project/src/org/fedoraproject/helloworld/output/Output.java b/modules/ROOT/examples/java_project/src/org/fedoraproject/helloworld/output/Output.java deleted file mode 100644 index 01b9cc6..0000000 --- a/modules/ROOT/examples/java_project/src/org/fedoraproject/helloworld/output/Output.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.fedoraproject.helloworld.output; - -public class Output { - public static void output(String s) { - System.out.println("Hello World from " + s); - } -} - - diff --git a/modules/ROOT/examples/manpages/mvn_alias.7.html b/modules/ROOT/examples/manpages/mvn_alias.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/mvn_alias.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/mvn_artifact.7.html b/modules/ROOT/examples/manpages/mvn_artifact.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/mvn_artifact.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/mvn_build.7.html b/modules/ROOT/examples/manpages/mvn_build.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/mvn_build.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/mvn_compat_version.7.html b/modules/ROOT/examples/manpages/mvn_compat_version.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/mvn_compat_version.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/mvn_config.7.html b/modules/ROOT/examples/manpages/mvn_config.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/mvn_config.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/mvn_file.7.html b/modules/ROOT/examples/manpages/mvn_file.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/mvn_file.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/mvn_install.7.html b/modules/ROOT/examples/manpages/mvn_install.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/mvn_install.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/mvn_package.7.html b/modules/ROOT/examples/manpages/mvn_package.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/mvn_package.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/pom_add_dep.7.html b/modules/ROOT/examples/manpages/pom_add_dep.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/pom_add_dep.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/pom_add_parent.7.html b/modules/ROOT/examples/manpages/pom_add_parent.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/pom_add_parent.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/pom_add_plugin.7.html b/modules/ROOT/examples/manpages/pom_add_plugin.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/pom_add_plugin.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/pom_change_dep.7.html b/modules/ROOT/examples/manpages/pom_change_dep.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/pom_change_dep.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/pom_disable_module.7.html b/modules/ROOT/examples/manpages/pom_disable_module.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/pom_disable_module.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/pom_remove_dep.7.html b/modules/ROOT/examples/manpages/pom_remove_dep.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/pom_remove_dep.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/pom_remove_parent.7.html b/modules/ROOT/examples/manpages/pom_remove_parent.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/pom_remove_parent.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/pom_remove_plugin.7.html b/modules/ROOT/examples/manpages/pom_remove_plugin.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/pom_remove_plugin.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/pom_set_parent.7.html b/modules/ROOT/examples/manpages/pom_set_parent.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/pom_set_parent.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/pom_xpath_disable.7.html b/modules/ROOT/examples/manpages/pom_xpath_disable.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/pom_xpath_disable.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/pom_xpath_inject.7.html b/modules/ROOT/examples/manpages/pom_xpath_inject.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/pom_xpath_inject.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/pom_xpath_remove.7.html b/modules/ROOT/examples/manpages/pom_xpath_remove.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/pom_xpath_remove.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/pom_xpath_replace.7.html b/modules/ROOT/examples/manpages/pom_xpath_replace.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/pom_xpath_replace.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/manpages/pom_xpath_set.7.html b/modules/ROOT/examples/manpages/pom_xpath_set.7.html new file mode 100644 index 0000000..dec7c26 --- /dev/null +++ b/modules/ROOT/examples/manpages/pom_xpath_set.7.html @@ -0,0 +1,21 @@ + + + + + + + + +
+
+
+ + + diff --git a/modules/ROOT/examples/maven_project/pom.xml b/modules/ROOT/examples/maven_project/pom.xml deleted file mode 100644 index 2fc59ce..0000000 --- a/modules/ROOT/examples/maven_project/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - 4.0.0 - com.example - simplemaven - 1.0 - simplemaven - - Sample Maven project - - - - commons-io - commons-io - 2.4 - - - junit - junit - 4.11 - test - - - diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index 9071a3e..add7257 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -1,34 +1,46 @@ -* xref:index.adoc[Index] -** xref:versions.adoc[Versions] -** xref:preamble.adoc[Authors and contributing] -** xref:introduction.adoc[Introduction] -*** xref:introduction_for_developers.adoc[For Java Developers] -*** xref:introduction_for_packagers.adoc[For Packagers] +* xref:introduction.adoc[Introduction] +** xref:introduction_for_packagers.adoc[For Packagers] +** xref:introduction_for_developers.adoc[For Java Developers] +* xref:fedora_java_specifics.adoc[Fedora Java Specifics for Users and Developers] +* xref:fedora_java_packaging_specifics.adoc[Fedora Java Specifics for Packagers] +** xref:directory_layout.adoc[Directory Layout] +** xref:jar_file_id.adoc[JAR File Identification] +** xref:dependency_handling.adoc[Dependency Handling] +** xref:javadoc_packages.adoc[Javadoc packages] +** xref:core_java_packages.adoc[Core Java packages] +* xref:packaging_best_practices.adoc[Packaging Best Practices] +* xref:generic_java_build.adoc[Generic Java Builds] +* xref:ant.adoc[Ant] +* xref:maven.adoc[Maven] +** xref:packaging_maven_project.adoc[Packaging] +** xref:mvn_macros.adoc[Macros for Maven packaging] +** xref:pom_macros.adoc[Macros for POM modification] +* xref:gradle.adoc[Gradle] +* xref:common_errors.adoc[Common Errors] -** xref:fedora_java_specifics.adoc[Java Specifics in Fedora for Users and Developers] -** xref:fedora_java_packaging_specifics.adoc[Java Specifics in Fedora for Packagers] -*** xref:directory_layout.adoc[Directory Layout] -*** xref:jar_file_id.adoc[JAR File Identification] -**** xref:jar_file_id_relative.adoc[Relative paths] -**** xref:jar_file_id_artifact.adoc[Artifact specification] -**** xref:jar_file_id_aliases.adoc[Aliases] -**** xref:jar_file_id_compat.adoc[Compatibility versions] -*** xref:dependency_handling.adoc[Dependency Handling] -*** xref:javadoc_packages.adoc[Javadoc packages] -*** xref:core_java_packages.adoc[Core Java packages] -** xref:packaging_best_practices.adoc[Packaging Best Practices] -** xref:generic_java_build.adoc[Generic Java Builds] -** xref:ant.adoc[Ant] -** xref:maven.adoc[Maven] -*** xref:packaging_maven_project.adoc[Packaging Maven project] -*** xref:mvn_macros.adoc[Macros for Maven build configuration] -*** xref:pom_macros.adoc[Macros for POM modification] - -** xref:gradle.adoc[Gradle] -** xref:common_errors.adoc[Common Errors] -** xref:integration_maven_xmvn.adoc[Integration of Maven and XMvn Tools] -** xref:migration.adoc[Migration from older tools] -** xref:appendix.adoc[Appendix] -** xref:references.adoc[References] +* xref:migration.adoc[Migration from older tools] +* xref:manpages.adoc[Manual pages] +** xref:manpage_mvn_alias.adoc[mvn_alias] +** xref:manpage_mvn_artifact.adoc[mvn_artifact] +** xref:manpage_mvn_build.adoc[mvn_build] +** xref:manpage_mvn_compat_version.adoc[mvn_compat_version] +** xref:manpage_mvn_config.adoc[mvn_config] +** xref:manpage_mvn_file.adoc[mvn_file] +** xref:manpage_mvn_install.adoc[mvn_install] +** xref:manpage_mvn_package.adoc[mvn_package] +** xref:manpage_pom_add_dep.adoc[pom_add_dep] +** xref:manpage_pom_add_parent.adoc[pom_add_parent] +** xref:manpage_pom_add_plugin.adoc[pom_add_plugin] +** xref:manpage_pom_change_dep.adoc[pom_change_dep] +** xref:manpage_pom_disable_module.adoc[pom_disable_module] +** xref:manpage_pom_remove_dep.adoc[pom_remove_dep] +** xref:manpage_pom_remove_parent.adoc[pom_remove_parent] +** xref:manpage_pom_remove_plugin.adoc[pom_remove_plugin] +** xref:manpage_pom_set_parent.adoc[pom_set_parent] +** xref:manpage_pom_xpath_disable.adoc[pom_xpath_disable] +** xref:manpage_pom_xpath_inject.adoc[pom_xpath_inject] +** xref:manpage_pom_xpath_remove.adoc[pom_xpath_remove] +** xref:manpage_pom_xpath_replace.adoc[pom_xpath_replace] +** xref:manpage_pom_xpath_set.adoc[pom_xpath_set] diff --git a/modules/ROOT/pages/ant.adoc b/modules/ROOT/pages/ant.adoc index 094e38d..e1ba4c3 100644 --- a/modules/ROOT/pages/ant.adoc +++ b/modules/ROOT/pages/ant.adoc @@ -1,3 +1,4 @@ +[[ant]] == Ant [quote,,http://ant.apache.org/] @@ -49,8 +50,8 @@ Details: - `%mvn_artifact` macro is used to request installation of an artifact that was not built using Maven. It expects a POM file and a JAR file. For POM only artifacts, the JAR part is omitted. + - See xref:mvn_macros.adoc#mvn_artifact[Installing additional artifacts] - for more information + See xref:mvn_macros.adoc#mvn_artifact[Installing additional + artifacts] for more information - `%mvn_install` performs the actual installation. Optional `-J` parameter requests installation of generated Javadoc from given directory diff --git a/modules/ROOT/pages/appendix.adoc b/modules/ROOT/pages/appendix.adoc deleted file mode 100644 index d07dc02..0000000 --- a/modules/ROOT/pages/appendix.adoc +++ /dev/null @@ -1,2 +0,0 @@ -== Appendix -Ideally include manpages for mvn_ and pom_ macros here. diff --git a/modules/ROOT/pages/architecture.adoc b/modules/ROOT/pages/architecture.adoc deleted file mode 100644 index 97c3e57..0000000 --- a/modules/ROOT/pages/architecture.adoc +++ /dev/null @@ -1,3 +0,0 @@ -= Pizza Factory Architecture - -The architecture of our pizza factory is quite simple. We bake our very expensive xref:pizza-dough.adoc[pizza dough] in a very cheap xref:pizza-owen.adoc[pizza owen]. This way, we can achieve a medicore result for a high price and a reasonable number of failures. diff --git a/modules/ROOT/pages/clean-binary-files.adoc b/modules/ROOT/pages/clean-binary-files.adoc new file mode 100644 index 0000000..90b45cc --- /dev/null +++ b/modules/ROOT/pages/clean-binary-files.adoc @@ -0,0 +1,107 @@ +From: Deepak Bhole +To: jpackage-discuss@zarb.org + +Based on the initial design specifications for a clean-binary-files, +I have created a script that does so (with some added functionality that +became evident as necessary during design). + +The original mail is here: +https://www.zarb.org/pipermail/jpackage-discuss/2005-November/009158.html + +There are now 3 files: +clean-binary-files +check-binary-files +create-jar-links + +Due to the complex functionality and flexibility that is expected from +the script (set), the syntax seems a bit daunting. Any input with +regards to this matter, or any other, would be appreciated. + +================ +Example use case +================ + +Suppose there is a vanilla tarball abc-1.tar.gz with some binary files +(jars) in it. In the source repo, we would want a clean copy without any +jars. We can use the scripts to achieve this: + +To generate an instructions file: +clean-binary-files -e -l -a abc-1.tar.gz > instructions + +This creates an 'instructions' file, which contains info on what stays +and what goes. + +Then, one can run: +clean-binary-files -f instructions -n -a abc-1.tar.gz + +This would create abc-1-clean.tar.gz for uploading into jpp/fedora/etc. +repositories with no binary (jar) files. + +In %prep for the rpm spec, one would have: +check-binary-files -f instructions -a abc-1-clean.tar.gz + +This ensures that the tarball is clean, and has nothing extra, or +missing. + +Following this, one can extract the tarball, cd to it, and run: +create-jar-links -f -d + +This would call build-jar-repository and create symlinks, with extra +mappings (form vanilla jar names to jpp names) that are specifiable via +the custom jar map. + +Alternatively, if you have a vanilla tarball, you can clean and create +symlinks in it's place all at once by: +clean-binary-files -e -d -a +abc-1.tar.gz + +Note: If the -a is not given to clean-binary-files, all actions +are performed on current directory. + +--help output from each of the scripts: +------------------- +clean-binary-files: +------------------- + +Usage: $0 {[-f {-, instructions_file}], [-e exclusion_file] [-l]} [-a +archive_file] [-d custom_jar_map] [-n] [-p] [-s] + +Options: +-f - The instructions file, specifying which files to keep and which + to remove +-e - The exclusions file, specifying special binary files that are to + be preserved, or non-binary files that are to be removed. +-l - Only list instructions (to put in instructions file), do not delete +anything. +-a - Archive file on which actions will be performed, as opposed to + current directory +-d - A custom jar map file (has priority over the generic one). +-n - No symlinks (i.e. only clean jars, don't run build-jar-repository +afterwards) +-p - Preserve original file names (-p to build-jar-repository) +-s - Silent mode. Won't output commands during cleanup + +------------------ +check-binary-files +------------------ +Usage: $0 -f instructions_file [-a archive_file] + +Options: +-a - Archive file on which actions will be performed, as opposed to + current directory +-f - The instructions file to check against. + +----------------- +create-jar-links: +----------------- +Usage: $0 -f instructions_file [-a archive_file] [-p] + +Options: +-a - Archive file on which actions will be performed, as opposed to + current directory +-p - Preserve original file names (-p to build-jar-repository) +-f - The instructions file to check against. + +Cheers, +Deepak + diff --git a/modules/ROOT/pages/common_errors.adoc b/modules/ROOT/pages/common_errors.adoc index 7d73da8..1cb03f8 100644 --- a/modules/ROOT/pages/common_errors.adoc +++ b/modules/ROOT/pages/common_errors.adoc @@ -22,10 +22,10 @@ couldn't find some dependencies (in this case You have multiple options here: - - If you suspect that a dependecy is not necessary, you can + - If you suspect that a dependency is not necessary, you can remove it from `pom.xml` file and Maven will stop complaining about it. You can use wide variety of - xref:pom_macros.adoc[macros] for modifying POM files. The one + xref:pom_macros.adoc#helper_macros[macros] for modifying POM files. The one for removing dependencies is called xref:pom_macros.adoc#pom_remove_dep[%pom_remove_dep]. - There is a mock plugin that can automate installation of missing dependencies. @@ -81,8 +81,8 @@ project requires older version, then the project should be ported to latest stable version of the library (this may require cooperation with project's upstream). If none of these is possible from some reason, it is still possible to introduce new `compat` package. See -xref:jar_file_id_compat.adoc[compat packages] section for more information -on this topic. +xref:jar_file_id_compat.adoc#compat_packages[compat packages] section for more +information on this topic. Sometimes `pom.xml` doesn't list all the necessary dependencies, even if it should. Dependencies can also depend on some other and typically all @@ -95,14 +95,15 @@ dependencies and relies on transitive dependencies. Such a missing dependency may be considered a bug in the project. The solution is to explicitly add missing dependency to the `pom.xml`. This may be easily done by using `%pom_add_dep` macro. See section about -xref:pom_macros.adoc[macros for POM modification] for more information. +xref:pom_macros.adoc#helper_macros[macros for POM modification] for more information. [[error_requires_unknown]] === Requires cannot be generated ------ -Following dependencies were not resolved and requires cannot be generated. Either remove the dependency from pom.xml or add proper packages to BuildRequires: -org.apache.maven.doxia:doxia-core::tests:UNKNOWN +Following dependencies were not resolved and requires cannot be generated. +Either remove the dependency from pom.xml or add proper packages to +BuildRequires: org.apache.maven.doxia:doxia-core::tests:UNKNOWN ------ Most often this error happens when one part of the package depends on an diff --git a/modules/ROOT/pages/community.adoc b/modules/ROOT/pages/community.adoc deleted file mode 100644 index def9977..0000000 --- a/modules/ROOT/pages/community.adoc +++ /dev/null @@ -1,3 +0,0 @@ -= Pizza Factory Community - -Our community is basically the same as the community of Fedora Docs. That's mostly because this is a template for new pieces of the Fedora Docs. diff --git a/modules/ROOT/pages/dependency_handling.adoc b/modules/ROOT/pages/dependency_handling.adoc index 6b7d119..4d84c95 100644 --- a/modules/ROOT/pages/dependency_handling.adoc +++ b/modules/ROOT/pages/dependency_handling.adoc @@ -1,10 +1,7 @@ +[[dependency_handling]] === Dependency Handling -WORK IN PROGRESS -msimacek, 2015-04-09 -Describe RPM Provides and Requires, their interactions especially with relation -to JAR file identification, explain mvn(gId:aId...) strings. RPM has multiple types of metadata to describe dependency relationships between packages. The two basic types are Requires and Provides. @@ -86,8 +83,7 @@ rpm -qp --requires path/to/example-1.0.noarch.rpm [TIP] ===== -See also -xref:introduction_for_developers.adoc#querying_repositories[Querying Fedora repositories] +See also xref:introduction_for_developers.adoc#querying_repositories[Querying Fedora repositories] ===== .Generating BuildRequires diff --git a/modules/ROOT/pages/faq.adoc b/modules/ROOT/pages/faq.adoc deleted file mode 100644 index 8a8da48..0000000 --- a/modules/ROOT/pages/faq.adoc +++ /dev/null @@ -1,7 +0,0 @@ -= Frequently Asked Questions (FAQ) - -[qanda] -Can I see a built preview of this template to get a better idea about the result?:: - Of course you can! Just look at the README of the repository — it should tell you everything. -Is writing documentation hard and dreadful?:: - Absolutely not. Writing documentation in asciidoc is very simple and straighforward. And in fact, writing documentation makes you very happy. Just try and see for yourself! diff --git a/modules/ROOT/pages/fedora_java_packaging_specifics.adoc b/modules/ROOT/pages/fedora_java_packaging_specifics.adoc index 93214a7..31a55e2 100644 --- a/modules/ROOT/pages/fedora_java_packaging_specifics.adoc +++ b/modules/ROOT/pages/fedora_java_packaging_specifics.adoc @@ -1 +1 @@ -== Fedora Java Packaging Specifics +== Java Specifics in Fedora for Packagers diff --git a/modules/ROOT/pages/generic_java_build.adoc b/modules/ROOT/pages/generic_java_build.adoc index b3904ab..429b3da 100644 --- a/modules/ROOT/pages/generic_java_build.adoc +++ b/modules/ROOT/pages/generic_java_build.adoc @@ -1,13 +1,14 @@ -== Generic Java Build +== Generic Java Builds Handling of basic build steps in Java + * javac * usage of build-claspath, build-jar-repository to prepare for build * ... === Generating Application Shell Scripts -As mentioned in section about xref:introduction_for_packagers.adoc[Java packaging basics], all -Java applications need wrapper shell scripts to setup the environment before +As mentioned in section about xref:introduction_for_packagers.adoc#XFor_Packagers[Java packaging basics], +all Java applications need wrapper shell scripts to setup the environment before running JVM and associated Java code. diff --git a/modules/ROOT/pages/gradle.adoc b/modules/ROOT/pages/gradle.adoc index b27f707..7583d3a 100644 --- a/modules/ROOT/pages/gradle.adoc +++ b/modules/ROOT/pages/gradle.adoc @@ -1,4 +1,5 @@ -=== Gradle +[[gradle]] +== Gradle [quote,,from Gradle package description] ______ @@ -16,7 +17,7 @@ which can be used in situations requiring writing custom build logic. Flexibility means that Gradle build scripts can differ significantly across different projects and there is no universal way of packaging Gradle projects. However, in most common situations the following -steps can are necessary: +steps are necessary: 1. Add build-dependency on `gradle-local` 2. In the `%build` section of the spec use `%gradle_build` macro to diff --git a/modules/ROOT/pages/index.adoc b/modules/ROOT/pages/index.adoc index ff7c1aa..5f46f91 100644 --- a/modules/ROOT/pages/index.adoc +++ b/modules/ROOT/pages/index.adoc @@ -3,8 +3,20 @@ Java Packaging HOWTO {localdate} + +include::versions.adoc[] + +include::preamble.adoc[] + +:numbered!: +[abstract] +== Abstract This document aims to help developers create and maintain Java packages in Fedora. It *does not* supersede or replace -link:https://fedoraproject.org/wiki/Packaging:Java[Java Packaging Guidelines], +link:https://docs.fedoraproject.org/en-US/packaging-guidelines/Java/[Java Packaging Guidelines], but rather aims to document tools and techniques used for packaging Java software on Fedora. + + +:numbered: + diff --git a/modules/ROOT/pages/introduction.adoc b/modules/ROOT/pages/introduction.adoc index bb3a71b..2039c36 100644 --- a/modules/ROOT/pages/introduction.adoc +++ b/modules/ROOT/pages/introduction.adoc @@ -35,10 +35,10 @@ packaging rules had to be evolved. This section includes basic introduction to Java packaging world to people coming from different backgrounds. Goal is to understand language of all groups involved. If you are a Java developer coming into contact with RPM packaging for -the first time start reading xref:introduction_for_developers.adoc[Java developer] section. On the -other hand if you are coming from RPM packaging background an -xref:introduction_for_packagers.adoc[introduction to Java world] is probably a better starting -point. +the first time start reading xref:introduction_for_developers.adoc#XFor_Devs[Java developer] +section. On the other hand if you are coming from RPM packaging background an +xref:introduction_for_packagers.adoc#XFor_Packagers[introduction to Java world] +is probably a better starting point. It should be noted that especially in this section we might sacrifice correctness for simplicity. diff --git a/modules/ROOT/pages/introduction_for_developers.adoc b/modules/ROOT/pages/introduction_for_developers.adoc index fc1024a..305fcf7 100644 --- a/modules/ROOT/pages/introduction_for_developers.adoc +++ b/modules/ROOT/pages/introduction_for_developers.adoc @@ -1,4 +1,5 @@ -=== Introduction for Java Developers +[[XFor_Devs]] +=== For Java Developers Packaging Java software has specifics which we will try to cover in this section aimed at Java developers who are already familiar with Java language, JVM, @@ -47,6 +48,7 @@ We packed the project directory into file `helloworld.tar.gz`. .Example spec file [source,spec,numbered] ------ + include::example$rpm_project/helloworld.spec[] ------ @@ -68,7 +70,8 @@ Header, which contains: :: ** Run time dependencies will be detected automatically. If it fails, you have to specify them with `Requires`. ** More information on this topic can be found in - xref:dependency_handling.adoc[Dependency handling] section. + xref:dependency_handling.adoc#dependency_handling[Dependency + handling] section. Description:: @@ -190,9 +193,7 @@ osgi(org.apache.commons.io) = 2.4.0 Output above means that package `apache-commons-io` provides two Maven artifacts: previously mentioned `commons-io:commons-io` and `org.apache.commons:commons-io`. In this case the second one is just an -alias for same JAR file. See section about -xref:jar_file_id_aliases.adoc[artifact aliases] -for more information on this topic. +alias for same JAR file. See section about xref:jar_file_id_aliases.adoc#aliases[artifact aliases] for more information on this topic. Another useful tool is `rpm`. It can do a lot of stuff, but most importantly it can replace `dnf repoquery` if one only needs to query local diff --git a/modules/ROOT/pages/introduction_for_packagers.adoc b/modules/ROOT/pages/introduction_for_packagers.adoc index 001beaa..834ceb2 100644 --- a/modules/ROOT/pages/introduction_for_packagers.adoc +++ b/modules/ROOT/pages/introduction_for_packagers.adoc @@ -1,4 +1,5 @@ -=== Introduction for Packagers +[[XFor_Packagers]] +=== For Packagers Java is a programming language which is usually compiled into bytecode for JVM (Java Virtual Machine). For more details about the JVM and bytecode @@ -49,9 +50,12 @@ In this project all packages are under `src/` directory hierarchy. .HelloWorld.java listing [source,java] ------ + include::example$java_project/src/org/fedoraproject/helloworld/HelloWorld.java[] ------ + + .Java packages [source,shell] ------ @@ -97,7 +101,7 @@ http://ant.apache.org/[Apache Ant] and http://www.gradle.org/[Gradle]. [TIP] ====== -See also xref:maven.adoc[Maven] and xref:ant.adoc[Ant] sections. +See also xref:maven.adoc#maven[Maven] and xref:ant.adoc#ant[Ant] sections. ====== .JAR files @@ -255,7 +259,7 @@ Some projects that use Apache Ant also use Apache Ivy to simplify dependency handling. Ivy is capable of resolving and downloading artifacts from Maven repositories which are declaratively described in XML. Project usually contains one or more `ivy.xml` files specifying the -module Maven coordinates and its dependecies. Ivy can also be used +module Maven coordinates and its dependencies. Ivy can also be used directly from Ant build files. To detect whether the project you wish to package is using Apache Ivy, look for files named `ivy.xml` or nodes in the `ivy` namespace in project's build file. diff --git a/modules/ROOT/pages/jar_file_id.adoc b/modules/ROOT/pages/jar_file_id.adoc index 39156cb..e1dc61e 100644 --- a/modules/ROOT/pages/jar_file_id.adoc +++ b/modules/ROOT/pages/jar_file_id.adoc @@ -14,3 +14,13 @@ impossible to every naming scheme, so there are some simplifications. This chapter describes artifact different ways to identify and locate artifacts in system repository. + + + +include::jar_file_id_relative.adoc[] + +include::jar_file_id_artifact.adoc[] + +include::jar_file_id_aliases.adoc[] + +include::jar_file_id_compat.adoc[] diff --git a/modules/ROOT/pages/jar_file_id_aliases.adoc b/modules/ROOT/pages/jar_file_id_aliases.adoc index 7eda4ce..813c1c6 100644 --- a/modules/ROOT/pages/jar_file_id_aliases.adoc +++ b/modules/ROOT/pages/jar_file_id_aliases.adoc @@ -1,3 +1,4 @@ +[[aliases]] ==== Aliases Aliases working in two ways: @@ -5,8 +6,7 @@ Aliases working in two ways: * Symlinks for paths * Additional mappings for artifact specifications -WORK IN PROGRESS -msimacek, 31 March 2015 + In the real world the same project can appear under different names as it was evolving or released differently. Therefore other projects may refer to those diff --git a/modules/ROOT/pages/jar_file_id_compat.adoc b/modules/ROOT/pages/jar_file_id_compat.adoc index a0770c2..0ac93d6 100644 --- a/modules/ROOT/pages/jar_file_id_compat.adoc +++ b/modules/ROOT/pages/jar_file_id_compat.adoc @@ -1,9 +1,9 @@ +[[compat_packages]] ==== Compatibility versions Handling of compatibility packages, versioned jars etc. -WORK IN PROGRESS -msimacek, 2015-04-02 + In Fedora we prefer to always have only the latest version of a given project. Unfortunately, this is not always possible as some projects @@ -35,9 +35,8 @@ necessary steps to avoid clashes with the non-compat version. An artifact can be marked as compat by `%mvn_compat_version`. It accepts an artifact argument which will determine which artifact will be compat. The format for specifying artifact coordinates is the same as with -xref:mvn_macros.adoc#mvn_alias[%mvn_alias]. In the common case you -will want to mark all artifacts as compat. You can specify multiple compat -versions at a time. +xref:mvn_macros.adoc#mvn_alias[`%mvn_alias`]. In the common case you will want +to mark all artifacts as compat. You can specify multiple compat versions at a time. .Dependency resolution of compat artifacts When XMvn performs dependency resolution for a dependency artifact in diff --git a/modules/ROOT/pages/javadoc_packages.adoc b/modules/ROOT/pages/javadoc_packages.adoc index 17b6524..1203405 100644 --- a/modules/ROOT/pages/javadoc_packages.adoc +++ b/modules/ROOT/pages/javadoc_packages.adoc @@ -1,14 +1,13 @@ -=== Javadoc Packages +=== Javadoc packages Javadoc subpackages in Fedora provide automatically generated API documentation for Java libraries and applications. -xref:fedora_java_specifics.adoc#openjdk[Java Development Kit] -comes with tool called `javadoc`. This tool can be -used for generating the documentation from specially formated comments -in Java source files. Output of this tool, together with license files, -usually represents only content of javadoc subpackages. Note `javadoc` -invocation is typically handled by build system and package maintainer -doesn't need to deal with it directly. +xref:fedora_java_specifics.adoc#openjdk[Java Development Kit] comes with tool +called `javadoc`. This tool can be used for generating the documentation from +specially formated comments in Java source files. Output of this tool, together +with license files, usually represents only content of javadoc subpackages. +Note `javadoc` invocation is typically handled by build system and package +maintainer doesn't need to deal with it directly. Javadoc subpackage shouldn't depend on its base package and vice versa. The rationale behind this rule is that documentation can usually be used diff --git a/modules/ROOT/pages/manpage_mvn_alias.adoc b/modules/ROOT/pages/manpage_mvn_alias.adoc new file mode 100644 index 0000000..602c871 --- /dev/null +++ b/modules/ROOT/pages/manpage_mvn_alias.adoc @@ -0,0 +1,6 @@ +=== mvn_alias + +++++++++++++++++++++++++++ + +include::example$manpages/mvn_alias.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_mvn_artifact.adoc b/modules/ROOT/pages/manpage_mvn_artifact.adoc new file mode 100644 index 0000000..fae23b8 --- /dev/null +++ b/modules/ROOT/pages/manpage_mvn_artifact.adoc @@ -0,0 +1,6 @@ +=== mvn_artifact + +++++++++++++++++++++++++++ + +include::example$manpages/mvn_artifact.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_mvn_build.adoc b/modules/ROOT/pages/manpage_mvn_build.adoc new file mode 100644 index 0000000..1aa80fe --- /dev/null +++ b/modules/ROOT/pages/manpage_mvn_build.adoc @@ -0,0 +1,6 @@ +=== mvn_build + +++++++++++++++++++++++++++ + +include::example$manpages/mvn_build.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_mvn_compat_version.adoc b/modules/ROOT/pages/manpage_mvn_compat_version.adoc new file mode 100644 index 0000000..b68f12a --- /dev/null +++ b/modules/ROOT/pages/manpage_mvn_compat_version.adoc @@ -0,0 +1,6 @@ +=== mvn_compat_version + +++++++++++++++++++++++++++ + +include::example$manpages/mvn_compat_version.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_mvn_config.adoc b/modules/ROOT/pages/manpage_mvn_config.adoc new file mode 100644 index 0000000..098514b --- /dev/null +++ b/modules/ROOT/pages/manpage_mvn_config.adoc @@ -0,0 +1,6 @@ +=== mvn_config + +++++++++++++++++++++++++++ + +include::example$manpages/mvn_config.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_mvn_file.adoc b/modules/ROOT/pages/manpage_mvn_file.adoc new file mode 100644 index 0000000..0406cf9 --- /dev/null +++ b/modules/ROOT/pages/manpage_mvn_file.adoc @@ -0,0 +1,6 @@ +=== mvn_file + +++++++++++++++++++++++++++ + +include::example$manpages/mvn_file.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_mvn_install.adoc b/modules/ROOT/pages/manpage_mvn_install.adoc new file mode 100644 index 0000000..5c5d10e --- /dev/null +++ b/modules/ROOT/pages/manpage_mvn_install.adoc @@ -0,0 +1,6 @@ +=== mvn_install + +++++++++++++++++++++++++++ + +include::example$manpages/mvn_install.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_mvn_package.adoc b/modules/ROOT/pages/manpage_mvn_package.adoc new file mode 100644 index 0000000..278ac22 --- /dev/null +++ b/modules/ROOT/pages/manpage_mvn_package.adoc @@ -0,0 +1,6 @@ +=== mvn_package + +++++++++++++++++++++++++++ + +include::example$manpages/mvn_package.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_pom_add_dep.adoc b/modules/ROOT/pages/manpage_pom_add_dep.adoc new file mode 100644 index 0000000..28caa15 --- /dev/null +++ b/modules/ROOT/pages/manpage_pom_add_dep.adoc @@ -0,0 +1,6 @@ +=== pom_add_dep + +++++++++++++++++++++++++++ + +include::example$manpages/pom_add_dep.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_pom_add_parent.adoc b/modules/ROOT/pages/manpage_pom_add_parent.adoc new file mode 100644 index 0000000..638a5ae --- /dev/null +++ b/modules/ROOT/pages/manpage_pom_add_parent.adoc @@ -0,0 +1,6 @@ +=== pom_add_parent + +++++++++++++++++++++++++++ + +include::example$manpages/pom_add_parent.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_pom_add_plugin.adoc b/modules/ROOT/pages/manpage_pom_add_plugin.adoc new file mode 100644 index 0000000..f6f63ee --- /dev/null +++ b/modules/ROOT/pages/manpage_pom_add_plugin.adoc @@ -0,0 +1,6 @@ +=== pom_add_plugin + +++++++++++++++++++++++++++ + +include::example$manpages/pom_add_plugin.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_pom_change_dep.adoc b/modules/ROOT/pages/manpage_pom_change_dep.adoc new file mode 100644 index 0000000..2f72017 --- /dev/null +++ b/modules/ROOT/pages/manpage_pom_change_dep.adoc @@ -0,0 +1,6 @@ +=== pom_change_dep + +++++++++++++++++++++++++++ + +include::example$manpages/pom_change_dep.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_pom_disable_module.adoc b/modules/ROOT/pages/manpage_pom_disable_module.adoc new file mode 100644 index 0000000..0139268 --- /dev/null +++ b/modules/ROOT/pages/manpage_pom_disable_module.adoc @@ -0,0 +1,6 @@ +=== pom_disable_module + +++++++++++++++++++++++++++ + +include::example$manpages/pom_disable_module.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_pom_remove_dep.adoc b/modules/ROOT/pages/manpage_pom_remove_dep.adoc new file mode 100644 index 0000000..6fe97ce --- /dev/null +++ b/modules/ROOT/pages/manpage_pom_remove_dep.adoc @@ -0,0 +1,6 @@ +=== pom_remove_dep + +++++++++++++++++++++++++++ + +include::example$manpages/pom_remove_dep.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_pom_remove_parent.adoc b/modules/ROOT/pages/manpage_pom_remove_parent.adoc new file mode 100644 index 0000000..6f344e8 --- /dev/null +++ b/modules/ROOT/pages/manpage_pom_remove_parent.adoc @@ -0,0 +1,6 @@ +=== pom_remove_parent + +++++++++++++++++++++++++++ + +include::example$manpages/pom_remove_parent.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_pom_remove_plugin.adoc b/modules/ROOT/pages/manpage_pom_remove_plugin.adoc new file mode 100644 index 0000000..1df290c --- /dev/null +++ b/modules/ROOT/pages/manpage_pom_remove_plugin.adoc @@ -0,0 +1,6 @@ +=== pom_remove_plugin + +++++++++++++++++++++++++++ + +include::example$manpages/pom_remove_plugin.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_pom_set_parent.adoc b/modules/ROOT/pages/manpage_pom_set_parent.adoc new file mode 100644 index 0000000..ca38a6d --- /dev/null +++ b/modules/ROOT/pages/manpage_pom_set_parent.adoc @@ -0,0 +1,6 @@ +=== pom_set_parent + +++++++++++++++++++++++++++ + +include::example$manpages/pom_set_parent.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_pom_xpath_disable.adoc b/modules/ROOT/pages/manpage_pom_xpath_disable.adoc new file mode 100644 index 0000000..80d5d6b --- /dev/null +++ b/modules/ROOT/pages/manpage_pom_xpath_disable.adoc @@ -0,0 +1,6 @@ +=== pom_xpath_disable + +++++++++++++++++++++++++++ + +include::example$manpages/pom_xpath_disable.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_pom_xpath_inject.adoc b/modules/ROOT/pages/manpage_pom_xpath_inject.adoc new file mode 100644 index 0000000..a4909e8 --- /dev/null +++ b/modules/ROOT/pages/manpage_pom_xpath_inject.adoc @@ -0,0 +1,6 @@ +=== pom_xpath_inject + +++++++++++++++++++++++++++ + +include::example$manpages/pom_xpath_inject.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_pom_xpath_remove.adoc b/modules/ROOT/pages/manpage_pom_xpath_remove.adoc new file mode 100644 index 0000000..f707666 --- /dev/null +++ b/modules/ROOT/pages/manpage_pom_xpath_remove.adoc @@ -0,0 +1,6 @@ +=== pom_xpath_remove + +++++++++++++++++++++++++++ + +include::example$manpages/pom_xpath_remove.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_pom_xpath_replace.adoc b/modules/ROOT/pages/manpage_pom_xpath_replace.adoc new file mode 100644 index 0000000..071c57a --- /dev/null +++ b/modules/ROOT/pages/manpage_pom_xpath_replace.adoc @@ -0,0 +1,6 @@ +=== pom_xpath_replace + +++++++++++++++++++++++++++ + +include::example$manpages/pom_xpath_replace.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpage_pom_xpath_set.adoc b/modules/ROOT/pages/manpage_pom_xpath_set.adoc new file mode 100644 index 0000000..c433501 --- /dev/null +++ b/modules/ROOT/pages/manpage_pom_xpath_set.adoc @@ -0,0 +1,6 @@ +=== pom_xpath_set + +++++++++++++++++++++++++++ + +include::example$manpages/pom_xpath_set.7.html[] +++++++++++++++++++++++++++ diff --git a/modules/ROOT/pages/manpages.adoc b/modules/ROOT/pages/manpages.adoc new file mode 100644 index 0000000..cc5ad45 --- /dev/null +++ b/modules/ROOT/pages/manpages.adoc @@ -0,0 +1,5 @@ +[appendix] +[[manpages]] +== Manpages + +This section contains manpages for +mvn_*+ and +pom_*+ macros. diff --git a/modules/ROOT/pages/maven.adoc b/modules/ROOT/pages/maven.adoc index 8c0594a..4ec7772 100644 --- a/modules/ROOT/pages/maven.adoc +++ b/modules/ROOT/pages/maven.adoc @@ -1,3 +1,4 @@ +[[maven]] == Maven [quote,,http://maven.apache.org] diff --git a/modules/ROOT/pages/migration.adoc b/modules/ROOT/pages/migration.adoc index 863707c..ee0f872 100644 --- a/modules/ROOT/pages/migration.adoc +++ b/modules/ROOT/pages/migration.adoc @@ -94,7 +94,7 @@ ant test switch to support splitting artifacts across multiple subpackages. To achieve the same things with `%mvn_*` macros, see xref:mvn_macros.adoc#mvn_alias[Additional Mappings] and -xref:mvn_macros.adoc#mvn_package[Assignment of the Maven Artifacts to the Subpackages] +xref:mvn_macros.adoc#mvn_package[Assignment of the Maven Artifacts to the Subpackages]. [TIP] ====== diff --git a/modules/ROOT/pages/mvn_macros.adoc b/modules/ROOT/pages/mvn_macros.adoc index df31a36..872f911 100644 --- a/modules/ROOT/pages/mvn_macros.adoc +++ b/modules/ROOT/pages/mvn_macros.adoc @@ -1,4 +1,8 @@ +[[mvn_macros]] === Macros for Maven build configuration +Maven builds can be configured to produce alternative layout, include additional +aliases in package metadata or create separate subpackages for certain +artifacts. [[mvn_artifact]] ==== Installing additional artifacts @@ -189,5 +193,6 @@ full http://mizdebsk.fedorapeople.org/xmvn/site/config.html[configuration refere All `%mvn_` macros have their own manual page which contains details on how to use them. All possible options should be documented there. These manual pages should be considered most up to date documentation right after source code. Try -for example `man mvn_file`. +for example `man mvn_file`. These pages are also included in the +xref:manpages.adoc#manpages[Appendix]. ====== diff --git a/modules/ROOT/pages/packaging_best_practices.adoc b/modules/ROOT/pages/packaging_best_practices.adoc index e116eb1..926d79d 100644 --- a/modules/ROOT/pages/packaging_best_practices.adoc +++ b/modules/ROOT/pages/packaging_best_practices.adoc @@ -1,3 +1,5 @@ +== Packaging Best Practices + Packaging Java has certain specifics that will be covered in this section which will cover basic packaging principles diff --git a/modules/ROOT/pages/packaging_maven_project.adoc b/modules/ROOT/pages/packaging_maven_project.adoc index abb4d34..5d8f996 100644 --- a/modules/ROOT/pages/packaging_maven_project.adoc +++ b/modules/ROOT/pages/packaging_maven_project.adoc @@ -1,3 +1,4 @@ +[[packaging_maven_project]] === Packaging Maven project This step by step guide will show you how to package Maven project. Let's start with @@ -6,6 +7,7 @@ probably simplest spec file possible. [source,spec,numbered] ------ + include::example$maven_project/simplemaven.spec[] ------ @@ -31,8 +33,7 @@ By default, resulting JAR files will be installed in `%{_javadir}/%{name}`, therefore package needs to own this directory. The build could fail from many reasons, but one probably most common is -build failure due to -xref:common_errors.adoc#error_missing_dependency[missing dependencies] +build failure due to xref:common_errors.adoc#error_missing_dependency[missing dependencies] We can try to remove these missing dependencies from pom.xml and make Maven stop complaining about them. However, these removed dependencies may be crucial @@ -53,8 +54,8 @@ later. Let's remove the dependencies from `pom.xml`. ------ Package maintainer can use a wide variety of "`pom_`" macros for modifying -`pom.xml` files. See xref:pom_macros.adoc[Macros for POM modification] -section for more information. +`pom.xml` files. See xref:pom_macros.adoc#helper_macros[Macros for POM +modification] section for more information. Now try to build the project again. The build will fail with xref:common_errors.adoc#error_compilation_failure[compilation failure]. @@ -70,11 +71,15 @@ will stop complaining about missing test scoped dependencies from now on. [TIP] ====== -Equivalently it is also possible to disable the test phase without adding -a switch to `%mvn_build` by specifying an additional switch `--without=tests` -to the `fedpkg` or the `mock` tool instead. +Another major reason to disable the test phase is to speed up the local build +process. This can also be achieved by specifying an additional switch +`--without=tests` to the `fedpkg` or the `mock` tool instead of adding a switch +to `%mvn_build`. Another switch `--without=javadoc` causes the build to skip Javadoc generation. + +Note that to actually build the package with tests disabled you have to specify +the switch to `%mvn_build`. ====== [NOTE] @@ -151,8 +156,7 @@ Maven artifact. %mvn_alias org.example:simplemaven simplemaven:simplemaven ------ -See xref:mvn_macros.adoc#mvn_alias[Additional Mappings] -for more information on `%mvn_alias`. +See xref:mvn_macros.adoc#mvn_alias[Additional Mappings] for more information on `%mvn_alias`. Rebuild the pacakge and check `rpm -qp --provides` output again: diff --git a/modules/ROOT/pages/pom_macros.adoc b/modules/ROOT/pages/pom_macros.adoc index 8ee7c0c..435bfe3 100644 --- a/modules/ROOT/pages/pom_macros.adoc +++ b/modules/ROOT/pages/pom_macros.adoc @@ -1,3 +1,4 @@ +[[helper_macros]] === Macros for POM modification Sometimes Maven `pom.xml` files need to be patched before they are used diff --git a/modules/ROOT/pages/references.adoc b/modules/ROOT/pages/references.adoc deleted file mode 100644 index 11918b1..0000000 --- a/modules/ROOT/pages/references.adoc +++ /dev/null @@ -1,2 +0,0 @@ -== References -- [[guidelines]] https://docs.fedoraproject.org/en-US/packaging-guidelines/Java/[Java Packaging Guidelines] diff --git a/modules/ROOT/pages/sections.adoc b/modules/ROOT/pages/sections.adoc new file mode 100644 index 0000000..add7257 --- /dev/null +++ b/modules/ROOT/pages/sections.adoc @@ -0,0 +1,46 @@ +* xref:introduction.adoc[Introduction] +** xref:introduction_for_packagers.adoc[For Packagers] +** xref:introduction_for_developers.adoc[For Java Developers] +* xref:fedora_java_specifics.adoc[Fedora Java Specifics for Users and Developers] +* xref:fedora_java_packaging_specifics.adoc[Fedora Java Specifics for Packagers] +** xref:directory_layout.adoc[Directory Layout] +** xref:jar_file_id.adoc[JAR File Identification] +** xref:dependency_handling.adoc[Dependency Handling] +** xref:javadoc_packages.adoc[Javadoc packages] +** xref:core_java_packages.adoc[Core Java packages] +* xref:packaging_best_practices.adoc[Packaging Best Practices] +* xref:generic_java_build.adoc[Generic Java Builds] +* xref:ant.adoc[Ant] +* xref:maven.adoc[Maven] +** xref:packaging_maven_project.adoc[Packaging] +** xref:mvn_macros.adoc[Macros for Maven packaging] +** xref:pom_macros.adoc[Macros for POM modification] +* xref:gradle.adoc[Gradle] +* xref:common_errors.adoc[Common Errors] + + + +* xref:migration.adoc[Migration from older tools] +* xref:manpages.adoc[Manual pages] +** xref:manpage_mvn_alias.adoc[mvn_alias] +** xref:manpage_mvn_artifact.adoc[mvn_artifact] +** xref:manpage_mvn_build.adoc[mvn_build] +** xref:manpage_mvn_compat_version.adoc[mvn_compat_version] +** xref:manpage_mvn_config.adoc[mvn_config] +** xref:manpage_mvn_file.adoc[mvn_file] +** xref:manpage_mvn_install.adoc[mvn_install] +** xref:manpage_mvn_package.adoc[mvn_package] +** xref:manpage_pom_add_dep.adoc[pom_add_dep] +** xref:manpage_pom_add_parent.adoc[pom_add_parent] +** xref:manpage_pom_add_plugin.adoc[pom_add_plugin] +** xref:manpage_pom_change_dep.adoc[pom_change_dep] +** xref:manpage_pom_disable_module.adoc[pom_disable_module] +** xref:manpage_pom_remove_dep.adoc[pom_remove_dep] +** xref:manpage_pom_remove_parent.adoc[pom_remove_parent] +** xref:manpage_pom_remove_plugin.adoc[pom_remove_plugin] +** xref:manpage_pom_set_parent.adoc[pom_set_parent] +** xref:manpage_pom_xpath_disable.adoc[pom_xpath_disable] +** xref:manpage_pom_xpath_inject.adoc[pom_xpath_inject] +** xref:manpage_pom_xpath_remove.adoc[pom_xpath_remove] +** xref:manpage_pom_xpath_replace.adoc[pom_xpath_replace] +** xref:manpage_pom_xpath_set.adoc[pom_xpath_set] diff --git a/modules/ROOT/pages/versions.adoc b/modules/ROOT/pages/versions.adoc index 205f3fc..efbd6a4 100644 --- a/modules/ROOT/pages/versions.adoc +++ b/modules/ROOT/pages/versions.adoc @@ -3,3 +3,19 @@ Before you start reading, please make sure that you're reading the version corresponding to the oldest Fedora release you want to package for. We don't generally backport new features to versions available in stable Fedora. + +Current version: {version} + +ifeval::["{version}" == "snapshot"] +[CAUTION] +You're reading version which corresponds to upstream snapshot. +endif::[] + +ifdef::multiversion[] + +Available versions: + + +include::../version-links.adoc[] + +endif::multiversion[]