How to programatically invoke a maven dependency plugin

前端 未结 3 1615
再見小時候
再見小時候 2021-02-03 12:53

I am trying to invoke maven-dependency-plugin programatically. i am using maven 3 version. the problem is that when i invoke it through pluginManager.executeMojo(session, execut

3条回答
  •  旧巷少年郎
    2021-02-03 13:24

    Folks, I think I get it. The problem is not in the version of Maven that I am using. It is in the configuration that I am using for invoking maven-dependency-plugin. The unpack goal of maven-dependency-plugin requires the following parameters: artifactItems, local, project, reactorProjects and remoteRepos. Here is the correct version of the configuration used for invoking the plugin:

    
        
        
          com.sap.ldi.demo.calc
          com.sap.ldi.demo.calc.cmd
          0.1.3-SNAPSHOT
          jar
          true
          target/demo-calc-stuff
          **/*.*
        
      
      ${localRepository}
      ${project}
      ${reactorProjects}
      ${project.remoteArtifactRepositories}
    `
    

提交回复
热议问题