简体   繁体   中英

IntelliJ IDEA: Best way to work on a project and on its dependency

I am working on a main project that depends on dbunit . dbunit is defined as a dependency in the Maven pom. It works find, but I found a bug in dbunit and would like to fix it.

Now, I download the source code of dbunit. How can I instructs IntelliJ IDEA and Maven to use that code instead of the maven dependency? Note that my project use subversion, dbunit uses git. My project si Java 1.8 based, dbunit is Java 1.5.

Ideally, I want to be able to simply change the code in dbunit and the hit the compile button in my project, and everything gets compiled and running. I could also debug within my code and then fall into's dbunit's code.

I have wasted an hour trying to import dbunit as a module, but to no vail. dbunit has a parent in the pom.xml that does not correspond to my project and it must remain as such.

So what is the best possible setup to work on both project, one depending on the other?

You need to import both projects (as modules) into a single IntelliJ project.

If you run your code by IntelliJ (but not by using Maven goals), it will use the dbunit module, instead of using the artifact in your repository.

Modules in your IntelliJ projects can be completely unrelated, it does not matter which parents they have.

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