Ticket #95 (closed defect: fixed)

Opened 2 years ago

Last modified 1 year ago

Patch maven for plugin ordering

Reported by: ebrown Assigned to: ebrown
Priority: unassigned Milestone:
Component: infrastructure Version: 0.5-SNAPSHOT
Keywords: maven Cc:
Blocking: Blocked By:

Description

This is pretty important because I've had to work around the issue 3+ times now and will probably have to cope with it again.

Ordering is supposedly well defined: http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

However, this needs to be applied: http://jira.codehaus.org/browse/MNG-1499. Not sure best way to do this yet.

Found this interesting thread on patch MGN-1499: http://www.nabble.com/Patch-regarding-build-order-tf924491.html#a2397401

Dependency Graph

Change History

09/20/06 16:40:12 changed by ebrown

  • keywords set to maven.

01/25/07 19:43:14 changed by ebrown

(In [2291]) Remove stuff from [2281] that broke build due to maven bugs

I got pretty far along a maven-plugin to fix this the right way, but it was clearly going to take a bit longer.

According to Ronald, this is the issue: (also see [2287])

The problem is that maven does not properly "reload" plugins when moving from pom to pom. So when you added the antrun stuff to the head pom, maven starts loading the antrun plugin early on, but it uses the definitions (dependencies) at that point; and when it reaches the mulgara-service pom it doesn't reload the antrun plugin, and hence doesn't provide the maven-artifact-ant lib to the plugin.

While the above error was an easy fix, another stupid maven bug prevents the webservices from building: because the antrun plugin is listed both in the head and the child poms, it appears twice in the effective-pom, and hence the tasks are all run twice. This is mostly annoying in a number of cases, but in the case of the webservice impl's where the CopyServiceDeploymentDescriptors? copies stuff out of the generated-sources directory and then deletes that directory, the second run fails because, well, we've already deleted that directory.

Agh! Stupid, stupid, stupid. And they won't fix it in the 2.0 branch: http://www.mail-archive.com/issues@maven.apache.org/msg16142.html

Also see #95 (we've seen some of these issues before)

02/15/07 01:15:09 changed by ebrown

  • status changed from new to closed.
  • resolution set to fixed.

See CodehausJira:MNG-1994. Fixed in 2.0.5 - though only by accident.

See also: MavenIssues?

08/07/07 16:25:51 changed by

  • milestone deleted.

Milestone Bugs deleted