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 JAR Plugin
  • MJAR-8

Maven creates jar for a project without java sources

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: 2.1
  • Component/s: None
  • Labels:
    None

Description

A jar file is generated even for projects with no java sources (ie: no src/main/java directory) - this creates some problems with the current assembly implementation, since an horrible near-empty jar gets into the assembly.

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

Attachments

  1. Zip Archive
    MNG-1449.zip
    08/Nov/05 1:59 PM
    0.7 kB
    Giorgio Gallo

Issue Links

relates to

Bug - A problem which impairs or prevents the functions of the product. MJAR-105 Regression: Build fails for an empty main jar with 2.2

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Brett Porter added a comment - 07/Nov/05 4:19 PM

that's not a bug. It's valid to have a jar with no sources (eg, just resources).

IT does print a warning

Show
Brett Porter added a comment - 07/Nov/05 4:19 PM that's not a bug. It's valid to have a jar with no sources (eg, just resources). IT does print a warning
Hide
Permalink
Giorgio Gallo added a comment - 08/Nov/05 1:58 PM

I'm very sorry to insist...

I didn't explained well: a jar file is generated even if there are no sources or resources in the project.

Show
Giorgio Gallo added a comment - 08/Nov/05 1:58 PM I'm very sorry to insist... I didn't explained well: a jar file is generated even if there are no sources or resources in the project.
Hide
Permalink
Giorgio Gallo added a comment - 08/Nov/05 1:59 PM

Attached a .zip containing a maven project wich should not (IMHO) generate any jar

Show
Giorgio Gallo added a comment - 08/Nov/05 1:59 PM Attached a .zip containing a maven project wich should not (IMHO) generate any jar
Hide
Permalink
Brett Porter added a comment - 09/Nov/05 10:47 PM

it doesn't matter.

If you don't want to produce a jar, set the packaging to something other than JAR (which is the default). For example: "pom".

I'm not sure what type of project you have that doesn't produce anything?

Show
Brett Porter added a comment - 09/Nov/05 10:47 PM it doesn't matter. If you don't want to produce a jar, set the packaging to something other than JAR (which is the default). For example: "pom". I'm not sure what type of project you have that doesn't produce anything?
Hide
Permalink
Giorgio Gallo added a comment - 10/Nov/05 6:05 PM

I have a general-purpose project to create patches for Saba LMS (http://saba.com) and theese patches may or may not consist of a few classes and a bunch on cocoon xml files which are to be run by a saba-provided utility to be merged into the main .ear.

I created a custom assembly to pakage the patch contents into a jar following saba patch expected format and wished I could use the same assembly descriptor whether or not the patch has classes. (Also, I don't like m2 to put unsolicited information in META-INF)

No problem anyway - i will just stick to ant

Thank you for the great job developing m2!

Show
Giorgio Gallo added a comment - 10/Nov/05 6:05 PM I have a general-purpose project to create patches for Saba LMS (http://saba.com) and theese patches may or may not consist of a few classes and a bunch on cocoon xml files which are to be run by a saba-provided utility to be merged into the main .ear. I created a custom assembly to pakage the patch contents into a jar following saba patch expected format and wished I could use the same assembly descriptor whether or not the patch has classes. (Also, I don't like m2 to put unsolicited information in META-INF) No problem anyway - i will just stick to ant Thank you for the great job developing m2!

People

  • Assignee:
    Brett Porter
    Reporter:
    Giorgio Gallo
Vote (0)
Watch (0)

Dates

  • Created:
    07/Nov/05 10:23 AM
    Updated:
    16/Apr/08 1:54 AM
    Resolved:
    09/Nov/05 10:47 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.