JavaMoney / jsr354-ri

JSR 354 - Moneta: Reference Implementation
Other
343 stars 101 forks source link

Missing JARs for 1.4.x in official Maven Repos #339

Closed markieww closed 4 years ago

markieww commented 4 years ago

No JAR files of the releases 1.4. are available anymore. Only .pom files.

Please check. https://repo1.maven.org/maven2/org/javamoney/moneta/1.4.2/ https://repo1.maven.org/maven2/org/javamoney/moneta/1.4.1/ https://repo1.maven.org/maven2/org/javamoney/moneta/1.4/

https://oss.jfrog.org/artifactory/oss-release-local/org/javamoney/moneta/1.4.2/ https://oss.jfrog.org/artifactory/oss-release-local/org/javamoney/moneta/1.4.1/ https://oss.jfrog.org/artifactory/oss-release-local/org/javamoney/moneta/1.4/

keilw commented 4 years ago

Yes that's exactly how it's supposed to be. Every version since 1.3 Moneta has been modular and you need to use it as a "BOM", see https://github.com/JavaMoney/javamoney-examples/blob/master/console/javamoney-console-simple/pom.xml or the README in this repo.

ToppScorer commented 1 year ago

Sorry, but this can not be used, how a BOM is supposed to be used. When importing the BOM

<dependencyManagement>
    <dependency>
      <groupId>org.javamoney</groupId>
      <artifactId>moneta</artifactId>
      <version>1.4.2</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
</dependencyManagement>

you should be able to import the artifacts without using the version number:

<dependency>
  <groupId>org.javamoney</groupId>
  <artifactId>moneta-core</artifactId>
</dependency>

but this is not possible, as the groupId is not the same.

If you try to use:

<dependency>
  <groupId>org.javamoney.moneta</groupId>
  <artifactId>moneta-core</artifactId>
</dependency>

the version is missing from the dependency.

keilw commented 1 year ago

As this is the Moneta Parent POM the version number in dependency management is totally fine.

ToppScorer commented 1 year ago

Not sure what you mean by this. How is you "BOM" supposed to be used? Can you give an example where only the moneta-core module would be included in a project?

keilw commented 1 year ago

Check out https://github.com/JavaMoney/javamoney-examples

ToppScorer commented 1 year ago

I think the problem is, that your "BOM" already defines dependencies and not only versions, what BOMs should only do.

keilw commented 1 year ago

Well somewhere you must define them, otherwise you won't find any, but defining a "BOM" is up to you, the examples work the way they are. The top level POM of examples uses dependencyManagement (in a BOM-like style) while individual modules use it. However, the version of Moneta is usually declared in the individual modules only and not from the parent because they may differ, especially the "backport" (which will be phased out soon) had a separate dependency and other modules may also use different versions if they like.

If you feel the need or would like to contribute to a true "BOM", see this very old ticket: https://github.com/JavaMoney/javamoney-parent/issues/4