Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Duplicate
-
Affects Version/s: 1.1
-
Fix Version/s: None
-
Labels:None
-
Number of attachments :
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="$
"
replaceFilterFile="$
/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
-
MNG-1323
Plugin extensions (dependencies) not resolved in reactor build
-
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).