https://github.com/random-maven/flatten-maven-plugin
Simplify maven project descriptor for artifact deployment
https://github.com/random-maven/flatten-maven-plugin
flatten maven plugin
Last synced: over 1 year ago
JSON representation
Simplify maven project descriptor for artifact deployment
- Host: GitHub
- URL: https://github.com/random-maven/flatten-maven-plugin
- Owner: random-maven
- License: other
- Created: 2017-11-29T00:42:21.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-11-16T11:37:02.000Z (over 3 years ago)
- Last Synced: 2024-04-21T06:17:28.347Z (about 2 years ago)
- Topics: flatten, maven, plugin
- Language: Shell
- Homepage: https://random-maven.github.io/flatten-maven-plugin/flatten-mojo.html
- Size: 1.02 MB
- Stars: 9
- Watchers: 3
- Forks: 5
- Open Issues: 13
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
### Flatten Maven Plugin
[![Project License][licence_icon]][licence_link]
[![Travis Status][travis_icon]][travis_link]
[![Appvey Status][appvey_icon]][appvey_link]
[![Lines of Code][tokei_basic_icon]][tokei_basic_link]
| | Production Release | Development Release |
|---------|--------------------|---------------------|
|
Install
| [![Central][central_icon]][central_link] | [![Bintray][bintray_icon]][bintray_link] |
Similar plugins
* [mojohaus/flatten-maven-plugin](https://github.com/mojohaus/flatten-maven-plugin)
Plugin features
* replaces published identity
* resolves dependency version ranges
* excludes dependencies based on scope
* optionally includes transitive dependencies
* removes `pom.xml` members based on xml tag names
* switches project `pom.xml` with generated `pom.xml.flatten`
Maven goals
* [flatten:flatten](https://random-maven.github.io/flatten-maven-plugin/flatten-mojo.html)
### Plugin demo
Compare results
* original [pom.xml](https://raw.githubusercontent.com/random-maven/flatten-maven-plugin/master/demo/pom.xml)
* generated [pom.xml.flatten](https://raw.githubusercontent.com/random-maven/flatten-maven-plugin/master/demo/pom.xml.flatten)
### Usage examples
Test projects
* basic project [it/test-1](https://github.com/random-maven/flatten-maven-plugin/blob/master/src/it/test-1/pom.xml)
* scala identity [it/test-2](https://github.com/random-maven/flatten-maven-plugin/blob/master/src/it/test-2/pom.xml)
#### `flatten:flatten` - produce deployment `pom.xml.flatten`
```
mvn clean package -P flatten
```
```xml
flatten
com.carrotgarden.maven
flatten-maven-plugin
true
runtime
false
true
parent
properties
distributionManagement
dependencyManagement
repositories
pluginRepositories
build
profiles
reporting
true
${project.artifactId}
true
jar
flatten
```
### Build yourself
```
cd /tmp
git clone git@github.com:random-maven/flatten-maven-plugin.git
cd flatten-maven-plugin
./mvnw.sh clean install -B -P skip-test
```
[licence_icon]: https://img.shields.io/github/license/random-maven/flatten-maven-plugin.svg?label=License
[licence_link]: http://www.apache.org/licenses/
[travis_icon]: https://travis-ci.org/random-maven/flatten-maven-plugin.svg
[travis_link]: https://travis-ci.org/random-maven/flatten-maven-plugin/builds
[appvey_icon]: https://ci.appveyor.com/api/projects/status/51tica25mhpu3u3l?svg=true
[appvey_link]: https://ci.appveyor.com/project/random-maven/flatten-maven-plugin/history
[tokei_basic_icon]: https://tokei.rs/b1/github/random-maven/flatten-maven-plugin
[tokei_basic_link]: https://github.com/random-maven/flatten-maven-plugin
[central_icon]: https://maven-badges.herokuapp.com/maven-central/com.carrotgarden.maven/flatten-maven-plugin/badge.svg?style=plastic
[central_link]: https://maven-badges.herokuapp.com/maven-central/com.carrotgarden.maven/flatten-maven-plugin
[bintray_icon]: https://api.bintray.com/packages/random-maven/maven/flatten-maven-plugin/images/download.svg
[bintray_link]: https://bintray.com/random-maven/maven/flatten-maven-plugin