1

I came to a grinding halt in trying to debug a problem I am having with Spring 3.1 ( I put a bounty on it FWIW ). So, I would like to take the spring-security and spring-ldap source code, put my own log4j statments in, compile it and run my webapp in Tomcat 6.

What is the most sensible way to do this?

Include my "customized" libraries in the WEB-INF/lib of my Maven based project or do I put the altered libs in the tomcat\lib dir?

Can I do this using only Maven? I recently learned Maven to fix a proble and I would like to catch my breath before learning gradle if I can.

I don't want to do this for all of Spring and all of Spring-Security.

How would I set it up in maven/my pom.xml?

I realize the new tools make all of this easier than it probably feels to me, but compiling libraries from source has been a terror most of my life so I would like some tips and instructions to make it as easy/fast as possible.

Thanks

Community
  • 1
  • 1
Steve
  • 3,127
  • 14
  • 56
  • 96

1 Answers1

2

You can do this using only maven:

  1. Either: Use the same POM as the spring people do. That way the new jar that falls out of your code will overwrite the one delivered by spring.
  2. Or: Use the same POM, but increase the Version Number (to the next SNAPSHOT ) and change the dependency in your pom to that version. (EDIT: read Roy-Truelove 's comment below, its very correct indeed.)

I would recommend the latter variant.

Community
  • 1
  • 1
Angelo Fuchs
  • 9,825
  • 1
  • 35
  • 72