Skip to content

Commit a3bb0e7

Browse files
committed
fix: spotless plugin activation issue
Signed-off-by: xstefank <[email protected]>
1 parent b2106f0 commit a3bb0e7

File tree

4 files changed

+51
-53
lines changed

4 files changed

+51
-53
lines changed

Diff for: .github/workflows/pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
cache: 'maven'
2727
- name: Check code format
2828
run: |
29-
./mvnw ${MAVEN_ARGS} spotless:check --file pom.xml
29+
./mvnw ${MAVEN_ARGS} spotless:check --file pom.xml -Dhighest-basedir=$PWD
3030
- name: Run unit tests
3131
run: ./mvnw ${MAVEN_ARGS} clean install -Pno-apt --file pom.xml
3232

Diff for: contributing/eclipse-google-style.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
6666
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
6767
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
68-
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false"/>
68+
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
6969
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
7070
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
7171
<setting id="org.eclipse.jdt.core.formatter.wrap_non_simple_local_variable_annotation" value="true"/>

Diff for: contributing/eclipse.importorder

-7
This file was deleted.

Diff for: pom.xml

+49-44
Original file line numberDiff line numberDiff line change
@@ -327,53 +327,58 @@
327327
<excludedGroups>WatchPermissionAwareTest</excludedGroups>
328328
</configuration>
329329
</plugin>
330+
<plugin>
331+
<groupId>org.commonjava.maven.plugins</groupId>
332+
<artifactId>directory-maven-plugin</artifactId>
333+
<version>0.1</version>
334+
<executions>
335+
<execution>
336+
<id>directories</id>
337+
<goals>
338+
<goal>highest-basedir</goal>
339+
</goals>
340+
<phase>initialize</phase>
341+
<configuration>
342+
<property>highest-basedir</property>
343+
</configuration>
344+
</execution>
345+
</executions>
346+
</plugin>
347+
<plugin>
348+
<groupId>com.diffplug.spotless</groupId>
349+
<artifactId>spotless-maven-plugin</artifactId>
350+
<configuration>
351+
<pom>
352+
<includes>
353+
<include>pom.xml</include>
354+
<include>./**/pom.xml</include>
355+
</includes>
356+
<sortPom>
357+
<expandEmptyElements>false</expandEmptyElements>
358+
</sortPom>
359+
</pom>
360+
<java>
361+
<eclipse>
362+
<file>${highest-basedir}/contributing/eclipse-google-style.xml</file>
363+
</eclipse>
364+
<importOrder>
365+
<order>java,javax,org,io,com,,\#</order>
366+
</importOrder>
367+
<removeUnusedImports/>
368+
</java>
369+
</configuration>
370+
<executions>
371+
<execution>
372+
<goals>
373+
<goal>apply</goal>
374+
</goals>
375+
<phase>compile</phase>
376+
</execution>
377+
</executions>
378+
</plugin>
330379
</plugins>
331380
</build>
332381
<profiles>
333-
<profile>
334-
<id>spotless</id>
335-
<activation>
336-
<file>
337-
<exists>contributing</exists>
338-
</file>
339-
</activation>
340-
<build>
341-
<plugins>
342-
<plugin>
343-
<groupId>com.diffplug.spotless</groupId>
344-
<artifactId>spotless-maven-plugin</artifactId>
345-
<configuration>
346-
<pom>
347-
<includes>
348-
<include>pom.xml</include>
349-
<include>./**/pom.xml</include>
350-
</includes>
351-
<sortPom>
352-
<expandEmptyElements>false</expandEmptyElements>
353-
</sortPom>
354-
</pom>
355-
<java>
356-
<eclipse>
357-
<file>contributing/eclipse-google-style.xml</file>
358-
</eclipse>
359-
<importOrder>
360-
<file>contributing/eclipse.importorder</file>
361-
</importOrder>
362-
<removeUnusedImports/>
363-
</java>
364-
</configuration>
365-
<executions>
366-
<execution>
367-
<goals>
368-
<goal>apply</goal>
369-
</goals>
370-
<phase>compile</phase>
371-
</execution>
372-
</executions>
373-
</plugin>
374-
</plugins>
375-
</build>
376-
</profile>
377382
<profile>
378383
<id>integration-tests</id>
379384
<build>

0 commit comments

Comments
 (0)