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

          Activity

          Hide
          Herve Boutemy added a comment -

          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 - 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
          Bernd Schuller added a comment -

          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 - 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
          Simone Gianni added a comment -

          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 - 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
          Brett Porter added a comment -

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

          Show
          Brett Porter added a comment - Simone - the ant tasks should be able to achieve that already without running Maven proper.
          Hide
          Paul Gier added a comment -

          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 - 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
            • Votes:
              6 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: