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

add a 'failIfArtifactNotFound' boolean property to copy goal

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: copy
    • Labels:
      None

      Description

      This parameter would be optional and would default to true.

      Here is my use case for wanting such a parameter... In our project, we support both Oracle and Postgres and like to bundle the JDBC driver jars for both these DBs in our distribution. However, due to licensing issues, the Oracle JDBC driver jar is not available on any public Maven repos. However, if a member of our team is building our distribution internally, they would have access to an internal repo that does have the Oracle jar. Or someone might have manually installed the Oracle jar into their local repo. In either case, we'd like to be able to configure the copy goal to copy the Oracle jar into our distribution if it is accessible, but otherwise to proceed without failing the build (maybe just printing an INFO message stating that the jar could not be found and so was not copied).

      Here's an example usage of the parameter:

      <execution>
      <id>copy</id>
      <phase>package</phase>
      <goals>
      <goal>copy</goal>
      </goals>
      <configuration>
      <artifactItems>
      <artifactItem>
      <groupId>com.oracle</groupId>
      <artifactId>ojdbc14</artifactId>
      <version>10.2.0.3.0</version>
      <failIfArtifactNotFound>false</failIfArtifactNotFound>
      <outputDirectory>target/dist-dir/lib</outputDirectory>
      </artifactItem>
      </artifactItems>
      </configuration>
      </execution>

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ips Ian P. Springer
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: