All Downloads are FREE. Search and download functionalities are using the official Maven repository.

about.managing-dependencies.adoc Maven / Gradle / Ivy

There is a newer version: 4.1.1
Show newest version
///////////////////////////////////////////////////////////////////////////////

    Copyright (c) 2018, 2023 Oracle and/or its affiliates.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

///////////////////////////////////////////////////////////////////////////////

= Managing Dependencies
:description: Managing Maven dependencies
:keywords: bom, dependency management
:rootdir: {docdir}/..

include::{rootdir}/includes/attributes.adoc[]

Helidon provides a "`Bill Of Materials`" (BOM) to manage dependencies.
This is a special Maven pom file that provides dependency management.

Using the Helidon BOM allows you to use Helidon component dependencies with a
 single version: the Helidon version.

== The Helidon Application POMs

If you created your application using the xref:cli.adoc[Helidon CLI] or
xref:prerequisites.adoc[archetypes] then your
project will have a Helidon Application POM as its parent POM. In this case you
will get Helidon's dependency management automatically.

If your project doesn't use a Helidon Application POM as its parent, then
you will need to import the Helidon BOM POM.

== The Helidon BOM POM

To import the Helidon BOM POM add the following snippet to your pom.xml file.

[source,xml,subs="attributes+"]
.Import the Helidon BOM
----

    
        
            io.helidon
            helidon-bom
            {helidon-version}
            pom
            import
        
    

----

== Using Helidon Component Dependencies

Once you have imported the BOM, you can declare dependencies on Helidon
 components without specifying a version.

[source,xml]
.Component dependency
----

    io.helidon.config
    helidon-config-yaml

----

== For More Information

-  Maven Build Guide for xref:../se/guides/maven-build.adoc[SE] and
 xref:../mp/guides/maven-build.adoc[MP]
-  Gradle Build Guide for xref:../se/guides/gradle-build.adoc[SE] and
 xref:../mp/guides/gradle-build.adoc[MP]





© 2015 - 2024 Weber Informatics LLC | Privacy Policy