Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format resources #136

Merged
merged 1 commit into from
Dec 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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