Working with proprietary source code. Some dependencies are stored in a local (e.g. on my filesystem) maven repo, which is exposed in my main project pom.xml like so:
<repository>
<!-- Embed mvn repo with non-public dependencies -->
<id>myproj.local</id>
<url>file:${basedir}/src/repo</url>
<name>MyProj Embedded Repo</name>
<releases>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
This worked OK until today, when I added a new jar file into the embedded repo under src/repo/com/hidden/v2/some-api/1.5.0/some-api-1.5.0.jar and a new handcrafted pom at src/repo/com/hidden/v2/some-api/1.5.0/some-api-1.5.0.pom.
Now my code builds and runs OK, but I constantly get this error from maven and cannot figure out why:
[WARNING] The POM for com.hidden.v2:some-api:jar:1.5.0 is invalid, transitive dependencies (if any) will not be available: 2 problems were encountered while building the effective model for :some-api:1.5.0
[ERROR] 'groupId' is missing. @ [unknown-group-id]:some-api:1.5.0
[ERROR] 'dependencies.dependency.version' for javax.servlet:servlet-api:jar is missing. @ [unknown-group-id]:some-api:1.5.0
My custom pom file seems to have the fields that are supposedly missing:
<?xml version="1.0" encoding="UTF-8"?>
<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.hidden.v2</groupId>
<artifactId>some-api</artifactId>
<version>1.5.0</version>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<!-- <scope>provided</scope> -->
<version>2.5</version>
</dependency>
</dependencies>
</project>