Reputation: 3953
I am having some trouble pushing a multi-module maven project to Heroku (it worked okay as a single pom in the past).
I can build it find locally however on Heroku I get:
-----> Java app detected
-----> Installing OpenJDK 1.8... done
-----> Executing: mvn -B -DskipTests=true clean install
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project web-backend:0.3.3-SNAPSHOT (/tmp/build_f3314e49682a8616ea1531b46a5c5985/pom.xml) has 2 errors
[ERROR] Child module /tmp/build_f3314e49682a8616ea1531b46a5c5985/web of /tmp/build_f3314e49682a8616ea1531b46a5c5985/pom.xml does not exist
[ERROR] Child module /tmp/build_f3314e49682a8616ea1531b46a5c5985/web-task of /tmp/build_f3314e49682a8616ea1531b46a5c5985/pom.xml does not exist
Those pom.xml do exist though, I my structure is like this:
main-project
--pom.xml (parent)
--web
----pom.xml
--web-task
----pom.xml
As I said building it locally works fine, it's heroku.
My main parent pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.web</groupId>
<artifactId>web-backend</artifactId>
<version>0.3.3-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>web</module>
<module>web-task</module>
</modules>
<properties>
<java-version>1.8</java-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format>
<heroku.plugin.version>0.3.4</heroku.plugin.version>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>${java-version}</source>
<target>${java-version}</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
In each submodule I reference the parent as well. I can post those too if required but I think those aren't a problem yet as it is not even being read.
Upvotes: 3
Views: 6003
Reputation: 10318
Check that all of your pom.xml
files are checked into Git, and also check the case of the directory names matche the case in the strings values of the <module>
element (on Heroku it will be case sensitive, but it may not be on your local platform).
Upvotes: 5