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 Enforcer Plugin
  • MENFORCER-14

Enforcer Plugin Messes Up Dependencies

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

When using the enforcer plugin, it somehow messes up the dependencies in a reactor-based build. The attached zip file exhibits the problem. Our project structure is a bit weird. We have one top-level project which contains a bunch of modules. One of the modules is a pom-based "tempalte" project which sets up all of our build settings (src/target for the compiler, turns on the aspectj compiler, etc.). All of the other modules extend the "template" project and they themselves have multiple sub-project.

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

Attachments

  1. Hide
    Zip Archive
    toplevel.zip
    01/Aug/07 1:15 PM
    6 kB
    James Carman
    1. XML File
      toplevel/module/common/pom.xml 0.3 kB
    2. Java Source File
      toplevel/module/common/.../testing/App.java 0.2 kB
    3. Java Source File
      toplevel/module/.../testing/AppTest.java 0.6 kB
    4. XML File
      toplevel/module/pom.xml 0.4 kB
    5. XML File
      toplevel/module/server/pom.xml 0.5 kB
    6. Java Source File
      toplevel/module/server/.../testing/App.java 0.2 kB
    7. Java Source File
      toplevel/module/.../testing/AppTest.java 0.6 kB
    8. XML File
      toplevel/pom.xml 0.7 kB
    9. XML File
      toplevel/template/pom.xml 1 kB
    Download Zip
    Show
    Zip Archive
    toplevel.zip
    01/Aug/07 1:15 PM
    6 kB
    James Carman

Issue Links

duplicates

Improvement - An improvement or enhancement to an existing feature or task. MENFORCER-11 enforce-once causes MNG-2277 to be expressed in reactor builds. Find a way to work around it.

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

Bug - A problem which impairs or prevents the functions of the product. MNG-3128 Enforcer Plugin Messes Up Dependencies

  • 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
James Carman added a comment - 01/Aug/07 1:16 PM

I originally opened this up under the main Maven2 project. Oops!

Show
James Carman added a comment - 01/Aug/07 1:16 PM I originally opened this up under the main Maven2 project. Oops!
Hide
Permalink
Brian Fox added a comment - 01/Aug/07 3:13 PM

This is a duplicate of MENFORCER-11. The fix is easy, change enforce-once to enforce.

Also, I noticed in one of your poms that you use ${project.version} This can cause subtle problems and you are better off defining a property in a parent and using that (because the property won't change until you change it by hand) The issue is here:MNG-2486

Show
Brian Fox added a comment - 01/Aug/07 3:13 PM This is a duplicate of MENFORCER-11. The fix is easy, change enforce-once to enforce. Also, I noticed in one of your poms that you use ${project.version} This can cause subtle problems and you are better off defining a property in a parent and using that (because the property won't change until you change it by hand) The issue is here:MNG-2486
Hide
Permalink
James Carman added a comment - 02/Aug/07 9:00 AM

I would disagree that changing "enforce-once" to "enforce" is a "fix". That is at best a work-around. As Andrew Perepelytsya said on the related duplicate issue, this will slow down the build, so it's not even really a great work-around. At this point, we're just not going to use the plugin (we were only enforcing java version and maven version, so it's not a big loss anyway).

Show
James Carman added a comment - 02/Aug/07 9:00 AM I would disagree that changing "enforce-once" to "enforce" is a "fix". That is at best a work-around. As Andrew Perepelytsya said on the related duplicate issue, this will slow down the build, so it's not even really a great work-around. At this point, we're just not going to use the plugin (we were only enforcing java version and maven version, so it's not a big loss anyway).
Hide
Permalink
Brian Fox added a comment - 02/Aug/07 7:21 PM

You're right, it's not a fix but a workaround. However, the enforce-once has always been broken and executes on each project anyway. Therefore, there is no speed/performance difference between the two.

Show
Brian Fox added a comment - 02/Aug/07 7:21 PM You're right, it's not a fix but a workaround. However, the enforce-once has always been broken and executes on each project anyway. Therefore, there is no speed/performance difference between the two.

People

  • Assignee:
    Brian Fox
    Reporter:
    James Carman
Vote (0)
Watch (1)

Dates

  • Created:
    01/Aug/07 1:15 PM
    Updated:
    02/Aug/07 7:21 PM
    Resolved:
    01/Aug/07 3:13 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.