locationtech / proj4j

Java port of the Proj.4 library for coordinate reprojection
Other
189 stars 73 forks source link

Fix Eclipse Jenkins deploy #57

Closed echeipesh closed 3 years ago

echeipesh commented 4 years ago

I was looking for a way to publish snapshot and releases from tag information contained in git history, more or less using information from git describe.

After some googling it looks like having a dynamic version as part of the maven publish process requires a maven lifetime plugin as the version property is special and can't be set by normal maven plugins. This looked like the best bet: https://github.com/jgitver/jgitver-maven-plugin

I added it and configured it for this project here: https://github.com/locationtech/proj4j/commit/40c349bced74135c1e33b49cf3a4fa40b4ccfb88

Using this I was able to publish 1.1.1 to maven central from development machine using mvn clean deploy -P central

Sadly Eclipse Jenkins is unable to load the maven plugins:

This issue is to restore some automatic Jenkins publish to Eclipse repos for this project, ideally generating a version based on git history.

pomadchin commented 3 years ago

Closed via https://github.com/locationtech/proj4j/commit/2aec0d0d20fa476f4e75aa57636a91917595c5ec

pomadchin commented 3 years ago

The resolution is to set the fallback version for jenkins manually in the pom.xml file. I was not able to set env variables in the pre build step and https://bugs.eclipse.org/bugs/show_bug.cgi?id=574674 suggests 2aec0d0. We can revisit it later!