From 3b57415f5501c888e74a1e7890f5dc7a25a57e08 Mon Sep 17 00:00:00 2001 From: Andrzej Jarmoniuk Date: Fri, 7 Oct 2022 06:33:10 +0200 Subject: [PATCH] #725: Migrating FAQ to markdown --- src/site/fml/faq.fml | 116 --------------------------------------- src/site/markdown/faq.md | 66 ++++++++++++++++++++++ 2 files changed, 66 insertions(+), 116 deletions(-) delete mode 100644 src/site/fml/faq.fml create mode 100644 src/site/markdown/faq.md diff --git a/src/site/fml/faq.fml b/src/site/fml/faq.fml deleted file mode 100644 index 3b54898517..0000000000 --- a/src/site/fml/faq.fml +++ /dev/null @@ -1,116 +0,0 @@ - - - - General - - - What does the Versions Maven Plugin do? - -

The Versions Maven Plugin provides a means to update version information in a Maven project

-
-
- - - Why is this plugin reporting version 1.0.0.9 of foo:bar as the latest version when I can see - version 1.0.0.23? - - -

The current implementation of - - DefaultArtifactVersion - - in the core of Maven expects that version numbers will have a very - specific format: -

-

- MajorVersion [ - . - MinorVersion [ - . - IncrementalVersion ] ] [ - - - BuildNumber | Qualifier ] -

-

WhereMajorVersion,MinorVersion,IncrementalVersion, and - BuildNumber - are all - numeric and - Qualifier - is a string. If your version number does not match this format, then the entire - version number is treated as being theQualifier. -

-

Version numbers in maven are compared using the individual components, soMajorVersion, - MinorVersion,IncrementalVersion, and - BuildNumber - are all compared asIntegers - while - Qualifier - is compared as aString. -

-

From the above you may have guessed neither - 1.0.0.9 - nor - 1.0.0.23 - match the exact - format that Maven expects, and as a result they are mapped as being just aQualifier. - String comparison will sort - 1.0.0.9 - >1.0.0.23. -

-

If you need version numbers to be sorted "correctly" you will need to define some - - version number comparison rules - . -

-
-
- - Why is foo:bar version x.y.z not being detected? - -

- In order to determine what versions of an artifact are present, Maven relies on the presence of - meta-data files in the repository. If the meta-data files are missing or contain invalid information - then Maven will not know about versions that are available in your repositories. -

-

- Here are some common reasons why your metadata can be invalid: -

-
    -
  • - You are using a local repository as a remote repository. Stop, don't do this. The local repository - uses a separate set of metadata files from those used by a remote repository. There are tools available - to convert a local repository into a remote repository, but you're really better off using a repository - manager. -
  • -
  • - Artifacts have been deployed by non-maven metadata aware tools. -
  • -
  • - Tools that claim to be maven meta-data aware have clobbered the metadata files. -
  • -
-

- In most cases, using a repository manager will solve these issues as the repository managers usually - rebuild the metadata files based on the artifacts that are present. -

-
-
-
-
diff --git a/src/site/markdown/faq.md b/src/site/markdown/faq.md new file mode 100644 index 0000000000..b7872d5d7c --- /dev/null +++ b/src/site/markdown/faq.md @@ -0,0 +1,66 @@ +title: FAQ +autor: Stephen Connolly + + + +# Frequently Asked Questions + +## General + +### What does the Versions Maven Plugin do? + +The Versions Maven Plugin provides a means to update version information in a Maven project + +### Why is this plugin reporting version 1.0.0.9 of foo:bar as the latest version when I can see version 1.0.0.23? + +The current implementation of +[DefaultArtifactVersion](https://maven.apache.org/ref/current/maven-artifact/xref/org/apache/maven/artifact/versioning/DefaultArtifactVersion.html) +in the core of Maven expects that version numbers will have a very specific format: + +` . . - ` + +Where *MajorVersion*, *MinorVersion*, *IncrementalVersion* and *BuildNumber* are all numeric and *Qualifier* +is a string. If your version number does not match this format, then the entire version number is treated as being +the *Qualifier*. + +Version numbers in maven are compared using the individual components, so *MajorVersion*, *MinorVersion*, +*IncrementalVersion*, and *BuildNumber* are all compared as `Integer`s while *Qualifier* is compared as a `String`. + +From the above you may have guessed neither `1.0.0.9` nor `1.0.0.23` match the exact format that Maven expects, +and as a result they are mapped as being just a *Qualifier*. String comparison will sort `1.0.0.9` > `1.0.0.23`. + +If you need version numbers to be sorted "correctly" you will need to define some +[version number comparison rules](./version-rules.html). + +### Why is foo:bar version x.y.z not being detected? + +In order to determine what versions of an artifact are present, Maven relies on the presence of +meta-data files in the repository. If the meta-data files are missing or contain invalid information +then Maven will not know about versions that are available in your repositories. + +Here are some common reasons why your metadata can be invalid: + +- You are using a local repository as a remote repository. Stop, don't do this. The local repository +uses a separate set of metadata files from those used by a remote repository. There are tools available +to convert a local repository into a remote repository, but you're really better off using a repository +manager. +- Artifacts have been deployed by non-maven metadata aware tools. +- Tools that claim to be maven meta-data aware have clobbered the metadata files. + +In most cases, using a repository manager will solve these issues as the repository managers usually +rebuild the metadata files based on the artifacts that are present.