Building openHAB master branch (OH3) on Windows - pom.xml not found

  • Platform information:

    • Hardware: Intel Core i7
    • OS: Windows 10
    • Java Runtime Environment: Azul 11 x64
    • openHAB version: 3.0.0 master branch
  • Issue of the topic: Cannot build, pom.xml not found / fields missing

  • If logs where generated please post these here using code fences:

[ERROR] \pom.xml:[0]
Missing pom.xml file.
[WARNING] OH-INF.config.i18n.xml:[0]
Unused configuration reference with uri - system:i18n
[WARNING] OH-INF.config.networkinterface.xml:[0]
Unused configuration reference with uri - system:network
[ERROR] null\pom.xml:[0]
Missing /project/version in the pom.xml file.
[ERROR] null\pom.xml:[0]
Missing /project/artifactId in the pom.xml file.
[INFO] Detailed report can be found at: file:/C:/proj/openhab/openhab-core/bundles/org.openhab.core/target/code-analysis/report.html

This contains:

tool priority line category rule message
checkstyle 1 0 style RequiredFilesCheck Missing pom.xml file.

tool priority line category rule message
checkstyle 1 0 style PomXmlCheck Missing /project/version in the pom.xml file.
checkstyle 1 0 style PomXmlCheck Missing /project/artifactId in the pom.xml file.

Any idea’s?

I am trying to build core.

There is a test failing on master (which I skipped for now) and there are line ending problems on few xml files, which I do need to figure out more about. git with autocrlf normally works for me on Windows. There are format errors mvn spotless:apply needs to fix, but fixing them does not help.


Are changed to Linux line ending with spotless:apply, but still (logically now) not correct after this.

@matt1 could you try to build the current master of openhab-core?

And if successful, can you share the exact JVM (Oracle, Azul, Redhat) + version and architecture (x86 / x64) and Maven version you are using?

Please also share your .gitconfig (make sure you leave personal things like your email address out if present), relevant environment variables (MAVEN_OPTS=-Xms512m -Xmx1024m) and the command your are using (mvn clean install)



It does build in Intellij … So for now my problem is solved… Still no clue why I get these strange pom.xml errors when building from the command line.

I spoke too soon…

Build project works, but does not create a package… mvn install still fails with the same error.

is my issue as well.

It seems if you checkout pom files with Linux \n file endings on Windows maven finds the file invalid (which I can imagine), but if you checkout with Windows line endings \r\n spotless does find the file invalid.

There is also a failing test (at least on Windows):

[INFO] Running org.openhab.core.util.UIDUtilsTest
in: test
 encoded: test
 decoded: test
 equals: true
in: TEST
 encoded: TEST
 decoded: TEST
 equals: true
in: test123TEST
 encoded: test123TEST
 decoded: test123TEST
 equals: true
in: test_test-test%test
 encoded: test_5Ftest_2Dtest_25test
 decoded: test_test-test%test
 equals: true
in: äöø?
 encoded: _C3_A4_C3_B6_C3_B8_E2_82_AC
 decoded: äöø?
 equals: true
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 s - in org.openhab.core.util.UIDUtilsTest
[INFO] Results:
[ERROR] Failures:
[ERROR]   ByteArrayFileCacheTest.testGetFileExtension:86
Expected: is null
     but: was "/var/log/openhab/"
[ERROR] Tests run: 589, Failures: 1, Errors: 0, Skipped: 0

For now this works:

mvn clean install -DskipTests=true -Dspotless.check.skip=true

I came across this problem too (missing pom.xml) on an OSX Catalina. The solution was to run mvn clean first.