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)
Signup
Maven 2.x Shade Plugin
  • Maven 2.x Shade Plugin
  • MSHADE-79

Annotations are not shaded

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.3.2
  • Fix Version/s: 1.3.3
  • Labels:
    None
  • Testcase included:
    yes
  • Number of attachments :
    2

Description

We have some classes that are annotated in order to find certain functionality and activate it. Those classes, as well as the annotations, are included in the resulting jar. Both the annotation and the annotated classes have been relocated, but the annotation on the annotated class still refers to non-relocated annotation class.

The attached project demonstrates the issue.

This works (exit status 0):
java -classpath annotated-0.0.1-SNAPSHOT.jar test.annotation.annotated.App

This fails (exit status 1):
java -classpath annotated-0.0.1-SNAPSHOT-shaded.jar shaded.test.annotation.annotated.App

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

Attachments

  1. Hide
    Zip Archive
    annotated.zip
    30/Apr/10 1:52 PM
    4 kB
    Brian Kramer
    1. XML File
      annotated/pom.xml 2 kB
    2. Java Source File
      annotated/src/main/.../annotated/App.java 0.6 kB
    3. Java Source File
      annotated/src/.../MyAnnotationI.java 0.3 kB
    4. Java Source File
      annotated/src/.../annotated/AppTest.java 0.6 kB
    Download Zip
    Show
    Zip Archive
    annotated.zip
    30/Apr/10 1:52 PM
    4 kB
    Brian Kramer
  2. File
    annotation_remap.diff
    03/May/10 11:40 AM
    3 kB
    Brian Kramer

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Brian Kramer added a comment - 03/May/10 11:40 AM

Diff for a workaround to what is apparently a bug in objecteb asm

Show
Brian Kramer added a comment - 03/May/10 11:40 AM Diff for a workaround to what is apparently a bug in objecteb asm
Hide
Permalink
Brian Kramer added a comment - 04/May/10 8:14 AM

Filed a bug with asm (#314982). http://forge.ow2.org/tracker/index.php?func=detail&aid=314982&group_id=23&atid=100023

Show
Brian Kramer added a comment - 04/May/10 8:14 AM Filed a bug with asm (#314982). http://forge.ow2.org/tracker/index.php?func=detail&aid=314982&group_id=23&atid=100023
Hide
Permalink
Benjamin Bentmann added a comment - 08/May/10 7:01 AM

Patch applied in r942366, extended approach in r942370 to fix field annotation handling, too. Thanks!

Show
Benjamin Bentmann added a comment - 08/May/10 7:01 AM Patch applied in r942366 , extended approach in r942370 to fix field annotation handling, too. Thanks!

People

  • Assignee:
    Benjamin Bentmann
    Reporter:
    Brian Kramer
Vote (0)
Watch (0)

Dates

  • Created:
    30/Apr/10 1:52 PM
    Updated:
    08/May/10 7:01 AM
    Resolved:
    08/May/10 7:01 AM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.