Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.dom4j:dom4j:2.0.0'
}
dependencies {
implementation("com.github.dom4j:dom4j:2.0.0")
}
<dependency>
<groupId>com.github.dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>2.0.0</version>
</dependency>
libraryDependencies += "com.github.dom4j" % "dom4j" % "2.0.0"
:dependencies [[com.github.dom4j/dom4j "2.0.0"]]
dom4j
is an open source framework for processing XML which is integrated with XPath and fully supports DOM, SAX, JAXP and the Java platform such as Java 2 Collections.
See https://dom4j.github.io for details.
If you use some optional dependency of dom4j (for example, Jaxen, xsdlib etc.), you need to specify an explicit dependency on it in your project. They are no longer marked as a mandatory transitive dependency by dom4j.
If you are using Gradle 6+ then you may declare a dependency on these features like this:
// Current feature names: jaxen, xsdlib, jaxb, pullParser, xpp
implementation("org.dom4j:dom4j:${dom4jVersion}") {
capabilities {
requireCapability('org.dom4j:dom4j-jaxen-support')
}
}