简体   繁体   中英

Instead of using Maven to pull in a third party dependency, how can I implement the source of that dependency directly into my project?

Situation:

Spring Security currently does not have a feature I need and it is a simple change to implement the feature. As a quick and dirty proof of concept (before getting the change approved through Spring), I want to pull the source of Spring Security and make the change and put reference it directly in my application.

The app is not a multi module project and has just one project that compiles into a war.

This is the Maven artifact

<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-ldap</artifactId>
    <version>${spring.security.version}</version>
</dependency>

but I don't want it to be grabbed from Maven Central since I will provide it (just not sure where I need to put it).

You should deploy your modified spring-security-ldap into you're local (or company's internal) repository with your own version and then use that version in your pom.

When the change has been accepted by Spring, you switch to their version.

Download spring-security-ldap sources, modify them (including version number), run a maven build, and they'll be deployed in your local maven repository.

Then include the dependency with the new version number in your project, .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM