How to add a local non-maven project as a dependency for a maven project?

后端 未结 3 1182
难免孤独
难免孤独 2020-12-21 04:36

I created a new Spring web app, and I\'d very much like to use Maven to handle builds/dependencies. My problem is that the project depends on some existing local projects,

3条回答
  •  旧巷少年郎
    2020-12-21 05:10

    No and you shouldn't try that. Maven's main goal is to have a standardized build. This is what makes Maven so easy to use: Exceptions aren't be the norm. That's why Maven requires that all dependencies are in the typical Maven format (POM + jar).

    When you say "mavenizing them is not currently an option", you basically say "Maven is not currently an option". In my experience, converting an existing project to Maven just takes a couple of minutes ... unless said project uses a messy, unreliable build process in which case you really should convert it to Maven ASAP just to stop wasting even more of your precious time. :-)

    If everything else fails, use a build server to produce JAR files from the dependent projects and deploy them to a company wide repository server or just to your local machine.

提交回复
热议问题