Skip to content

Commit

Permalink
SDK-340: Add Maven Resources Plugin and Plexus Utils Dependency for B…
Browse files Browse the repository at this point in the history
…ackward Compatibility in SDK Module Archetypes (#299)
  • Loading branch information
mherman22 authored Oct 8, 2024
1 parent 8bf2c07 commit 17f17aa
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,31 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
<version>1.5.0</version>
<dependencies>
<!-- Needed because of maven 3.9.0 backward compatibility issue,
See : https://github.com/revelc/impsort-maven-plugin/issues/64 -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.5.1</version>
</dependency>
</dependencies>
<configuration>
<groups>javax, java, *</groups>
<removeUnused>true</removeUnused>
</configuration>
<executions>
<execution>
<goals>
<goal>sort</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,31 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
<version>1.5.0</version>
<dependencies>
<!-- Needed because of maven 3.9.0 backward compatibility issue,
See : https://github.com/revelc/impsort-maven-plugin/issues/64 -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.5.1</version>
</dependency>
</dependencies>
<configuration>
<groups>javax, java, *</groups>
<removeUnused>true</removeUnused>
</configuration>
<executions>
<execution>
<goals>
<goal>sort</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
Expand Down
142 changes: 142 additions & 0 deletions archetype-module-refapp/src/main/resources/archetype-resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,148 @@
</dependencies>
</dependencyManagement>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<runOrder>alphabetical</runOrder>
</configuration>
</plugin>
<plugin>
<groupId>org.openmrs.maven.plugins</groupId>
<artifactId>maven-openmrs-plugin</artifactId>
<version>1.0.1</version>
</plugin>
<plugin>
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-maven-plugin</artifactId>
<version>0.1</version>
<executions>
<execution>
<id>directories</id>
<goals>
<goal>highest-basedir</goal>
</goals>
<phase>validate</phase>
<configuration>
<property>main.basedir</property>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>3.0</version>
<configuration>
<header>${main.basedir}${file.separator}license-header.txt</header>
<headerDefinitions>
<headerDefinition>${main.basedir}${file.separator}license-format.xml</headerDefinition>
</headerDefinitions>
<mapping>
<java>JAVA_STYLE</java>
<xml>MYXML_STYLE</xml>
</mapping>
<includes>
<include>**/*.java</include>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
<excludes>
<exclude>license-format.xml</exclude>
<exclude>**/pom.xml</exclude>
<exclude>**/target/**</exclude>
<exclude>.git/**</exclude>
<exclude>.idea/**</exclude>
<exclude>.settings/**</exclude>
<exclude>.externalToolBuilders/</exclude>
<exclude>nbproject/private/</exclude>
<exclude>.vscode/**</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>add-license</id>
<goals>
<goal>format</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<version>2.13.0</version>
<configuration>
<lineEnding>LF</lineEnding>
<configFile>eclipse/OpenMRSFormatter.xml</configFile>
</configuration>
<dependencies>
<dependency>
<groupId>org.openmrs.tools</groupId>
<artifactId>openmrs-tools</artifactId>
<version>${openmrsPlatformToolsVersion}</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
<version>1.5.0</version>
<dependencies>
<!-- Needed because of maven 3.9.0 backward compatibility issue,
See : https://github.com/revelc/impsort-maven-plugin/issues/64 -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.5.1</version>
</dependency>
</dependencies>
<configuration>
<groups>javax, java, *</groups>
<removeUnused>true</removeUnused>
</configuration>
<executions>
<execution>
<goals>
<goal>sort</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Fix for "Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project application-etude: Input length = 1" -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
</plugin>

</plugins>
</pluginManagement>
</build>

<repositories>
<repository>
<id>openmrs-repo</id>
Expand Down

0 comments on commit 17f17aa

Please sign in to comment.