Closed BlackRose01 closed 3 years ago
Hi, Can you share also the parent pom(s) ?
Here you go.
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>de.htwdd.sps</groupId>
<artifactId>sensorintegration</artifactId>
<version>4.1.3.7</version>
<packaging>pom</packaging>
<name>sensor-integration</name>
<description>Sensor Integration</description>
<url>https://iversion.informatik.htw-dresden.de/smartproductionsystems/projects/arrowhead-tools/infineon/sensor-integration</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<repositories>
<repository>
<id>arrowhead-client</id>
<url>https://github.com/arrowhead-f/client-library-java-spring/raw/master/client-mvn-repo</url>
</repository>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/arrowhead-f/client-library-java-spring</url>
</repository>
</repositories>
<modules>
<module>common</module>
<module>handle-service</module>
<module>translator-service</module>
</modules>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.20</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>eu.arrowhead</groupId>
<artifactId>client-library</artifactId>
<version>4.1.3.7</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
So there is two repository declared for client-library. I'm not sure that this causes the issue, but defenetly not a good approch. So up to client-library version 4.1.3.7 you have to use this:
<repository>
<id>arrowhead-client</id>
<url>https://github.com/arrowhead-f/client-library-java-spring/raw/master/client-mvn-repo</url>
</repository>
But from 4.1.3.8 you should not include any specific repository in your pom, only configure your local maven to use GitHub packages.
Now I suggest to remove the second repository declaration and give it a try
Ok. I changed my POM to import the latest client-library from github but the problem is still the same.
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>de.htwdd.sps</groupId>
<artifactId>sensorintegration</artifactId>
<version>4.1.3.7</version>
<packaging>pom</packaging>
<name>sensor-integration</name>
<description>Sensor Integration</description>
<url>https://iversion.informatik.htw-dresden.de/smartproductionsystems/projects/arrowhead-tools/infineon/sensor-integration</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<repositories>
<repository>
<id>github</id>
<name>GH Arrowhead</name>
<url>https://maven.pkg.github.com/arrowhead-f/client-library-java-spring</url>
<snapshots><enabled>true</enabled></snapshots>
<releases><enabled>true</enabled></releases>
</repository>
</repositories>
<modules>
<module>common</module>
<module>handle-service</module>
<module>translator-service</module>
</modules>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.20</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>eu.arrowhead</groupId>
<artifactId>client-library</artifactId>
<version>4.1.3.13</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Are you sure that this is a working way?:
<url>https://maven.pkg.github.com/arrowhead-f/client-library-java-spring</url>
Does it succeed when you run mvn clean install
from command line?
I referred to this, when I mentioned configuring local maven with GitHub packages.
The repository entry is correct and corresponds to what you linked. But instead of putting the repository in my settings.xml, it is in the POM.xml. This simply has the advantage that needed links can be found in the project and subsequently also in the project repository instead of in my local settings.xml. Who then checks out my project only has to store the password information in the settings.xml instead of the complete repository information for the required packages.
The mvn install
currently not works for me because maven searchs my parent repository in our gitlab and not local. However, I can run the project without errors so my project uses the latest client-library
now.
Hello,
when i create a new maven module or project and the artifactId is not equal to "eu.arrowhead" then i get the error "BeanCreationNotAllowedException" with the description "A component required a bean named 'arrowheadContext' that could not be found".
I could solve the problem by creating a new bean named "arrowheadContext" in my start class. But this should only be a temporary solution.
Start class
pom.xml
Log Output
KR BlackRose01