Uploaded image for project: 'Maven Dependency Plugin'
  1. Maven Dependency Plugin
  2. MDEP-812

Error opening zip file or JAR manifest missing : ${groupId:artifactId:jar}

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Critical
    • Resolution: Unresolved
    • None
    • None
    • properties
    • None

    Description

      My profile :-

      <profiles>
              <profile>
                  <id>test</id>
                  <build>
                      <pluginManagement>
                      <plugins>
                          <plugin>
                              <artifactId>maven-dependency-plugin</artifactId>
                              <version>3.3.0</version>
                              <executions>
                                  <execution>
                                      <id>getClasspathFilenames</id>
                                      <goals>
                                          <goal>properties</goal>
                                      </goals>
                                  </execution>
                              </executions>
                          </plugin>
                          <plugin>
                              <groupId>org.codehaus.mojo</groupId>
                              <artifactId>exec-maven-plugin</artifactId>
                              <version>3.1.0</version>
                              <executions>
                                  <execution>
                                      <goals>
                                          <goal>java</goal>
                                      </goals>
                                  </execution>
                              </executions>
                              <configuration>
                                  <classpathScope>test</classpathScope>
                                  <executable>java</executable>
                                  <arguments>
                                      <argument>-javaagent:${groupId:artifactId:jar}           
                                   </argument>
                                      <argument>-classpath</argument>
                                      <classpath/>
                                      <argument>sampleTest</argument>
                                  </arguments>
                              </configuration>
                          </plugin>
                      </plugins>
                      </pluginManagement>
                  </build>
              </profile>
          </profiles> 

      When running command 

      mvn exec:exec -P test

      , I'm getting error 

      Error opening zip file or JAR manifest missing : ${groupId:artifactId:jar}
      Error occurred during initialization of VM
      agent library failed to init: instrument
      [ERROR] Command execution failed.
      org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
          at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
          at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
          at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:1000)

      Why maven-dependency-plugin is not able to resolve jar path? Is there anyway to fix this issue? Any help is much appreciated.

      Attachments

        1. log.txt
          10 kB
          Kamalpreet
        2. log-1.txt
          22 kB
          Kamalpreet
        3. dependency-tree.txt
          23 kB
          Kamalpreet

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kamalpreet.k Kamalpreet
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: