Skip to content

Instantly share code, notes, and snippets.

@ehartmann
Created June 18, 2015 11:53
Show Gist options
  • Select an option

  • Save ehartmann/0965a9c09c3c1c4a2d2a to your computer and use it in GitHub Desktop.

Select an option

Save ehartmann/0965a9c09c3c1c4a2d2a to your computer and use it in GitHub Desktop.
Check maven properties for OSSRH
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<id>enforce-property</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>project.description</property>
<message>Project description must be specified.</message>
&l
t;/requireProperty>
<requireProperty>
<property>project.name</property>
<message>Project name must be specified.</message>
</requireProperty>
<requireProperty>
<property>project.url</property>
<message>Project url must be specified.</message>
</requireProperty>
<requireProperty>
<property>project.licenses</property>
<message>At least on license must be specified.</message>
</requireProperty>
<requireProperty>
<property>project.developers</property>
<message>At least one developer must be specified.</message>
</requireProperty>
<requireProperty>
<property>project.scm.connection</property>
<message>scm section should be defined in project.</message>
</requireProperty>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment