maven-bom

Publish a bom from a multi-module-project

时光毁灭记忆、已成空白 提交于 2021-02-06 17:01:10
问题 We are a large company with about 2000 separate Java projects. For historic reasons, we do not have multi-module projects, but we would like to introduce them. Logically, we already have "groups" of projects, i.e. someone responsible for (say) 50 projects which are closely related. This someone regularly publishes a BOM which contains recent, coherent versions of these 50 projects. Now it would make a lot of sense to grab these 50 projects and put them into one large multi-module project.

Publish BOM (as pom.xml) using gradle plugin java-platform

江枫思渺然 提交于 2020-06-29 08:05:11
问题 I am setting up a project specific BOM that will "inherit" definitions from other BOMs (available as pom.xml) and also define own managed dependendies. I tried the following (as stated in the java-platform docs) in my build.gradle.kts : plugins { `java-platform` `maven-publish` } dependencies { constraints { api(platform("org.camunda.bpm:camunda-bom:${Versions.camunda}")) } } publishing { publications { create<MavenPublication>("camunda-bom") { from(components["javaPlatform"]) } } } But when

Is it good practice to define scope of dependencies in Maven BOM (bill of materials)?

安稳与你 提交于 2019-12-23 11:41:38
问题 I have a pom.xml like this to be used as a BOM (Bill of Materials). One of the defined dependencies is a *-test artifact used for testing your code that uses the libraries from this BOM. The question is: is it appropriate / good practice to specify that the *-test artifact is just for test scope in the BOM itself, or should this be left for the users of the BOM to specify in their project's POM, if needed? <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0

Can I create a Maven POM-only (BOM) build using the Gradle maven plugin to be deployed to Nexus?

我只是一个虾纸丫 提交于 2019-12-10 21:58:16
问题 I have a Gradle project which uses Spring's dependency management plugin to define a list of dependency versions. I am also using the Maven plugin to deploy the project to a Maven repository. I would like to be able to deploy this as a Maven bill of materials (BOM) so that I can use it in other Gradle projects to define my dependency versions. I have been able to get this to work so long as I also deploy a JAR file. However, the JAR is completely empty and superfluous. My goal is to generate

Maven parent POM vs BOM dependency management

让人想犯罪 __ 提交于 2019-12-10 18:20:04
问题 Let's say I have a maven parent POM root which defines foo:bar:1.0.0 in dependency management. I have another parent POM parent which uses root as parent (just to add another layer to the example). Lastly I have a bill of materials bom which uses root as its parent but redefines foo:bar:2.0.0 in its dependency management. In my project app I inherit from parent and then I import the BOM in the dependency management section of app root (foo:bar:1.0.0) <- parent <- app+bom ^ | bom (foo:bar:2.0

How to find a Maven dependency version declaration imported from a BOM

人走茶凉 提交于 2019-12-07 04:37:41
问题 A multi-module parent POM declares the following BOM import: <dependencyManagement> <dependencies> <dependency> <groupId>io.spring.platform</groupId> <artifactId>platform-bom</artifactId> <version>${spring.io.platform.version}</version> <type>pom</type> <scope>import</scope> </dependency> Then a module POM declares a Hibernate dependency: <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> </dependency> How do I find out with Maven command line or IntelliJ

Does Maven have a way to get a dependency version as a property?

亡梦爱人 提交于 2019-12-04 00:11:27
问题 I'm using a BOM to import dependencies from another project to mine, and I need a way to reference a dependency's version that is already declared in said BOM. So far, I've attempted to list the dependency version as a property in the BOM, but this approach fails because properties don't get imported with BOMs. I've seen where the Dependency Plugin's dependency:properties goal does almost exactly what I need, but instead of giving me a full path of the artifact I need the version as a