diff --git a/README.md b/README.md index 43c2fd3..ea8298b 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # pom2xml plug-in for [Kobalt](http://beust.com/kobalt/home/index.html) -[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](http://opensource.org/licenses/BSD-3-Clause) [![release](http://github-release-version.herokuapp.com/github/ethauvin/kobalt-pom2xml/release.svg?style=flat)](https://github.com/ethauvin/kobalt-pom2xml/releases/latest) [![Build Status](https://travis-ci.org/ethauvin/kobalt-pom2xml.svg?branch=master)](https://travis-ci.org/ethauvin/kobalt-pom2xml) [![CircleCI](https://circleci.com/gh/ethauvin/kobalt-pom2xml/tree/master.svg?style=shield)](https://circleci.com/gh/ethauvin/kobalt-pom2xml/tree/master) [![Download](https://api.bintray.com/packages/ethauvin/maven/kobalt-pom2xml/images/download.svg) ](https://bintray.com/ethauvin/maven/kobalt-pom2xml/_latestVersion) +[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](http://opensource.org/licenses/BSD-3-Clause) [![release](https://img.shields.io/github/release/ethauvin/kobalt-pom2xml.svg)](https://github.com/ethauvin/kobalt-pom2xml/releases/latest) [![Build Status](https://travis-ci.org/ethauvin/kobalt-pom2xml.svg?branch=master)](https://travis-ci.org/ethauvin/kobalt-pom2xml) [![CircleCI](https://circleci.com/gh/ethauvin/kobalt-pom2xml/tree/master.svg?style=shield)](https://circleci.com/gh/ethauvin/kobalt-pom2xml/tree/master) [![Download](https://api.bintray.com/packages/ethauvin/maven/kobalt-pom2xml/images/download.svg) ](https://bintray.com/ethauvin/maven/kobalt-pom2xml/_latestVersion) The plug-in will generate a [Project Object Model](https://maven.apache.org/guides/introduction/introduction-to-the-pom.html) (POM) XML file for your project. -To use the plug-in include the following in `Build.kt` file: +To use the plug-in include the following in `Build.kt`: ```kotlin import net.thauvin.erik.kobalt.plugin.pom2xml.* @@ -26,6 +26,12 @@ val p = project { } ``` +To invoke the `pom2xml` task: + +```sh +./kobaltw pom2xml +``` + The `pom.xml` file will be created in the project's directory. [View Example](https://github.com/ethauvin/kobalt-pom2xml/blob/master/example/kobalt/src/Build.kt) @@ -36,8 +42,8 @@ The following optional configuration parameters are available. Attribute | Description :---------------|:---------------------------------------------------------------------------------- -`name` | The directory location to save the POM file to, defaults to the project directory. -`loc` | The name of the POM file, defaults to `pom.xml`. +`loc` | The directory location to save the POM file to, defaults to the project directory. +`name` | The name of the POM file, defaults to `pom.xml`. For example: diff --git a/src/main/kotlin/net/thauvin/erik/kobalt/plugin/pom2xml/Pom2XmlPlugin.kt b/src/main/kotlin/net/thauvin/erik/kobalt/plugin/pom2xml/Pom2XmlPlugin.kt index a12dd47..52c6161 100644 --- a/src/main/kotlin/net/thauvin/erik/kobalt/plugin/pom2xml/Pom2XmlPlugin.kt +++ b/src/main/kotlin/net/thauvin/erik/kobalt/plugin/pom2xml/Pom2XmlPlugin.kt @@ -1,5 +1,5 @@ /* - * VersionEyePlugin.kt + * Pom2XmlPlugin.kt * * Copyright (c) 2018, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. @@ -39,7 +39,6 @@ import com.beust.kobalt.api.annotation.Task import com.beust.kobalt.misc.warn import com.google.inject.Inject import com.google.inject.Singleton - import java.io.File @Singleton