Update xml file plugin

Maven plugin that updates the text values in xml file based on provided values or values in anothers xml

Лицензия

Лицензия

Категории

Категории

Maven Компиляция и сборка
Группа

Группа

org.chare.maven.plugins
Идентификатор

Идентификатор

update-xml-file-maven-plugin
Последняя версия

Последняя версия

0.0.3.Final
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

Update xml file plugin
Maven plugin that updates the text values in xml file based on provided values or values in anothers xml
Ссылка на сайт

Ссылка на сайт

https://github.com/psakar/update-xml-file-maven-plugin
Система контроля версий

Система контроля версий

https://github.com/psakar/update-xml-file-maven-plugin.git

Скачать update-xml-file-maven-plugin

Как подключить последнюю версию

<plugin>
    <groupId>org.chare.maven.plugins</groupId>
    <artifactId>update-xml-file-maven-plugin</artifactId>
    <version>0.0.3.Final</version>
</plugin>

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.6.0
org.apache.maven : maven-compat jar 3.6.0
commons-io : commons-io jar 2.6
com.ximpleware : vtd-xml jar 2.13.4

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

Update xml file

Update xml file is a Maven plugin that updates the text values in xml file based on provided values or values in anothers xml files. What should be updated from where can be stored in configuration file

Installation

Prerequisites:

  • JDK 8 or a newer version
  • Maven 3.3.9 or a newer version

Run the build command:

mvn clean install

You can also build skipping tests:

mvn clean install -DskipITs

Usage

The required Maven options are:

  • -DupdateXmlFile.updatedFile - xml file that will be updated
  • -DupdateXmlFile.configFile - configuration file (local file or HTTP URL)

An example of how to run:

mvn org.chare.maven.plugins:update-xml-file-maven-plugin:update \
	-DupdateXmlFile.updatedFile=/path/to/target/pom.xml \
	-DupdateXmlFile.configFile=configurationFile

It is possible to update multiple xml files at the same time using * in the Pom path, like:

-DupdateXmlFile.updatedFile=/tmp/repo/*/pom.xml

Configuration file

The configuration file defines the properties to be updated. The file is in CSV format and has 3 fields:

  • XPath to the property that will be updated
  • Source Type of the reference used for the update (VARIABLE or FILE)
  • Reference Property (reference xml file name + property XPath) or Variable name.

There are some configurations files as part of this project in "configs" folder.

Example of FILE source type

//properties/version.commons-io;FILE;wildflyCorePom://properties/version.commons-io

Where "wildflyCorePom" is the reference Pom which contains the version for the update and "//properties/version.commons-io" is the property XPath.

To define "wildflyCorePom" value, add it as a Maven option:

-DwildflyCorePom=/path/to/file/pom.xml

Value can be path to a local file or HTTP URL.

Example of VARIABLE source type

//properties/version.server.bom;VARIABLE;serverBomVersion

Where "serverBomVersion" is the name of the option that will be given to Maven.

To define "serverBomVersion" value, add it as a Maven option:

-DserverBomVersion=14.0.1.Final

Extra options

The following Maven options are optional

  • -DupdateXmlFile.update - Automatically update versions in target file. (-DupdateXmlFile.update=false is dry-run mode)
  • -DupdateXmlFile.strictMode - Execution fails if a property defined in the configuration file is not found. (-DupdateXmlFile.strictMode=true is fail-fast mode)

Default value for -DupdateXmlFile.update is true and -DupdateXmlFile.stricMode is false

License

This project is licensed under the Apache License 2.0

Версии библиотеки

Версия
0.0.3.Final
0.0.2.Final
0.0.1.Final