Skip to content

Commit

Permalink
Merge pull request #136 from jamezp/format-resources
Browse files Browse the repository at this point in the history
Format resources
  • Loading branch information
jamezp authored Dec 20, 2022
2 parents d4adbab + 9a8a78a commit e6c3dc5
Show file tree
Hide file tree
Showing 17 changed files with 170 additions and 72 deletions.
35 changes: 30 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,34 @@ on:
push:
branches:
- 'main'
paths-ignore:
- '.gitignore'
- ".mvn"
- "CODEOWNERS"
- "CODE_OF_CONDUCT.md"
- "CONTRIBUTING.adoc"
- "dco.txt"
- "LICENSE"
- "mvnw"
- "mvnw.cmd"
- "README.adoc"
- "security.txt"
- "*/README.adoc"
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]
paths-ignore:
- '.gitignore'
- ".mvn"
- "CODEOWNERS"
- "CODE_OF_CONDUCT.md"
- "CONTRIBUTING.adoc"
- "dco.txt"
- "LICENSE"
- "mvnw"
- "mvnw.cmd"
- "README.adoc"
- "security.txt"
- "*/README.adoc"

jobs:
build:
Expand Down Expand Up @@ -82,6 +108,7 @@ jobs:
name: Check Code Formatting
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
Expand All @@ -90,9 +117,7 @@ jobs:
java-version: 11
distribution: 'temurin'
cache: 'maven'
- name: Format Source
run: "mvn -B formatter:format"
- name: Check for changes
run: |
[ -z "$(git status --porcelain=v1 2>/dev/null)" ] || (echo -e "::error ::Changes have been found\n$(git status --porcelain)" && exit 1)
- name: Validate Formatting
run: |
mvn -B validate -Pformat-check -Denforcer.skip=true
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
<module xmlns="urn:jboss:module:1.9" name="org.eclipse.microprofile.context-propagation">

<resources>
<artifact name="${org.eclipse.microprofile.context-propagation:microprofile-context-propagation-api}"/>
<artifact name="${org.eclipse.microprofile.context-propagation:microprofile-context-propagation-api}" />
</resources>

<dependencies>
<module name="java.logging"/>
<module name="java.logging" />
</dependencies>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@
<module xmlns="urn:jboss:module:1.9" name="org.eclipse.microprofile.restclient">

<properties>
<property name="jboss.api" value="private"/>
<property name="jboss.api" value="private" />
</properties>

<resources>
<artifact name="${org.eclipse.microprofile.rest.client:microprofile-rest-client-api}"/>
<artifact name="${org.eclipse.microprofile.rest.client:microprofile-rest-client-api}" />
</resources>

<dependencies>
<module name="java.logging"/>
<module name="jakarta.annotation.api"/>
<module name="jakarta.enterprise.api"/>
<module name="jakarta.xml.bind.api"/>
<module name="jakarta.ws.rs.api"/>
<module name="java.logging" />
<module name="jakarta.annotation.api" />
<module name="jakarta.enterprise.api" />
<module name="jakarta.xml.bind.api" />
<module name="jakarta.ws.rs.api" />
</dependencies>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@
<module xmlns="urn:jboss:module:1.9" name="org.jboss.resteasy.microprofile.config">

<properties>
<property name="jboss.api" value="private"/>
<property name="jboss.api" value="private" />
</properties>
<resources>
<artifact name="${org.jboss.resteasy.microprofile:microprofile-config}"/>
<artifact name="${org.jboss.resteasy.microprofile:microprofile-config}" />
</resources>

<dependencies>
<module name="jakarta.enterprise.api"/>
<module name="jakarta.ws.rs.api"/>
<module name="jakarta.servlet.api"/>
<module name="org.eclipse.microprofile.config.api"/>
<module name="org.jboss.resteasy.resteasy-core" services="import"/>
<module name="org.jboss.resteasy.resteasy-core-spi"/>
<module name="jakarta.enterprise.api" />
<module name="jakarta.ws.rs.api" />
<module name="jakarta.servlet.api" />
<module name="org.eclipse.microprofile.config.api" />
<module name="org.jboss.resteasy.resteasy-core" services="import" />
<module name="org.jboss.resteasy.resteasy-core-spi" />
</dependencies>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,25 @@
<module xmlns="urn:jboss:module:1.9" name="org.jboss.resteasy.resteasy-client-microprofile">

<properties>
<property name="jboss.api" value="private"/>
<property name="jboss.api" value="private" />
</properties>
<resources>
<artifact name="${org.jboss.resteasy.microprofile:microprofile-rest-client}"/>
<artifact name="${org.jboss.resteasy.microprofile:microprofile-rest-client-base}"/>
<artifact name="${org.jboss.resteasy.microprofile:microprofile-rest-client}" />
<artifact name="${org.jboss.resteasy.microprofile:microprofile-rest-client-base}" />
</resources>

<dependencies>
<module name="jakarta.annotation.api"/>
<module name="jakarta.enterprise.api"/>
<module name="jakarta.ws.rs.api"/>
<module name="org.eclipse.microprofile.restclient"/>
<module name="org.eclipse.microprofile.config.api"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.resteasy.resteasy-cdi" services="import"/>
<module name="org.jboss.resteasy.resteasy-client-api"/>
<module name="org.jboss.resteasy.resteasy-client" services="import"/>
<module name="org.jboss.resteasy.resteasy-core" services="import"/>
<module name="org.jboss.resteasy.resteasy-core-spi"/>
<module name="org.reactivestreams"/>
<module name="jakarta.annotation.api" />
<module name="jakarta.enterprise.api" />
<module name="jakarta.ws.rs.api" />
<module name="org.eclipse.microprofile.restclient" />
<module name="org.eclipse.microprofile.config.api" />
<module name="org.jboss.logging" />
<module name="org.jboss.resteasy.resteasy-cdi" services="import" />
<module name="org.jboss.resteasy.resteasy-client-api" />
<module name="org.jboss.resteasy.resteasy-client" services="import" />
<module name="org.jboss.resteasy.resteasy-core" services="import" />
<module name="org.jboss.resteasy.resteasy-core-spi" />
<module name="org.reactivestreams" />
</dependencies>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@

<module xmlns="urn:jboss:module:1.9" name="org.jboss.resteasy.microprofile.context-propagation">
<properties>
<property name="jboss.api" value="private"/>
<property name="jboss.api" value="private" />
</properties>

<resources>
<artifact name="${org.jboss.resteasy.microprofile:microprofile-context-propagation}"/>
<artifact name="${org.jboss.resteasy.microprofile:microprofile-context-propagation}" />
</resources>

<dependencies>
<module name="jakarta.ws.rs.api"/>
<module name="org.jboss.resteasy.resteasy-core" services="import"/>
<module name="org.jboss.resteasy.resteasy-core-spi"/>
<module name="org.eclipse.microprofile.config.api" export="true"/>
<module name="org.eclipse.microprofile.context-propagation" export="true"/>
<module name="jakarta.ws.rs.api" />
<module name="org.jboss.resteasy.resteasy-core" services="import" />
<module name="org.jboss.resteasy.resteasy-core-spi" />
<module name="org.eclipse.microprofile.config.api" export="true" />
<module name="org.eclipse.microprofile.context-propagation" export="true" />
</dependencies>
</module>
82 changes: 82 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,36 @@
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<executions>
<execution>
<id>format-resources</id>
<phase>process-resources</phase>
<goals>
<goal>format</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/src/main/resources</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/resources</testSourceDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
<executions>
<execution>
<id>sort-resource-imports</id>
<phase>process-resources</phase>
<goals>
<goal>sort</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/src/main/resources</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/resources</testSourceDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>

Expand Down Expand Up @@ -261,6 +287,62 @@
<additionalJvmArgs>-Djdk.io.File.enableADS=true</additionalJvmArgs>
</properties>
</profile>
<profile>
<id>format-check</id>
<build>
<plugins>
<!-- Validate formatting -->
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<executions>
<execution>
<id>validate-format</id>
<phase>validate</phase>
<goals>
<goal>validate</goal>
</goals>
</execution>
<execution>
<id>validate-format-resources</id>
<phase>validate</phase>
<goals>
<goal>validate</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/src/main/resources</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/resources</testSourceDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
<executions>
<execution>
<id>check-import-sort</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
<execution>
<id>check-import-sort-resources</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/src/main/resources</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/resources</testSourceDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
-->

<arquillian xmlns="http://jboss.org/schema/arquillian" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

<container qualifier="jboss" default="true">
<configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
~ limitations under the License.
-->

<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

<context-param>
<param-name>servletContextProperty</param-name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
~ limitations under the License.
-->

<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

<context-param>
<param-name>servletContextProperty</param-name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
~ limitations under the License.
-->

<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

<listener>
<listener-class>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
~ limitations under the License.
-->

<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

<context-param>
<param-name>system</param-name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
~ limitations under the License.
-->

<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

<context-param>
<param-name>servletContextProperty</param-name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
~ limitations under the License.
-->

<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

<context-param>
<param-name>servletContextProperty</param-name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
~ limitations under the License.
-->

<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

<listener>
<listener-class>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
~ limitations under the License.
-->

<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

<context-param>
<param-name>system</param-name>
Expand Down
Loading

0 comments on commit e6c3dc5

Please sign in to comment.