Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jacoby6000/sbt-pom-build

Adds build time plugin dependencies to the pom file build section
https://github.com/jacoby6000/sbt-pom-build

Last synced: 25 days ago
JSON representation

Adds build time plugin dependencies to the pom file build section

Awesome Lists containing this project

README

        

# sbt-pom-build-plugins
Adds build time plugin dependencies to the pom file build section

# Install
```sbt
addSbtPlugin("com.github.jacoby6000" % "sbt-pom-build" % "1.0.2")
```

# Configuration

* Set `pomBuildPluginsIgnoreNames` to ignore specific plugins by their artifact name. `sbt-bloop` is included there by default. Any valid regex works.
* Set `pomBuildPluginsIgnoreClasses` to ignore specific plugins by their class name. This is an empty set by default. Any valid regex works.
* Set `pomBuildPluginsIgnoreDirs` to ignore plugins that exist within certain directories. By default the sbt boot plugin is included here, as well as the `./project` directory.

## Example Config:
```sbt
lazy val myProject = project.in("foo").enablePlugins(SbtPomBuild).settings(
pomBuildPluginsIgnoreNames ++= Set("sbt-dependency-graph"), // Do not include sbt-dependency-graph in the pom build plugins list
pomBuildPluginsIgnoreClasses ++= Set("^[^.]+$"), // ignore any plugins if its package has no dots (its in the root project).
pomBuildPluginsIgnoreDirs ++= Seq(file("~/.ivy2/cache/org.my-org/")) // Do not include any ivy dependencies from `org.my-org` in the pom build plugins list
)
```

## Example output

Note the `build` section, normally not included in sbt pom outputs.

```xml

4.0.0
simple
simple_2.12
jar
simple
0.1.0-SNAPSHOT
simple

simple



org.scala-lang
scala-library
2.12.14





com.jacoby6000.sbt
sbt-pom-build
0.1.0-SNAPSHOT


```

# Verifying that the plugin is functioning in your builds
This plugin functions by augmenting the `makePom` step, running an additional step afterward to append the build section
of the pom file.

To test your own builds, simply run `sbt makePom` and then check the contents of the file that is generated.