Maven POM lint plugin

Generates a report of suspicious/inconsistent POM elements, and optionally fails the build if violations are found.

Лицензия

Лицензия

Категории

Категории

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

Группа

com.lewisd
Идентификатор

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

lint-maven-plugin
Последняя версия

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

0.0.11
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

Maven POM lint plugin
Generates a report of suspicious/inconsistent POM elements, and optionally fails the build if violations are found.
Ссылка на сайт

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

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

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

https://github.com/lewisd32/lint-maven-plugin

Скачать lint-maven-plugin

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

<plugin>
    <groupId>com.lewisd</groupId>
    <artifactId>lint-maven-plugin</artifactId>
    <version>0.0.11</version>
</plugin>

Зависимости

compile (21)

Идентификатор библиотеки Тип Версия
org.codehaus.plexus : plexus-utils jar 3.0.22
org.apache.maven : maven-plugin-api jar 3.0
org.apache.maven : maven-model-builder jar 3.0
org.apache.maven : maven-core jar 3.0
org.apache.maven : maven-compat jar 3.0
org.springframework : spring-core jar 3.1.1.RELEASE
org.springframework : spring-context jar 3.1.1.RELEASE
org.jmock : jmock-junit4 jar 2.5.1
com.thoughtworks.xstream : xstream jar 1.4.8
org.jdom : jdom jar 2.0.2
org.jdom : jaxen-jdom jar 1.0-FCS
org.jdom : jaxen-core jar 1.0-FCS
org.jdom : saxpath jar 1.0-FCS
log4j : log4j jar 1.2.17
org.apache.velocity : velocity jar 1.7
org.apache.velocity : velocity-tools jar 2.0
commons-jxpath : commons-jxpath jar 1.3
com.google.guava : guava jar 18.0
commons-validator : commons-validator jar 1.4.1
org.sonatype.aether : aether-connector-wagon jar 1.13.1
org.apache.maven.wagon : wagon-http jar 2.9

provided (1)

Идентификатор библиотеки Тип Версия
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.4

test (7)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.jmock : jmock jar 2.5.1
com.google.collections : google-collections jar 1.0
org.easytesting : fest-assert-core jar 2.0M10
org.mockito : mockito-core jar 1.9.5
org.apache.maven.plugin-testing : maven-plugin-testing-harness jar 3.3.0
org.apache.maven : maven-embedder jar 3.0

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

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

travisci Maven Central

One-Time Usage Instructions

If you want to try out lint, or run it one time with minimal hassle and no config changes, follow these simple steps:

  1. Run "mvn install" in the lint-maven-plugin folder to install the plugin into your local Maven repository.
  2. Change your current folder to one containing a Maven project that you want to lint.
  3. Run "mvn com.lewisd:lint-maven-plugin:check".

Add Lint to your Build

  1. Run "mvn install" in the lint-maven-plugin folder to install the plugin into your local Maven repository.
  2. Add a plugin declaration to your project's pom file as follows:
	[...]
	<build>
		<plugins>
			<plugin>
				<groupId>com.lewisd</groupId>
				<artifactId>lint-maven-plugin</artifactId>
				<version>0.0.8</version>
				<executions>
					<execution>
						<id>pom-lint</id>
						<phase>validate</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	[...]

3. Build your project as usual (usually "mvn install"). The build will fail if lint finds a problem.

Configure Rules and Failing on violation

<plugin>
	<groupId>com.lewisd</groupId>
	<artifactId>lint-maven-plugin</artifactId>
	<version>0.0.8</version>
	<configuration>
		<failOnViolation>false</failOnViolation>
		<onlyRunRules>
			<rule>ExecutionId</rule>
		</onlyRunRules>
		<xmlOutputFile>${project.build.directory}/maven-lint-result.xml</xmlOutputFile>
	</configuration>
	<executions>
		<execution>
			<id>pom-lint</id>
			<phase>validate</phase>
			<goals>
				<goal>check</goal>
			</goals>
		</execution>
	</executions>
</plugin>

List available Rules

mvn com.lewisd:lint-maven-plugin:list
  • DotVersionProperty

The convention is to specify properties used to hold versions as some.library.version, or some-library.version, but never some-library-version or some.library-version.

  • VersionProp

The ${version} property is deprecated. Use ${project.version} instead.

  • GAVOrder

Maven convention is that the groupId, artifactId, and version elements be listed in that order. Other elements with short, simple content, such as type, scope, classifier, etc, should be before elements with longer content, such as configuration, executions, and exclusions, otherwise they can be easily missed, leading to confusion.

  • RedundantDepVersion

Dependency versions should be set in one place, and not overridden without the version. If, for example, sets a version, and somewhere overrides it, but with the same version, this can make version more difficult, due to the repetition.

  • RedundantPluginVersion

Plugin versions should be set in one place, and not overridden without changing version. If, for example, sets a version, and overrides it, but with the same version, this can make version upgrades more due to the repetition.

  • ProfileOnlyAddModules

Profiles who's ids match the pattern with-.* must only add modules to the reactor.

  • DuplicateDep

Multiple dependencies, in or , with the co-ordinates are reduntant, and can be confusing. If they have different they can lead to unexpected behaviour.

  • ExecutionId

Executions should always specify an id, so they can be overridden in child and uniquely identified in build logs.

  • OSSDevelopersSectionRule

The users/developers need to know where to get active bugs and to report new to.

  • OSSContinuousIntegrationManagementSectionRule

For better understanding the project a link to the used integration system users to trust.

  • OSSInceptionYearRule

For better understanding the project the inception year of your project is required.

  • OSSIssueManagementSectionRule

The users/developers need to know where to get active bugs and to report new to.

  • OSSLicenseSectionRule

Each project should be licensed under a specific license so the terms of usage clear.

  • OSSUrlSectionRule

For better understanding the project a link to your project is required.

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

Версия
0.0.11
0.0.10
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1