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

ClassCastException in project with sub-projects

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Duplicate
    • None
    • None
    • None
    • None
    • JDK1.5

    Description

      When a sub-project tries to copy dependencies from another sub-project some of the artifacts are ActiveProjectArtifact's which doesn't cast to DefaultArtifact but to Artifact. Changing the casting fixes that.

      [INFO] [dependency:copy-dependencies

      {execution: copy-dependencies}

      ]
      [INFO] Including Transitive Dependencies.
      [INFO] ----------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ----------------------------------------------------------------------------
      [INFO] org.apache.maven.project.artifact.ActiveProjectArtifact
      [INFO] ----------------------------------------------------------------------------
      [INFO] Trace
      java.lang.ClassCastException: org.apache.maven.project.artifact.ActiveProjectArtifact
      at org.codehaus.mojo.dependency.CopyDependenciesMojo.execute(CopyDependenciesMojo.java:63)

      Attachments

        1. castToArtifactInstead.patch
          0.9 kB
          Fredrik Holmqvist

        Issue Links

          Activity

            People

              brianf Brian E Fox
              fredho Fredrik Holmqvist
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: