-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
Added spotless plugin to build/plugins #1334
Conversation
Signed-off-by: Arne Seime <arne.seime@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you.
I tested this in combination with #1303. Before we can merge this PR we have to apply the formatter again (PR #1335) and find a solution for the license headers in the feature files (see #1302 (comment)). Otherwise we will always face the following error:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.753 s (Wall Clock)
[INFO] Finished at: 2020-01-19T12:37:40+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:1.24.3:check (codestyle_check) on project org.openhab.core.tools.archetypes.binding: The following files had format violations:
[ERROR] src/main/resources/archetype-resources/src/main/feature/feature.xml
[ERROR] @@ -1,22 +1,12 @@
[ERROR] <?xml·version="1.0"·encoding="UTF-8"?>
[ERROR] -<!--
[ERROR] -
[ERROR] -\tCopyright·(c)·2010-2020·Contributors·to·the·openHAB·project
[ERROR] -
[ERROR] -\tSee·the·NOTICE·file(s)·distributed·with·this·work·for·additional
[ERROR] -\tinformation.
[ERROR] -
[ERROR] -\tThis·program·and·the·accompanying·materials·are·made·available·under·the
[ERROR] -\tterms·of·the·Eclipse·Public·License·2.0·which·is·available·at
[ERROR] -\thttp://www.eclipse.org/legal/epl-2.0
[ERROR] -
[ERROR] -\tSPDX-License-Identifier:·EPL-2.0
[ERROR] -
[ERROR] --->
[ERROR] +<!--·Copyright·(c)·2010-2020·Contributors·to·the·openHAB·project·See·the·NOTICE·file(s)·distributed·with·this·work·for·additional
[ERROR] +\tinformation.·This·program·and·the·accompanying·materials·are·made·available·under·the·terms·of·the·Eclipse·Public·License
[ERROR] +\t2.0·which·is·available·at·http://www.eclipse.org/legal/epl-2.0·SPDX-License-Identifier:·EPL-2.0·-->
[ERROR] <features·name="${rootArtifactId}-${project.version}"·xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
[ERROR] \t<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>
[ERROR]
[ERROR] -\t<feature·name="openhab-binding-${bindingId}"·description="${bindingIdCamelCase}·Binding"·version="${project.version}">\t
[ERROR] +\t<feature·name="openhab-binding-${bindingId}"·description="${bindingIdCamelCase}·Binding"
[ERROR] +\t\tversion="${project.version}">
[ERROR] \t\t<feature>openhab-runtime-base</feature>
[ERROR] \t\t<bundle·start-level="80">mvn:org.openhab.addons.bundles/${rootArtifactId}/${project.version}</bundle>
[ERROR] \t</feature>
[ERROR] Run 'mvn spotless:apply' to fix these violations.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :org.openhab.core.tools.archetypes.binding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// EDIT: Wrong PR ...
LGTM. Thanks.
See also #1334 (review):
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.282 s
[INFO] Finished at: 2020-01-19T12:56:56+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:1.24.3:check (codestyle_check) on project org.openhab.addons.features.karaf.openhab-addons: The following files had format violations:
[ERROR] src/main/resources/header.xml
[ERROR] @@ -1,19 +1,7 @@
[ERROR] <?xml·version="1.0"·encoding="UTF-8"?>
[ERROR] -<!--
[ERROR] -
[ERROR] -\tCopyright·(c)·2010-2020·Contributors·to·the·openHAB·project
[ERROR] -
[ERROR] -\tSee·the·NOTICE·file(s)·distributed·with·this·work·for·additional
[ERROR] -\tinformation.
[ERROR] -
[ERROR] -\tThis·program·and·the·accompanying·materials·are·made·available·under·the
[ERROR] -\tterms·of·the·Eclipse·Public·License·2.0·which·is·available·at
[ERROR] -\thttp://www.eclipse.org/legal/epl-2.0
[ERROR] -
[ERROR] -\tSPDX-License-Identifier:·EPL-2.0
[ERROR] -
[ERROR] --->
[ERROR] +<!--·Copyright·(c)·2010-2020·Contributors·to·the·openHAB·project·See·the·NOTICE·file(s)·distributed·with·this·work·for·additional
[ERROR] +\tinformation.·This·program·and·the·accompanying·materials·are·made·available·under·the·terms·of·the·Eclipse·Public·License
[ERROR] +\t2.0·which·is·available·at·http://www.eclipse.org/legal/epl-2.0·SPDX-License-Identifier:·EPL-2.0·-->
[ERROR] <features·name="${project.artifactId}-${project.version}"·xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
[ERROR]
[ERROR] -····<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>
[ERROR] -
[ERROR] +\t<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>
[ERROR] Run 'mvn spotless:apply' to fix these violations.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :org.openhab.addons.features.karaf.openhab-addons
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let us merge this as it will not hurt and continue further discussion in #1303.
…references to Joda and 'Instant' (openhab#1334) Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
See #1303
Signed-off-by: Arne Seime arne.seime@gmail.com