I created an local Maven Repo and deploy a own lib there: with:
mvn clean package install deploy
on:
http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0
<groupId>de.example</groupId>
<artifactId>example-lib</artifactId>
<version>0.0.1</version>
<packaging>jar</packaging>
<name>example-lib</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>example.repo</id>
<name>example internal mvn repository</name>
<url>file://${project.basedir}/../mvn-repo</url>
</repository>
</distributionManagement>
Now Another project consumes it with:
<repositories>
<repository>
<id>example.repo</id>
<url>file://${project.basedir}/../mvn-repo</url>
</repository>
</repositories>
...
<dependency>
<groupId>de.example</groupId>
<artifactId>example-lib</artifactId>
<version>0.0.1</version>
</dependency>
...
but upon compiling the project all symbols are missing from the lib (but the dependency IS resolved, and the .jar file is there)
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/Users/gregor/Documents/dev/repo/example/core/src/main/java/de/example/core/CoreApplication.java:[11,31] package de.example.examplelib does not exist
[ERROR] /C:/Users/gregor/Documents/dev/repo/example/core/src/main/java/de/example/core/DbExampleService.java:[11,42] package de.example.examplelib.db.example does not exist
[ERROR] /C:/Users/gregor/Documents/dev/repo/example/core/src/main/java/de/example/core/DbExampleService.java:[12,42] package de.example.examplelib.db.example does not exist
[ERROR] /C:/Users/gregor/Documents/dev/repo/example/core/src/main/java/de/example/core/DbExampleService.java:[19,17] cannot find symbol
symbol: class UserRepository
location: class de.example.core.DbExampleService
[ERROR] /C:/Users/gregor/Documents/dev/repo/example/core/src/main/java/de/example/core/DbExampleService.java:[35,39] cannot find symbol
symbol: class User
location: class de.example.core.DbExampleService
I have searched for the last 4 hours, maybe I just miss a little basic thing?? Open for hints. Thanks in advance.