[SOLVED] Binding skeleton creation script doesn't satisfy code analysis tool (missing NOTICE, wrong License Comments in source files)

  • Platform information:
    • OS: Windows 10
    • Java Runtime Environment: 1.8
    • openHAB version: 2.4.0 via Eclipse install
  • Issue of the topic: The skeleton code based on the maven archetype does not satisfy the code analysis tool.

I’m creating a new binding with

git\openhab2-addons\addons\binding (master -> origin)
λ create_openhab_binding_skeleton.cmd MyTestBinding Fabian

This runs through successfully (See log 1 at the end)

λ cd org.openhab.binding.mytestbinding\
λ mvn install

This complains about a missing notice file (full log 2 at the end)

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:1.0.0:package-plugin (default-package-plugin) on project org.openhab.binding.mytestbinding: C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\build.properties: bin.includes value(s) [NOTICE] do not match any files. -> [Help 1]

A notice file I can create:

λ touch NOTICE
λ mvn install

This results in more errors (see log 3 at the end)

[ERROR] Code Analysis Tool has found:
 5 error(s)!
 0 warning(s)
 4 info(s)
[ERROR] .binding.mytestbinding\build.properties:[0]
about.html file must be added to the bin.includes property
[ERROR] org.openhab.binding.mytestbinding.internal.MyTestBindingBindingConstants.java:[2]
Header line doesn't match pattern ^ \* Copyright \(c\) 2010-2018 by the respective copyright holders\.$
[ERROR] org.openhab.binding.mytestbinding.internal.MyTestBindingConfiguration.java:[2]
Header line doesn't match pattern ^ \* Copyright \(c\) 2010-2018 by the respective copyright holders\.$
[ERROR] org.openhab.binding.mytestbinding.internal.MyTestBindingHandler.java:[2]
Header line doesn't match pattern ^ \* Copyright \(c\) 2010-2018 by the respective copyright holders\.$
[ERROR] org.openhab.binding.mytestbinding.internal.MyTestBindingHandlerFactory.java:[2]
Header line doesn't match pattern ^ \* Copyright \(c\) 2010-2018 by the respective copyright holders\.$

I went so far as to fix the regexes (and included the about.html), but then more regex checks failed…

Sadly I don’t have the experience with maven, but I guess a fix somewhere in the archetype is necessary?
The archetype-settings.xml points to https://repo.eclipse.org/content/repositories/smarthome-snapshots/ , but from here on out I dond’t know how to proceed any further.

If someone could point me the way to those files I’d be more than happy to fix them an create my first pull request?
Or is it already fixed and I’m on a wrong version?

Thanks in advance!
Fabian



If logs where generated please post these here using code fences:
Log 1: Output from the skeleton creation:

[INFO] Scanning for projects...
Downloading from archetype: https://repo.eclipse.org/content/repositories/smarthome-snapshots/org/openhab/pom-tycho/2.4.0-SNAPSHOT/maven-metadata.xml
Downloading from openhab-artifactory-snapshot: https://openhab.jfrog.io/openhab/libs-snapshot/org/openhab/pom-tycho/2.4.0-SNAPSHOT/maven-metadata.xml
Downloaded from openhab-artifactory-snapshot: https://openhab.jfrog.io/openhab/libs-snapshot/org/openhab/pom-tycho/2.4.0-SNAPSHOT/maven-metadata.xml (599 B at 713 B/s)
[WARNING] Could not transfer metadata org.openhab:pom-tycho:2.4.0-SNAPSHOT/maven-metadata.xml from/to p2-openhab-deps-repo (https://dl.bintray.com/openhab/p2/openhab-deps-repo/${ohdr.version}): Cannot access https://dl.bintray.com/openhab/p2/openhab-deps-repo/${ohdr.version} with type p2 using the available connector factories: BasicRepositoryConnectorFactory
Downloading from openhab-artifactory-snapshot: https://openhab.jfrog.io/openhab/libs-snapshot/org/openhab/pom/2.4.0-SNAPSHOT/maven-metadata.xml Downloading from archetype: https://repo.eclipse.org/content/repositories/smarthome-snapshots/org/openhab/pom/2.4.0-SNAPSHOT/maven-metadata.xml Downloaded from openhab-artifactory-snapshot: https://openhab.jfrog.io/openhab/libs-snapshot/org/openhab/pom/2.4.0-SNAPSHOT/maven-metadata.xml (593 B at 2.0 kB/s)
[WARNING] Could not transfer metadata org.openhab:pom:2.4.0-SNAPSHOT/maven-metadata.xml from/to p2-openhab-deps-repo (https://dl.bintray.com/openhab/p2/openhab-deps-repo/${ohdr.version}): Cannot access https://dl.bintray.com/openhab/p2/openhab-deps-repo/${ohdr.version} with type p2 using the available connector factories: BasicRepositoryConnectorFactory
[WARNING] The POM for org.openhab.tools.sat:sat-plugin:jar:{sat.version} is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.openhab.tools.sat:sat-plugin:{sat.version}: Plugin org.openhab.tools.sat:sat-plugin:{sat.version} or one of its dependencies could not be resolved: Failure to find org.openhab.tools.sat:sat-plugin:jar:{sat.version} in https://jcenter.bintray.com/ was cached in the local repository, resolution will not be reattempted until the update interval of jcenter has elapsed or updates are forced
[INFO]
[INFO] ----------------------< org.openhab.binding:pom >-----------------------
[INFO] Building openHAB Bindings 2.4.0-SNAPSHOT
[INFO] --------------------------------[ pom ]---------------------------------
[WARNING] The POM for org.openhab.tools.sat:sat-plugin:jar:{sat.version} is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.openhab.tools.sat:sat-plugin:{sat.version}: Plugin org.openhab.tools.sat:sat-plugin:{sat.version} or one of its dependencies could not be resolved: Failure to find org.openhab.tools.sat:sat-plugin:jar:{sat.version} in https://jcenter.bintray.com/ was cached in the local repository, resolution will not be reattempted until the update interval of jcenter has elapsed or updates are forced
[INFO]
[INFO] >>> maven-archetype-plugin:3.0.1:generate (default-cli) > generate-sources @ pom >>>
[INFO]
[INFO] --- directory-maven-plugin:0.2:highest-basedir (directories) @ pom ---
[INFO] Highest basedir set to: C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons
[INFO]
[INFO] <<< maven-archetype-plugin:3.0.1:generate (default-cli) < generate-sources @ pom <<<
[INFO]
[INFO]
[INFO] --- maven-archetype-plugin:3.0.1:generate (default-cli) @ pom ---
[INFO] Generating project in Interactive mode
[INFO] Archetype repository not defined. Using the one from [org.eclipse.smarthome.archetype:org.eclipse.smarthome.archetype.binding:0.7.0-SNAPSHOT -> https://repo.eclipse.org/content/repositories/smarthome-snapshots] found in catalog remote
Downloading from org.eclipse.smarthome.archetype.binding-repo: 

[Cut ...]


[INFO] Using property: groupId = org.openhab.binding
[INFO] Using property: artifactId = org.openhab.binding.mytestbinding
[INFO] Using property: version = 2.4.0-SNAPSHOT
[INFO] Using property: package = org.openhab.binding.mytestbinding
[INFO] Using property: author = Fabian
[INFO] Using property: bindingId = mytestbinding
[INFO] Using property: bindingIdCamelCase = MyTestBinding
[INFO] Using property: namespace = org.openhab
[INFO] Using property: startYear = 2014
[INFO] Using property: vendorName = openHAB
Confirm properties configuration:
groupId: org.openhab.binding
artifactId: org.openhab.binding.mytestbinding
version: 2.4.0-SNAPSHOT
package: org.openhab.binding.mytestbinding
author: Fabian
bindingId: mytestbinding
bindingIdCamelCase: MyTestBinding
namespace: org.openhab
startYear: 2014
vendorName: openHAB
 Y: : y
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: org.eclipse.smarthome.archetype.binding:0.10.0-SNAPSHOT
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.openhab.binding
[INFO] Parameter: artifactId, Value: org.openhab.binding.mytestbinding
[INFO] Parameter: version, Value: 2.4.0-SNAPSHOT
[INFO] Parameter: package, Value: org.openhab.binding.mytestbinding
[INFO] Parameter: packageInPathFormat, Value: org/openhab/binding/mytestbinding
[INFO] Parameter: bindingIdCamelCase, Value: MyTestBinding
[INFO] Parameter: vendorName, Value: openHAB
[INFO] Parameter: namespace, Value: org.openhab
[INFO] Parameter: author, Value: Fabian
[INFO] Parameter: groupId, Value: org.openhab.binding
[INFO] Parameter: version, Value: 2.4.0-SNAPSHOT
[INFO] Parameter: startYear, Value: 2014
[INFO] Parameter: bindingId, Value: mytestbinding
[INFO] Parameter: package, Value: org.openhab.binding.mytestbinding
[INFO] Parameter: artifactId, Value: org.openhab.binding.mytestbinding
[INFO] Parent element not overwritten in C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\pom.xml
[WARNING] Don't override file C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\pom.xml
[INFO] Project created from Archetype in dir: C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.439 s
[INFO] Finished at: 2018-06-28T14:29:00+02:00
[INFO] ------------------------------------------------------------------------
        1 file(s) copied.

Log 2: Output from the first mvn install

[INFO] Scanning for projects...
Downloading from openhab-artifactory-snapshot: https://openhab.jfrog.io/openhab/libs-snapshot/org/openhab/pom-tycho/2.4.0-SNAPSHOT/maven-metadata.xml
Downloaded from openhab-artifactory-snapshot: https://openhab.jfrog.io/openhab/libs-snapshot/org/openhab/pom-tycho/2.4.0-SNAPSHOT/maven-metadata.xml (599 B at 766 B/s)
[WARNING] Could not transfer metadata org.openhab:pom-tycho:2.4.0-SNAPSHOT/maven-metadata.xml from/to p2-openhab-deps-repo (https://dl.bintray.com/openhab/p2/openhab-deps-repo/${ohdr.version}): Cannot access https://dl.bintray.com/openhab/p2/openhab-deps-repo/${ohdr.version} with type p2 using the available connector factories: BasicRepositoryConnectorFactory
Downloading from openhab-artifactory-snapshot: https://openhab.jfrog.io/openhab/libs-snapshot/org/openhab/pom/2.4.0-SNAPSHOT/maven-metadata.xml Downloaded from openhab-artifactory-snapshot: https://openhab.jfrog.io/openhab/libs-snapshot/org/openhab/pom/2.4.0-SNAPSHOT/maven-metadata.xml (593 B at 1.9 kB/s)
[WARNING] Could not transfer metadata org.openhab:pom:2.4.0-SNAPSHOT/maven-metadata.xml from/to p2-openhab-deps-repo (https://dl.bintray.com/openhab/p2/openhab-deps-repo/${ohdr.version}): Cannot access https://dl.bintray.com/openhab/p2/openhab-deps-repo/${ohdr.version} with type p2 using the available connector factories: BasicRepositoryConnectorFactory
[INFO] Computing target platform for MavenProject: org.openhab.binding:org.openhab.binding.mytestbinding:2.4.0-SNAPSHOT @ C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\pom.xml

[I cut the downloads]


[INFO] Fetching p2.index from https://dl.bintray.com/openhab/p2/openhab-deps-repo/1.0.26/ (173B)
[INFO] Fetching p2.index from https://dl.bintray.com/openhab/p2/openhab-deps-repo/1.0.26/ (173B)
[INFO] Adding repository https://dl.bintray.com/openhab/p2/openhab-deps-repo/1.0.26
[INFO] Resolving dependencies of MavenProject: org.openhab.binding:org.openhab.binding.mytestbinding:2.4.0-SNAPSHOT @ C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\pom.xml
[INFO] Resolving class path of MavenProject: org.openhab.binding:org.openhab.binding.mytestbinding:2.4.0-SNAPSHOT @ C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\pom.xml
[INFO]
[INFO] -------< org.openhab.binding:org.openhab.binding.mytestbinding >--------
[INFO] Building MyTestBinding Binding 2.4.0-SNAPSHOT
[INFO] ---------------------------[ eclipse-plugin ]---------------------------
[INFO]
[INFO] --- tycho-packaging-plugin:1.0.0:build-qualifier (default-build-qualifier) @ org.openhab.binding.mytestbinding ---
[INFO] The project's OSGi version is 2.4.0.201806281231
[INFO]
[INFO] --- tycho-packaging-plugin:1.0.0:validate-id (default-validate-id) @ org.openhab.binding.mytestbinding ---
[INFO]
[INFO] --- tycho-packaging-plugin:1.0.0:validate-version (default-validate-version) @ org.openhab.binding.mytestbinding ---
[INFO]
[INFO] --- directory-maven-plugin:0.2:highest-basedir (directories) @ org.openhab.binding.mytestbinding ---
[INFO] Highest basedir set to: C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ org.openhab.binding.mytestbinding ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\src\main\resources
[INFO]
[INFO] --- tycho-compiler-plugin:1.0.0:compile (default-compile) @ org.openhab.binding.mytestbinding ---
[WARNING] Parameter 'useProjectSettings' is set to true, but preferences file 'C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\.settings\org.eclipse.jdt.core.prefs' could not be found!
[INFO] Compiling 4 source files to C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\target\classes
[INFO]
[INFO] --- maven-compiler-plugin:3.6.1:compile (default) @ org.openhab.binding.mytestbinding ---
[INFO] Changes detected - recompiling the module!
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-scr-plugin:1.24.0:scr (generate-scr-scrdescriptor) @ org.openhab.binding.mytestbinding ---
[INFO] Writing 1 Service Component Descriptors to C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\target\classes\OSGI-INF\org.openhab.binding.mytestbinding.internal.MyTestBindingHandlerFactory.xml
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ org.openhab.binding.mytestbinding ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\src\test\resources
[INFO]
[INFO] --- target-platform-configuration:1.0.0:target-platform (default-target-platform) @ org.openhab.binding.mytestbinding ---
[INFO]
[INFO] --- tycho-packaging-plugin:1.0.0:package-plugin (default-package-plugin) @ org.openhab.binding.mytestbinding ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.713 s
[INFO] Finished at: 2018-06-28T14:32:10+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:1.0.0:package-plugin (default-package-plugin) on project org.openhab.binding.mytestbinding: C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\build.properties: bin.includes value(s) [NOTICE] do not match any files. -> [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

Log 3: After creating a NOTICE file

Downloading from openhab-artifactory-snapshot: https://openhab.jfrog.io/openhab/libs-snapshot/org/openhab/pom-tycho/2.4.0-SNAPSHOT/maven-metadata.xml
Downloaded from openhab-artifactory-snapshot: https://openhab.jfrog.io/openhab/libs-snapshot/org/openhab/pom-tycho/2.4.0-SNAPSHOT/maven-metadata.xml (599 B at 718 B/s)
[WARNING] Could not transfer metadata org.openhab:pom-tycho:2.4.0-SNAPSHOT/maven-metadata.xml from/to p2-openhab-deps-repo (https://dl.bintray.com/openhab/p2/openhab-deps-repo/${ohdr.version}): Cannot access https://dl.bintray.com/openhab/p2/openhab-deps-repo/${ohdr.version} with type p2 using the available connector factories: BasicRepositoryConnectorFactory
Downloading from openhab-artifactory-snapshot: https://openhab.jfrog.io/openhab/libs-snapshot/org/openhab/pom/2.4.0-SNAPSHOT/maven-metadata.xml Downloaded from openhab-artifactory-snapshot: https://openhab.jfrog.io/openhab/libs-snapshot/org/openhab/pom/2.4.0-SNAPSHOT/maven-metadata.xml (593 B at 1.8 kB/s)
[WARNING] Could not transfer metadata org.openhab:pom:2.4.0-SNAPSHOT/maven-metadata.xml from/to p2-openhab-deps-repo (https://dl.bintray.com/openhab/p2/openhab-deps-repo/${ohdr.version}): Cannot access https://dl.bintray.com/openhab/p2/openhab-deps-repo/${ohdr.version} with type p2 using the available connector factories: BasicRepositoryConnectorFactory
[INFO] Computing target platform for MavenProject: org.openhab.binding:org.openhab.binding.mytestbinding:2.4.0-SNAPSHOT @ C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\pom.xml

[I cut the downloads]

[INFO] Fetching p2.index from https://dl.bintray.com/openhab/p2/openhab-deps-repo/1.0.26/ (173B)
[INFO] Adding repository https://dl.bintray.com/openhab/p2/openhab-deps-repo/1.0.26
[INFO] Resolving dependencies of MavenProject: org.openhab.binding:org.openhab.binding.mytestbinding:2.4.0-SNAPSHOT @ C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\pom.xml
[INFO] Resolving class path of MavenProject: org.openhab.binding:org.openhab.binding.mytestbinding:2.4.0-SNAPSHOT @ C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\pom.xml
[INFO]
[INFO] -------< org.openhab.binding:org.openhab.binding.mytestbinding >--------
[INFO] Building MyTestBinding Binding 2.4.0-SNAPSHOT
[INFO] ---------------------------[ eclipse-plugin ]---------------------------
[INFO]
[INFO] --- tycho-packaging-plugin:1.0.0:build-qualifier (default-build-qualifier) @ org.openhab.binding.mytestbinding ---
[INFO] The project's OSGi version is 2.4.0.201806281236
[INFO]
[INFO] --- tycho-packaging-plugin:1.0.0:validate-id (default-validate-id) @ org.openhab.binding.mytestbinding ---
[INFO]
[INFO] --- tycho-packaging-plugin:1.0.0:validate-version (default-validate-version) @ org.openhab.binding.mytestbinding ---
[INFO]
[INFO] --- directory-maven-plugin:0.2:highest-basedir (directories) @ org.openhab.binding.mytestbinding ---
[INFO] Highest basedir set to: C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ org.openhab.binding.mytestbinding ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\src\main\resources
[INFO]
[INFO] --- tycho-compiler-plugin:1.0.0:compile (default-compile) @ org.openhab.binding.mytestbinding ---
[WARNING] Parameter 'useProjectSettings' is set to true, but preferences file 'C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\.settings\org.eclipse.jdt.core.prefs' could not be found!
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-compiler-plugin:3.6.1:compile (default) @ org.openhab.binding.mytestbinding ---
[INFO] Changes detected - recompiling the module!
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-scr-plugin:1.24.0:scr (generate-scr-scrdescriptor) @ org.openhab.binding.mytestbinding ---
[INFO] Writing 1 Service Component Descriptors to C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\target\classes\OSGI-INF\org.openhab.binding.mytestbinding.internal.MyTestBindingHandlerFactory.xml
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ org.openhab.binding.mytestbinding ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\src\test\resources
[INFO]
[INFO] --- target-platform-configuration:1.0.0:target-platform (default-target-platform) @ org.openhab.binding.mytestbinding ---
[INFO]
[INFO] --- tycho-packaging-plugin:1.0.0:package-plugin (default-package-plugin) @ org.openhab.binding.mytestbinding ---
[INFO] Building jar: C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\target\org.openhab.binding.mytestbinding-2.4.0-SNAPSHOT.jar
[INFO]
[INFO] --- tycho-p2-plugin:1.0.0:p2-metadata-default (default-p2-metadata-default) @ org.openhab.binding.mytestbinding ---
[INFO]
[INFO] --- sat-plugin:0.5.0:checkstyle (default) @ org.openhab.binding.mytestbinding ---
[INFO] Adding dependency to checkstyle:0.5.0
[INFO] Adding dependency to checkstyle:8.1
[INFO] There are 5 errors reported by Checkstyle 8.1 with jar:file:/C:/Users/Fabian%20Rabe/.m2/repository/org/openhab/tools/sat/sat-plugin/0.5.0/sat-plugin-0.5.0.jar!/rulesets/checkstyle/rules.xml ruleset.
[INFO]
[INFO] --- sat-plugin:0.5.0:pmd (default) @ org.openhab.binding.mytestbinding ---
[INFO] Adding dependency to pmd:0.5.0
[INFO] Adding dependency to pmd-core:5.8.1
[INFO] Adding dependency to pmd-java:5.8.1
[INFO] Adding dependency to pmd-javascript:5.8.1
[INFO] Adding dependency to pmd-jsp:5.8.1
[INFO]
[INFO] --- sat-plugin:0.5.0:spotbugs (default) @ org.openhab.binding.mytestbinding ---
[INFO] Adding dependency to findbugs:0.5.0
[INFO] Adding dependency to bug-pattern:1.2.4
[INFO] Adding dependency to spotbugs:3.1.2
[INFO] Fork Value is false
     [java] JVM args ignored when same JVM is used.
[INFO] Done SpotBugs Analysis....
[INFO]
[INFO] --- sat-plugin:0.5.0:report (default) @ org.openhab.binding.mytestbinding ---
[INFO] Individual report appended to summary report.
[ERROR] Code Analysis Tool has found:
 5 error(s)!
 0 warning(s)
 4 info(s)
[ERROR] .binding.mytestbinding\build.properties:[0]
about.html file must be added to the bin.includes property
[ERROR] org.openhab.binding.mytestbinding.internal.MyTestBindingBindingConstants.java:[2]
Header line doesn't match pattern ^ \* Copyright \(c\) 2010-2018 by the respective copyright holders\.$
[ERROR] org.openhab.binding.mytestbinding.internal.MyTestBindingConfiguration.java:[2]
Header line doesn't match pattern ^ \* Copyright \(c\) 2010-2018 by the respective copyright holders\.$
[ERROR] org.openhab.binding.mytestbinding.internal.MyTestBindingHandler.java:[2]
Header line doesn't match pattern ^ \* Copyright \(c\) 2010-2018 by the respective copyright holders\.$
[ERROR] org.openhab.binding.mytestbinding.internal.MyTestBindingHandlerFactory.java:[2]
Header line doesn't match pattern ^ \* Copyright \(c\) 2010-2018 by the respective copyright holders\.$
[INFO] Detailed report can be found at: file:///C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\target\code-analysis\report.html
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 48.791 s
[INFO] Finished at: 2018-06-28T14:37:05+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openhab.tools.sat:sat-plugin:0.5.0:report (default) on project org.openhab.binding.mytestbinding:
[ERROR] Code Analysis Tool has found 5 error(s)!
[ERROR] Please fix the errors and rerun the build.
[ERROR]
[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/MojoFailureException

It seems that either the tutorials got updated or that I skipped over the relevant section:

However, running λ mvn license:format produces the errors below:

[INFO] Updating license headers...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 39.755 s
[INFO] Finished at: 2018-06-28T15:52:56+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.mycila:license-maven-plugin:3.0:format (default-cli) on project org.openhab.binding.mytestbinding: Execution default-cli of goal com.mycila:license-maven-plugin:3.0:format failed: Cannot read header document src/etc/header.txt. Cause: Resource src/etc/header.txt not found in file system, classpath or URL: no protocol: src/etc/header.txt -> [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/PluginExecutionException


Full log from mvn license:format

[INFO] Scanning for projects...
Downloading from openhab-artifactory-snapshot: https://openhab.jfrog.io/openhab/libs-snapshot/org/openhab/pom-tycho/2.4.0-SNAPSHOT/maven-metadata.xml
Downloaded from openhab-artifactory-snapshot: https://openhab.jfrog.io/openhab/libs-snapshot/org/openhab/pom-tycho/2.4.0-SNAPSHOT/maven-metadata.xml (599 B at 738 B/s)
[WARNING] Could not transfer metadata org.openhab:pom-tycho:2.4.0-SNAPSHOT/maven-metadata.xml from/to p2-openhab-deps-repo (https://dl.bintray.com/openhab/p2/openhab-deps-repo/${ohdr.version}): Cannot access https://dl.bintray.com/openhab/p2/openhab-deps-repo/${ohdr.version} with type p2 using the available connector factories: BasicRepositoryConnectorFactory
 
[Downloads removed from log]

[INFO] Fetching p2.index from https://dl.bintray.com/openhab/p2/openhab-deps-repo/1.0.26/ (173B)
[INFO] Adding repository https://dl.bintray.com/openhab/p2/openhab-deps-repo/1.0.26
[INFO] Resolving dependencies of MavenProject: org.openhab.binding:org.openhab.binding.mytestbinding:2.4.0-SNAPSHOT @ C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\pom.xml
[INFO] Resolving class path of MavenProject: org.openhab.binding:org.openhab.binding.mytestbinding:2.4.0-SNAPSHOT @ C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.mytestbinding\pom.xml
[INFO]
[INFO] -------< org.openhab.binding:org.openhab.binding.mytestbinding >--------
[INFO] Building MyTestBinding Binding 2.4.0-SNAPSHOT
[INFO] ---------------------------[ eclipse-plugin ]---------------------------
[INFO]
[INFO] --- license-maven-plugin:3.0:format (default-cli) @ org.openhab.binding.mytestbinding ---
Downloading from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-project/3.0-alpha-2/maven-project-3.0-alpha-2.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-project/3.0-alpha-2/maven-project-3.0-alpha-2.pom (3.3 kB at 20 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/apache/maven/maven/3.0-alpha-2/maven-3.0-alpha-2.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/apache/maven/maven/3.0-alpha-2/maven-3.0-alpha-2.pom (21 kB at 124 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-model/3.0-alpha-2/maven-model-3.0-alpha-2.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-model/3.0-alpha-2/maven-model-3.0-alpha-2.pom (3.5 kB at 27 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.pom (5.3 kB at 39 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus/1.0.12/plexus-1.0.12.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus/1.0.12/plexus-1.0.12.pom (9.8 kB at 74 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus-interpolation/1.1/plexus-interpolation-1.1.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus-interpolation/1.1/plexus-interpolation-1.1.pom (1.4 kB at 13 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-compat/3.0-alpha-2/maven-compat-3.0-alpha-2.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-compat/3.0-alpha-2/maven-compat-3.0-alpha-2.pom (2.9 kB at 9.9 kB/s)

Downloading from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus-container-default/1.0-beta-3.0.5/plexus-container-default-1.0-beta-3.0.5.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus-container-default/1.0-beta-3.0.5/plexus-container-default-1.0-beta-3.0.5.pom (1.4 kB at 11 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus-containers/1.0-beta-3.0.5/plexus-containers-1.0-beta-3.0.5.pom Downloaded from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus-containers/1.0-beta-3.0.5/plexus-containers-1.0-beta-3.0.5.pom (4.1 kB at 30 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus-classworlds/1.4/plexus-classworlds-1.4.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus-classworlds/1.4/plexus-classworlds-1.4.pom (4.7 kB at 33 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus/2.0.0/plexus-2.0.0.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus/2.0.0/plexus-2.0.0.pom (8.0 kB at 53 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/com/google/code/google-collections/google-collect/snapshot-20080530/google-collect-snapshot-20080530.pom
Downloaded from jcenter: https://jcenter.bintray.com/com/google/code/google-collections/google-collect/snapshot-20080530/google-collect-snapshot-20080530.pom (1.5 kB at 18 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus-component-annotations/1.0-beta-3.0.5/plexus-component-annotations-1.0-beta-3.0.5.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus-component-annotations/1.0-beta-3.0.5/plexus-component-annotations-1.0-beta-3.0.5.pom (602 B at 4.7 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/apache/maven/wagon/wagon-provider-api/1.0-beta-4/wagon-provider-api-1.0-beta-4.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/apache/maven/wagon/wagon-provider-api/1.0-beta-4/wagon-provider-api-1.0-beta-4.pom (906 B at 9.7 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/apache/maven/wagon/wagon/1.0-beta-4/wagon-1.0-beta-4.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/apache/maven/wagon/wagon/1.0-beta-4/wagon-1.0-beta-4.pom (10 kB at 106 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/codehaus/woodstox/wstx-asl/3.2.6/wstx-asl-3.2.6.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/codehaus/woodstox/wstx-asl/3.2.6/wstx-asl-3.2.6.pom (1.3 kB at 9.6 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/stax/stax-api/1.0.1/stax-api-1.0.1.pom
Downloaded from jcenter: https://jcenter.bintray.com/stax/stax-api/1.0.1/stax-api-1.0.1.pom (1.5 kB at 21 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/sonatype/spice/model-builder/1.3/model-builder-1.3.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/sonatype/spice/model-builder/1.3/model-builder-1.3.pom (2.9 kB at 24 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-project-builder/3.0-alpha-2/maven-project-builder-3.0-alpha-2.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-project-builder/3.0-alpha-2/maven-project-builder-3.0-alpha-2.pom (1.7 kB at 15 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-settings/3.0.4/maven-settings-3.0.4.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-settings/3.0.4/maven-settings-3.0.4.pom (1.8 kB at 23 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/apache/maven/maven/3.0.4/maven-3.0.4.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/apache/maven/maven/3.0.4/maven-3.0.4.pom (22 kB at 200 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-settings-builder/3.0.4/maven-settings-builder-3.0.4.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-settings-builder/3.0.4/maven-settings-builder-3.0.4.pom (2.3 kB at 28 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/springframework/spring-core/3.1.3.RELEASE/spring-core-3.1.3.RELEASE.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/springframework/spring-core/3.1.3.RELEASE/spring-core-3.1.3.RELEASE.pom (2.6 kB at 31 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/springframework/spring-parent/3.1.3.RELEASE/spring-parent-3.1.3.RELEASE.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/springframework/spring-parent/3.1.3.RELEASE/spring-parent-3.1.3.RELEASE.pom (8.7 kB at 93 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/springframework/spring-asm/3.1.3.RELEASE/spring-asm-3.1.3.RELEASE.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/springframework/spring-asm/3.1.3.RELEASE/spring-asm-3.1.3.RELEASE.pom (2.5 kB at 21 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/com/mycila/mycila-xmltool/4.4.ga/mycila-xmltool-4.4.ga.pom
Downloaded from jcenter: https://jcenter.bintray.com/com/mycila/mycila-xmltool/4.4.ga/mycila-xmltool-4.4.ga.pom (2.8 kB at 33 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/apache/commons/commons-pool2/2.2/commons-pool2-2.2.pom
Downloaded from jcenter: https://jcenter.bintray.com/org/apache/commons/commons-pool2/2.2/commons-pool2-2.2.pom (12 kB at 94 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-project/3.0-alpha-2/maven-project-3.0-alpha-2.jar
Downloading from jcenter: https://jcenter.bintray.com/org/apache/maven/wagon/wagon-provider-api/1.0-beta-4/wagon-provider-api-1.0-beta-4.jar
Downloading from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus-interpolation/1.1/plexus-interpolation-1.1.jar
Downloading from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-compat/3.0-alpha-2/maven-compat-3.0-alpha-2.jar
Downloading from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.jar
Downloaded from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus-interpolation/1.1/plexus-interpolation-1.1.jar (35 kB at 46 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus-container-default/1.0-beta-3.0.5/plexus-container-default-1.0-beta-3.0.5.jar
Downloaded from jcenter: https://jcenter.bintray.com/org/apache/maven/wagon/wagon-provider-api/1.0-beta-4/wagon-provider-api-1.0-beta-4.jar (52 kB at 31 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/com/google/code/google-collections/google-collect/snapshot-20080530/google-collect-snapshot-20080530.jar
Downloaded from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-compat/3.0-alpha-2/maven-compat-3.0-alpha-2.jar (238 kB at 138 kB/s)

Downloading from jcenter: https://jcenter.bintray.com/org/codehaus/woodstox/wstx-asl/3.2.6/wstx-asl-3.2.6.jar
Downloaded from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.jar (251 kB at 142 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/stax/stax-api/1.0.1/stax-api-1.0.1.jar
Downloaded from jcenter: https://jcenter.bintray.com/stax/stax-api/1.0.1/stax-api-1.0.1.jar (27 kB at 10 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/sonatype/spice/model-builder/1.3/model-builder-1.3.jar
Downloaded from jcenter: https://jcenter.bintray.com/org/codehaus/plexus/plexus-container-default/1.0-beta-3.0.5/plexus-container-default-1.0-beta-3.0.5.jar (209 kB at 75 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-project-builder/3.0-alpha-2/maven-project-builder-3.0-alpha-2.jar
Downloaded from jcenter: https://jcenter.bintray.com/org/sonatype/spice/model-builder/1.3/model-builder-1.3.jar (36 kB at 8.8 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-settings/3.0.4/maven-settings-3.0.4.jar
Downloaded from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-project/3.0-alpha-2/maven-project-3.0-alpha-2.jar (143 kB at 32 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-settings-builder/3.0.4/maven-settings-builder-3.0.4.jar
Downloaded from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-settings/3.0.4/maven-settings-3.0.4.jar (47 kB at 9.0 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/springframework/spring-core/3.1.3.RELEASE/spring-core-3.1.3.RELEASE.jar
Downloaded from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-settings-builder/3.0.4/maven-settings-builder-3.0.4.jar (41 kB at 7.4 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/springframework/spring-asm/3.1.3.RELEASE/spring-asm-3.1.3.RELEASE.jar
Downloaded from jcenter: https://jcenter.bintray.com/org/codehaus/woodstox/wstx-asl/3.2.6/wstx-asl-3.2.6.jar (520 kB at 92 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
Downloaded from jcenter: https://jcenter.bintray.com/org/apache/maven/maven-project-builder/3.0-alpha-2/maven-project-builder-3.0-alpha-2.jar (169 kB at 28 kB/s)
Downloaded from jcenter: https://jcenter.bintray.com/com/google/code/google-collections/google-collect/snapshot-20080530/google-collect-snapshot-20080530.jar (502 kB at 83 kB/s)
Downloading from jcenter: https://jcenter.bintray.com/org/apache/commons/commons-pool2/2.2/commons-pool2-2.2.jar
Downloading from jcenter: https://jcenter.bintray.com/com/mycila/mycila-xmltool/4.4.ga/mycila-xmltool-4.4.ga.jar
Downloaded from jcenter: https://jcenter.bintray.com/org/springframework/spring-asm/3.1.3.RELEASE/spring-asm-3.1.3.RELEASE.jar (53 kB at 7.9 kB/s)
Downloaded from jcenter: https://jcenter.bintray.com/com/mycila/mycila-xmltool/4.4.ga/mycila-xmltool-4.4.ga.jar (60 kB at 8.4 kB/s)
Downloaded from jcenter: https://jcenter.bintray.com/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar (61 kB at 8.4 kB/s)
Downloaded from jcenter: https://jcenter.bintray.com/org/apache/commons/commons-pool2/2.2/commons-pool2-2.2.jar (108 kB at 15 kB/s)
Downloaded from jcenter: https://jcenter.bintray.com/org/springframework/spring-core/3.1.3.RELEASE/spring-core-3.1.3.RELEASE.jar (451 kB at 60 kB/s)
[INFO] Updating license headers...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 39.755 s
[INFO] Finished at: 2018-06-28T15:52:56+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.mycila:license-maven-plugin:3.0:format (default-cli) on project org.openhab.binding.mytestbinding: Execution default-cli of goal com.mycila:license-maven-plugin:3.0:format failed: Cannot read header document src/etc/header.txt. Cause: Resource src/etc/header.txt not found in file system, classpath or URL: no protocol: src/etc/header.txt -> [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/PluginExecutionException

Yes they got updated recently to fix these issues! :slight_smile:

The license format command currently only works at the root of the repository which is at your machine:

C:\code\wellbeneers\openhab\openhab2-master\git\openhab2-addons

2 Likes

It even says run mvn license:format in the root folder of your local Git repository

Guess I need to focus more when reading the docs. Thanks for the advice!