Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maven archetype-catalog.xml buggy #240

Closed
hohwille opened this issue Aug 30, 2019 · 2 comments · Fixed by #239
Closed

maven archetype-catalog.xml buggy #240

hohwille opened this issue Aug 30, 2019 · 2 comments · Fixed by #239
Labels
bug Something isn't working maven related to apache maven build tool
Milestone

Comments

@hohwille
Copy link
Member

Maven has a catalog for archetypes e.g. to detect the latest version or for GUIs to create search and auto-completion/content-assist for archetype selection:
https://maven.apache.org/archetype/maven-archetype-plugin/specification/archetype-catalog.html

There is a central catalog maintained in maven central repo:
http://repo.maven.apache.org/maven2/archetype-catalog.xml

However, the process of staging releases to maven central and updating the archetype catalog seems buggy or broken. Therefore we deploy releases to maven central but the archetype catalog then does not get updated accordingly.
Currently we have released devon4j in version 3.1.1 providing this archetype:
http://repo.maven.apache.org/maven2/com/devonfw/java/templates/devon4j-template-server/3.1.1/

However the central archetype catalog only contains versions of that archetype until version 3.1.0:
http://repo.maven.apache.org/maven2/archetype-catalog.xml

See also:
https://maven.apache.org/archetype/maven-archetype-plugin/specification/update-catalog.html

@hohwille hohwille added bug Something isn't working maven related to apache maven build tool labels Aug 30, 2019
@hohwille hohwille added this to the release:3.0.0 milestone Aug 30, 2019
@hohwille
Copy link
Member Author

Please note that this is a bug in the maven ecosystem and not of devon-ide. It has already been reported but gets ignored:
https://issues.apache.org/jira/browse/ARCHETYPE-312

Getting such external bugs fixed can take ages - see e.g.:

So as I am tired of this, I will create a simple workaround:

  • when the archetype gets created in devon-ide and no archetypeVersion property is provided, I will download the maven-metadata.xml of the exact GA coordinates of the archetype to be installed and then grep the latest version from there. I will simply add that version as -DarchetypeVersion=${archetypeLatestVersion} and can close this issue.

hohwille added a commit that referenced this issue Aug 30, 2019
#231: #238: fixed download_dir issue
#239: devon4j 3.1.1
#240: workaround for maven archetype-catalog bug
@vapadwal
Copy link
Member

We have created the issue in maven central for the same
https://issues.sonatype.org/browse/MVNCENTRAL-5148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working maven related to apache maven build tool
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants