Skip to content

Commit

Permalink
cleaned pom and refined config
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Apr 5, 2020
1 parent 7f8db7a commit ce409fd
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 67 deletions.
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ end_of_line = lf
charset = utf-8
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true
trim_trailing_whitespace = true

[Makefile]
indent_style = tab
11 changes: 10 additions & 1 deletion checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

<!-- Needed to suppress warnings if needed -->
<module name="SuppressWarningsHolder"/>
<module name="SuppressWithNearbyCommentFilter"/>
<module name="SuppressionCommentFilter"/>

<!-- Block checks -->
<module name="AvoidNestedBlocks">
Expand Down Expand Up @@ -127,7 +129,12 @@
<property name="classMaximum" value="800"/>
<property name="fileMaximum" value="1000"/>
</module>
<module name="NPathComplexity"/>
<module name="CyclomaticComplexity">
<property name="max" value="20"/>
</module>
<module name="NPathComplexity">
<property name="max" value="300"/>
</module>


<!-- Miscellaneous -->
Expand Down Expand Up @@ -183,8 +190,10 @@
<!--
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore"/>
<module name="OperatorWrap"/>
-->
<module name="SingleSpaceSeparator"/>
<module name="TypecastParenPad"/>


</module>
Expand Down
57 changes: 17 additions & 40 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19</version>
<version>2.22.2</version>
<configuration>
<excludes>
<exclude>**/*$*</exclude> <!-- exclude all inner classes -->
<exclude>org/matsim/testcases/TestDepth.java</exclude>
<exclude>org/matsim/testcases/MatsimTestCase.java</exclude>
</excludes>
<forkMode>once</forkMode>
<!-- avoid out of memory errors: -->
Expand All @@ -186,8 +184,6 @@

<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<!--Presumably, you can run this by mvn assembly:assembly (?)-->

<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
Expand All @@ -202,8 +198,8 @@
<execution>
<id>make-assembly</id>
<phase>package</phase>
<!--Presumably, this plugin is thus run as part of the package phase. So-->
<!--you can either only run assembly:assembly, or package, where the-->
<!--Run as part of the package phase. -->
<!--So you can either only run assembly:assembly, or package, where the-->
<!--latter may run additional stuff or not.-->
<goals>
<goal>single</goal>
Expand All @@ -227,6 +223,7 @@
</plugin>

<plugin>
<!-- Only executed by default on "release" profile -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.1</version>
Expand All @@ -244,15 +241,6 @@
<failsOnError>true</failsOnError>
<linkXRef>false</linkXRef>
</configuration>
<executions>
<execution>
<id>checkstyle</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand All @@ -262,36 +250,25 @@
<id>release</id>
<build>

<!-- TODO: appassembler or shade plugin if we want a release -->
<defaultGoal>assembly:assembly</defaultGoal>
<!--(I think that the above line is the reason why mvn -Prelease works-->
<!--without defining a goal. And it presumably only works because the-->
<!--assemply plugin is defined above. kai, oct'19)-->
<!--the above line is the reason why mvn -Prelease works without defining a goal.-->

<pluginManagement>
<!--pluginManagement further defines plugins *if* they are loaded-->
<!--elsewhere. So this will only have an effect if the assembly plugin or-->
<!--the jar plugin are loaded above. It then reconfigures it for the-->
<!--profile run.-->

<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/main/assembly/assembly-release.xml</descriptor>
</descriptors>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>libs/</classpathPrefix>
</manifest>
</archive>
</configuration>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<executions>
<execution>
<id>checkstyle</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
Expand Down
25 changes: 0 additions & 25 deletions src/main/assembly/assembly-release.xml

This file was deleted.

0 comments on commit ce409fd

Please sign in to comment.