formatter-build

Forrmater Utility for JAVA, JS, XML, CSS, HTML

Лицензия

Лицензия

Категории

Категории

Сеть ORM Данные
Группа

Группа

com.github.yracnet.formatter
Идентификатор

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

formatter-build
Последняя версия

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

0.2.4
Дата

Дата

Тип

Тип

jar
Описание

Описание

formatter-build
Forrmater Utility for JAVA, JS, XML, CSS, HTML
Ссылка на сайт

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

https://github.com/yracnet/formatter
Система контроля версий

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

http://github.com/yracnet/formatter/tree/master

Скачать formatter-build

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

<!-- https://jarcasting.com/artifacts/com.github.yracnet.formatter/formatter-build/ -->
<dependency>
    <groupId>com.github.yracnet.formatter</groupId>
    <artifactId>formatter-build</artifactId>
    <version>0.2.4</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.yracnet.formatter/formatter-build/
implementation 'com.github.yracnet.formatter:formatter-build:0.2.4'
// https://jarcasting.com/artifacts/com.github.yracnet.formatter/formatter-build/
implementation ("com.github.yracnet.formatter:formatter-build:0.2.4")
'com.github.yracnet.formatter:formatter-build:jar:0.2.4'
<dependency org="com.github.yracnet.formatter" name="formatter-build" rev="0.2.4">
  <artifact name="formatter-build" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.yracnet.formatter', module='formatter-build', version='0.2.4')
)
libraryDependencies += "com.github.yracnet.formatter" % "formatter-build" % "0.2.4"
[com.github.yracnet.formatter/formatter-build "0.2.4"]

Зависимости

compile (10)

Идентификатор библиотеки Тип Версия
net.sourceforge.cssparser : cssparser jar 0.9.27
org.eclipse.jdt : org.eclipse.jdt.core jar 3.19.0
net.revelc.code.formatter : jsdt-core jar 2.6.0
com.fasterxml.jackson.core : jackson-core jar 2.10.0
com.fasterxml.jackson.core : jackson-databind jar 2.10.0
org.jsoup : jsoup jar 1.12.1
org.apache.commons : commons-digester3 jar 3.2
net.revelc.code.formatter : xml-formatter jar 0.2.0
org.codehaus.plexus : plexus-utils jar 3.3.0
org.w3c.css : sac jar 1.3

provided (1)

Идентификатор библиотеки Тип Версия
org.projectlombok : lombok jar 1.18.10

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

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

formatter

Format Source Code for JAVA, CSS, JS, XML, HTML with Eclipse JDT

Formatter Help is an API as utility based in https://code.revelc.net/formatter-maven-plugin

What is the difference?

  1. formatter-maven-plugin is an wrap of eclipse jdt core for maven-plugin and required that used in a pom.xml
  2. formatter-build not depend of maven-plugin, this could use as a simple LIB and wrap the eclipse format jdt

You can use this api in your application in runtime without include the maven-plugin dependency

Declare dependency:

 <dependency>
     <groupId>com.github.yracnet.formatter</groupId>
     <artifactId>formatter-help</artifactId>
     <version>0.2.0</version>
 </dependency>

In your code:

public static void main(String[] args) throws FormatterException, IOException {
  File basedir = new File("/work/project-x");
  File dir1 = new File(basedir, "/src/main");
  File dir2 = new File(basedir, "/src/test");
  
  FormatterBuild build = FormatterBuild.create();

  //basedir is a root directory when exist a source code as JAVA, JS, HTML, CSS
  build.setBasedir(basedir); 

  // this is necesary for declare all directory that format
  // remember that dir1, dir2 are subdirectory of basedir
  build.setDirectories(dir1, dir2); 

  //This execute the format code
  build.execute();  
}

The FormatterBuild Class has many method for configure the execution, please see the project https://code.revelc.net/formatter-maven-plugin

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

Версия
0.2.4
0.2.3