jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x Ant Tasks
  • MANTTASKS-17

artifact:dependency can't resolve custom test-bndl artifact type

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: dependencies task
  • Labels:
    None

Description

I creates a custom artifact type, bndl, along with test-bndl. It is identical to the jar type/packaging, except for that fact that the archives have a .bndl extension instead of .jar
Futhermore, I create a bundle-plugin to handle the artifact's package phase (I attached the plexus/components.xml). The new lifecycle, always creates the test-bndl attachment, such that all projects will have both the .bndl artifact, and -tests.bndl attachment.

I am also using an ant plugin, ajtest-plugin. This plugin is invoked during the test phase of the bndl type, and is ant script that uses the maven-artifact-ant tasks (I attached the script as well). To sum it up, the ant script runs the junit test using the aspectJ weaving classloader.

For the purpose of the issue, I am going to simplify my project structure:

util:
<groupId>com.dcx.NGST</groupId>
<artifactId>util</artifactId>
<packaging>bndl</packaging>
<version>1.20-SNAPSHOT</version>

upgrade:
<groupId>com.dcx.NGST</groupId>
<artifactId>upgrade</artifactId>
<packaging>bndl</packaging>
<version>1.20-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.dcx.NGST</groupId>
<artifactId>util</artifactId>
<version>1.20-SNAPSHOT</version>
<type>test-bndl</type>
<scope>test</scope>
</dependency>
<dependencies>

When running the ajtest-plugin during the test phase of the build, I get an artifact resolution error on com.dcx.NGST:util:test-bndl:1-20-SNAPSHOT.
It is unable to download repository/com/dcx/NGST/util/1.20-SNAPSHOT/util-1.20-SNAPSHOT.test-bndl.

It appears it doesn't know that test-bndl is .bndl artifact attachement. The .bndl packaging is defined in the bundle-plugin, not the ajtest-plugin. I was able to work around this by copying the plexus/components.xml file into the ajtest-plugin, but it would be nice if i didn't have to duplicate it.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. XML File
    ajtest.build.xml
    12/Apr/06 8:38 AM
    2 kB
    Emanuel Bulic
  2. XML File
    components.xml
    12/Apr/06 8:38 AM
    4 kB
    Emanuel Bulic

Issue Links

is related to

Bug - A problem which impairs or prevents the functions of the product. MANTTASKS-148 Dependencies task cannot resolve custom packaging types

  • Major - Major loss of function.
  • Open - The issue is open and ready for the assignee to start work on it.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Emanuel Bulic added a comment - 12/Apr/06 11:40 AM

Here is the output

[artifact:dependencies] Downloading: com/dcx/NGST/util/1.20-SNAPSHOT/util-1.20-SNAPSHOT.test-bndl
[artifact:dependencies] [WARNING] Unable to get resource from repository Maven Snapshots (http://snapshots.maven.codehaus.org/maven2/)
[artifact:dependencies] An error has occurred while processing the Maven artifact tasks.
[artifact:dependencies] Diagnosis:
[artifact:dependencies]
[artifact:dependencies] Failed to resolve artifact.
[artifact:dependencies]
[artifact:dependencies] Missing:
[artifact:dependencies] ----------
[artifact:dependencies] 1) com.dcx.NGST:util:test-bndl:1.20-SNAPSHOT
[artifact:dependencies]
[artifact:dependencies] Try downloading the file manually from the project website.
[artifact:dependencies]
[artifact:dependencies] Then, install it using the command:
[artifact:dependencies] mvn install:install-file -DgroupId=com.dcx.NGST -DartifactId=util \
[artifact:dependencies] -Dversion=1.20-SNAPSHOT -Dpackaging=test-bndl -Dfile=/path/to/file
[artifact:dependencies]
[artifact:dependencies] Path to dependency:
[artifact:dependencies] 1) com.dcx.NGST:upgrade:bndl:1.20-SNAPSHOT
[artifact:dependencies] 2) com.dcx.NGST:util:test-bndl:1.20-SNAPSHOT
[artifact:dependencies]
[artifact:dependencies] ----------
[artifact:dependencies] 1 required artifact is missing.
[artifact:dependencies]
[artifact:dependencies] for artifact:
[artifact:dependencies] com.dcx.NGST:upgrade:bndl:1.20-SNAPSHOT
[artifact:dependencies]
[artifact:dependencies] from the specified remote repositories:
[artifact:dependencies] Maven Snapshots (http://snapshots.maven.codehaus.org/maven2/),
[artifact:dependencies] central (http://repo1.maven.org/maven2)
[artifact:dependencies]
[artifact:dependencies]
[artifact:dependencies]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) com.dcx.NGST:util:test-bndl:1.20-SNAPSHOT

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=com.dcx.NGST -DartifactId=util \
-Dversion=1.20-SNAPSHOT -Dpackaging=test-bndl -Dfile=/path/to/file

Path to dependency:
1) com.dcx.NGST:upgrade:bndl:1.20-SNAPSHOT
2) com.dcx.NGST:util:test-bndl:1.20-SNAPSHOT

----------
1 required artifact is missing.

for artifact:
com.dcx.NGST:upgrade:bndl:1.20-SNAPSHOT

from the specified remote repositories:
Maven Snapshots (http://snapshots.maven.codehaus.org/maven2/),
central (http://repo1.maven.org/maven2)

Show
Emanuel Bulic added a comment - 12/Apr/06 11:40 AM Here is the output [artifact:dependencies] Downloading: com/dcx/NGST/util/1.20-SNAPSHOT/util-1.20-SNAPSHOT.test-bndl [artifact:dependencies] [WARNING] Unable to get resource from repository Maven Snapshots (http://snapshots.maven.codehaus.org/maven2/) [artifact:dependencies] An error has occurred while processing the Maven artifact tasks. [artifact:dependencies] Diagnosis: [artifact:dependencies] [artifact:dependencies] Failed to resolve artifact. [artifact:dependencies] [artifact:dependencies] Missing: [artifact:dependencies] ---------- [artifact:dependencies] 1) com.dcx.NGST:util:test-bndl:1.20-SNAPSHOT [artifact:dependencies] [artifact:dependencies] Try downloading the file manually from the project website. [artifact:dependencies] [artifact:dependencies] Then, install it using the command: [artifact:dependencies] mvn install:install-file -DgroupId=com.dcx.NGST -DartifactId=util \ [artifact:dependencies] -Dversion=1.20-SNAPSHOT -Dpackaging=test-bndl -Dfile=/path/to/file [artifact:dependencies] [artifact:dependencies] Path to dependency: [artifact:dependencies] 1) com.dcx.NGST:upgrade:bndl:1.20-SNAPSHOT [artifact:dependencies] 2) com.dcx.NGST:util:test-bndl:1.20-SNAPSHOT [artifact:dependencies] [artifact:dependencies] ---------- [artifact:dependencies] 1 required artifact is missing. [artifact:dependencies] [artifact:dependencies] for artifact: [artifact:dependencies] com.dcx.NGST:upgrade:bndl:1.20-SNAPSHOT [artifact:dependencies] [artifact:dependencies] from the specified remote repositories: [artifact:dependencies] Maven Snapshots (http://snapshots.maven.codehaus.org/maven2/), [artifact:dependencies] central (http://repo1.maven.org/maven2) [artifact:dependencies] [artifact:dependencies] [artifact:dependencies] [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact. Missing: ---------- 1) com.dcx.NGST:util:test-bndl:1.20-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=com.dcx.NGST -DartifactId=util \ -Dversion=1.20-SNAPSHOT -Dpackaging=test-bndl -Dfile=/path/to/file Path to dependency: 1) com.dcx.NGST:upgrade:bndl:1.20-SNAPSHOT 2) com.dcx.NGST:util:test-bndl:1.20-SNAPSHOT ---------- 1 required artifact is missing. for artifact: com.dcx.NGST:upgrade:bndl:1.20-SNAPSHOT from the specified remote repositories: Maven Snapshots (http://snapshots.maven.codehaus.org/maven2/), central (http://repo1.maven.org/maven2)

People

  • Assignee:
    Unassigned
    Reporter:
    Emanuel Bulic
Vote (0)
Watch (0)

Dates

  • Created:
    12/Apr/06 8:37 AM
    Updated:
    17/Nov/09 5:30 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.