Maven: How to include jars, which are not available in reps into a J2EE project?

后端 未结 10 1114
失恋的感觉
失恋的感觉 2020-11-28 18:17

in my J2EE project I\'ve a couple of dependencies, which are not available in any Maven repository, because they\'re proprietary libraries. These libraries need to be availa

10条回答
  •  南笙
    南笙 (楼主)
    2020-11-28 18:46

    @Ric Jafe's solution is what worked for me.

    This is exactly what I was looking for. A way to push it through for research test code. Nothing fancy. Yeah I know that that's what they all say :) The various maven plugin solutions seem to be overkill for my purposes. I have some jars that were given to me as 3rd party libs with a pom file. I want it to compile/run quickly. This solution which I trivially adapted to python worked wonders for me. Cut and pasted into my pom. Python/Perl code for this task is in this Q&A: Can I add jars to maven 2 build classpath without installing them?

    def AddJars(jarList):
      s1 = ''
      for elem in jarList:
       s1+= """
         
            local.dummy
            %s
            0.0.1
            system
            ${project.basedir}/manual_jars/%s
         \n"""%(elem, elem)
      return s1
    

提交回复
热议问题