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 Antrun Plugin
  • MANTRUN-52

plugin dependencies seem to get lost when using the plugin multiple times

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

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

Description

say in the same pom you have

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<configuration>
<tasks>
<replace dir="${project.build.outputDirectory}"
replaceFilterFile="${basedir}/src/main/properties/replaceSchemaNames.properties" />
</tasks>
</configuration>
............
</build>

and

<profiles>
<profile>
....
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>Database recreation</id>
<configuration>
<tasks>
<sql ..../>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>oracle</groupId>
<artifactId>oracle-jdbc</artifactId>
<version>1.4_g</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>

then the antrun configured in the profile will fail saying that it can't find the oracle driver. If i move the oracle dependency to the plugin configured in <build> then it works.

Issue Links

duplicates

Bug - A problem which impairs or prevents the functions of the product. MNG-1323 Plugin extensions (dependencies) not resolved in reactor build

  • 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
Christoph Grothaus added a comment - 06/Jun/06 4:06 AM

This error also occurs in a reactorized build. Suppose you have a multi module maven setup like
main/pom.xml
main/A/pom.xml
main/B/pom.xml
where A and B are subprojects that have main as parent. Both A and B use the antrun plugin with plugin dependencies. If the reactor sort order is Main->A->B, then the antrun plugin of B will fail because it does not see the correct dependencies (it sees the antrun plugin dependencies of A, not those of B).

Show
Christoph Grothaus added a comment - 06/Jun/06 4:06 AM This error also occurs in a reactorized build. Suppose you have a multi module maven setup like main/pom.xml main/A/pom.xml main/B/pom.xml where A and B are subprojects that have main as parent. Both A and B use the antrun plugin with plugin dependencies. If the reactor sort order is Main->A->B, then the antrun plugin of B will fail because it does not see the correct dependencies (it sees the antrun plugin dependencies of A, not those of B).
Hide
Permalink
bastian kaempfe added a comment - 06/May/08 5:09 AM - edited

i thing, this might basically be ste same problem as described in MANTRUN-51
-> When using more than one antrun-blocks, the first one sets all properties which cannot be overwritten by the other antrun-blocks called afterwards

Show
bastian kaempfe added a comment - 06/May/08 5:09 AM - edited i thing, this might basically be ste same problem as described in MANTRUN-51 -> When using more than one antrun-blocks, the first one sets all properties which cannot be overwritten by the other antrun-blocks called afterwards

People

  • Assignee:
    Carlos Sanchez
    Reporter:
    Jorg Heymans
Vote (14)
Watch (12)

Dates

  • Created:
    02/Jun/06 8:51 AM
    Updated:
    15/Jul/08 5:12 PM
    Resolved:
    15/Jul/08 5:12 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.