0

I have a java-maven project working on my STS. The thing is that I want to create my own spring-boot starter and include it as a maven dependency in the pom.xml file of my project. The thing is that this starter will be located in an innersource repository and I don't know what information I need to put in the pom.xml file to refer to that one in innersource and not to other one. Maybe is it possible to specify the URL of the repository or what?

Thanks you so much for your help!

1 Answers1

0

The thing is that I want to create my own spring-boot starter and include it as a maven dependency in the pom.xml file of my project.

By reading this I think that what you are looking for is how to create a dependency, that you can easily include it at any of your projects.

By this you can have a local maven repository or push it to a remote repository (like most of all dependencies), what is important is wherever you push it is available to be downloaded.

If you go by the local version you can use a maven/gradle plugin to package your jar and publish it. You will need to specify a couple of properties like groupId, artifactId and version

https://docs.gradle.org/current/userguide/publishing_maven.html

with the groupId, artifactId and version you will be able to include it in your project like

<dependency>
    <groupId>org.myorg</groupId>
    <artifactId>my-artifact</artifactId>
    <version>0.0.1</version>
</dependency>

if this is from a maven local dependency don't forget to include maven local as part of your repositories.

https://www.baeldung.com/maven-local-repository

Check these articles, it will help you.

https://maven.apache.org/guides/introduction/introduction-to-repositories.html

Create local maven repository

jpganz18
  • 5,508
  • 17
  • 66
  • 115