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 Ant Tasks
  • Maven 2.x Ant Tasks
  • MANTTASKS-71

running m2 inside Ant

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 2.0.10
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

I'm thinking out loud now, but given that we have the artifact and pom tasks, and m2 is embeddalbe - for those still using Ant as their primary environment, but might want some m2 projects we could have an m2 task. The artifact tasks (whould could hopefully install themselves a bit more easily in future) could pull down the necessary m2 libraries and fire it up to run goals.

Issue Links

is duplicated by

Bug - A problem which impairs or prevents the functions of the product. MANTTASKS-122 Add maven ant task for calling maven build from ant

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

New Feature - A new feature of the product, which has yet to be developed. MANTTASKS-131 Add a task to run maven in a directory

  • Minor - Minor loss of function, or other problem where easy workaround is present.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Wish - General wishlist item MANTTASKS-135 Maven Tasks for Ant should provide an Ant task to launch Maven

  • 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
Herve Boutemy added a comment - 06/Jun/07 5:12 PM

Technically, I fully agree: it should be possible to fire a Maven goal from an Ant build file. But I don't understand the purpose of such a m2 task

I'll try to explain.
Apart from dependencies resolution and download, running Maven goals runs a Maven build.
If someone is staying with Ant, I think that's precisely because he doesn't want to rely on Maven predefined build structure, and prefer to stay with your custom build process, with full control.
Running Maven through Ant would only mean to me typing "ant" instead of "mvn". The only win I see is perhaps that someone could write in an Ant build file useful goals you'd have to know if you'd have to run them directly with mvn.
For example, "site" Ant target is easily found in an Ant build file, but "mvn site:site" needs some Maven knowledge. Why not. But soon, you'll have "mvn site:deploy", "mvn site:stage", "mvn site:run": if each goal needs an Ant target, your buildfile will really grow fast.

No, I really don't see a good use case for the moment.

But it's feasible: if it's available, perhaps someone will find a usage for it...

Show
Herve Boutemy added a comment - 06/Jun/07 5:12 PM Technically, I fully agree: it should be possible to fire a Maven goal from an Ant build file. But I don't understand the purpose of such a m2 task I'll try to explain. Apart from dependencies resolution and download, running Maven goals runs a Maven build. If someone is staying with Ant, I think that's precisely because he doesn't want to rely on Maven predefined build structure, and prefer to stay with your custom build process, with full control. Running Maven through Ant would only mean to me typing "ant" instead of "mvn". The only win I see is perhaps that someone could write in an Ant build file useful goals you'd have to know if you'd have to run them directly with mvn. For example, "site" Ant target is easily found in an Ant build file, but "mvn site:site" needs some Maven knowledge. Why not. But soon, you'll have "mvn site:deploy", "mvn site:stage", "mvn site:run": if each goal needs an Ant target, your buildfile will really grow fast. No, I really don't see a good use case for the moment. But it's feasible: if it's available, perhaps someone will find a usage for it...
Hide
Permalink
Bernd Schuller added a comment - 17/Apr/08 8:00 AM

Actually one usecase for this would be to maven-enable builds that rely heavily on ant, and use ant in some weird way
One such example is Eclipse rich-client development.
A simple <maven> task would be very very handy here.

Show
Bernd Schuller added a comment - 17/Apr/08 8:00 AM Actually one usecase for this would be to maven-enable builds that rely heavily on ant, and use ant in some weird way One such example is Eclipse rich-client development. A simple <maven> task would be very very handy here.
Hide
Permalink
Simone Gianni added a comment - 14/Apr/09 6:24 AM

Another use case is a project that builds with Ant but wants to distribute on a Maven repo. In this case calling deploy:deploy-file is by far easier and safer than building the repo structure by hand from Ant. I'm currently doing this for Ecplise AspectJ and using an Ant exec task to call Maven, which works but is quite ugly.

Show
Simone Gianni added a comment - 14/Apr/09 6:24 AM Another use case is a project that builds with Ant but wants to distribute on a Maven repo. In this case calling deploy:deploy-file is by far easier and safer than building the repo structure by hand from Ant. I'm currently doing this for Ecplise AspectJ and using an Ant exec task to call Maven, which works but is quite ugly.
Hide
Permalink
Brett Porter added a comment - 14/Apr/09 6:29 AM

Simone - the ant tasks should be able to achieve that already without running Maven proper.

Show
Brett Porter added a comment - 14/Apr/09 6:29 AM Simone - the ant tasks should be able to achieve that already without running Maven proper.
Hide
Permalink
Paul Gier added a comment - 06/May/09 5:56 PM

I added support for this in r772461. I'm sure the implementation could be improved, but it seems to be working for basic test cases.

Show
Paul Gier added a comment - 06/May/09 5:56 PM I added support for this in r772461 . I'm sure the implementation could be improved, but it seems to be working for basic test cases.

People

  • Assignee:
    Paul Gier
    Reporter:
    Brett Porter
Vote (6)
Watch (5)

Dates

  • Created:
    19/May/05 12:16 AM
    Updated:
    12/May/09 9:19 AM
    Resolved:
    06/May/09 5:56 PM
  • 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.