Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6986

Maven plugin doesn't load jdbc driver

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Incomplete
    • 3.6.3
    • None
    • Plugins and Lifecycle
    • None
    • windows 10 Enterprise
      Oracle JDK 1.8.0_261
      Maven3.6.3

    Description

      My customize maven plugin needs jdbc driver. I tried to config the dependency of that plugin, additional classpath ... None of them works for me.

       

      in code, I enlarge dependency resolution by Mojo annotation: 

       

       requiresDependencyResolution = ResolutionScopt.RUNTIME
      

      then load the class I need manually

       

       

      loop MavenProject.getRuntimeClasspathElements() to find the jar I need and URLClassLoader to load it
      

       

      If it is a defeat, we need to fix it.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            simonsheng8@gmail.com Simon Sheng
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: