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

前端 未结 24 2563
萌比男神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:05

    You may create local repository on your project

    For example if you have libs folder in project structure

    • In libs folder you should create directory structure like: /groupId/artifactId/version/artifactId-version.jar

    • In your pom.xml you should register repository

      
          ProjectRepo
          ProjectRepo
          file://${project.basedir}/libs
      
      
    • and add dependency as usual

      
          groupId
          artifactId
          version
      
      

    That is all.

    For detailed information: How to add external libraries in Maven

提交回复
热议问题