Can I add jars to maven 2 build classpath without installing them?

前端 未结 24 2575
萌比男神i
萌比男神i 2020-11-22 01:41

Maven2 is driving me crazy during the experimentation / quick and dirty mock-up phase of development.

I have a pom.xml file that defines the dependenc

24条回答
  •  有刺的猬
    2020-11-22 02:00

    A strange solution I found:

    using Eclipse

    • create simple (non-maven) java project
    • add a Main class
    • add all the jars to the classpath
    • export Runnable JAR (it's important, because no other way here to do it)
    • select Extract required libraries into generated JAR
    • decide the licence issues
    • tadammm...install the generated jar to your m2repo
    • add this single dependency to your other projects.

    cheers, Balint

提交回复
热议问题