You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by mavenstart <j2...@yahoo.com> on 2007/03/17 08:36:56 UTC

Dependency problem with profile

I set up a sub-project pom.xml with a profile, trying to make JMeter test an
optional step. However, the dependency within the profile has no effect at
all.

 <profile>
     <id>jmeter</id>
          <build>
              <plugins>
                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-antrun-plugin</artifactId>
                      <executions>
                          <execution>
                            <id>jmeter-run</id>
                            <phase>integration-test</phase>
                            <configuration>
                               <tasks>			                                                
                                   <ant antfile="ant_jmeter.xml" 
                                        dir="${basedir}" 
                                        target="run_jmeter"/>
                               </tasks>
                            </configuration>
                            <goals>
                                 <goal>run</goal>
                            </goals>
                           </execution>
                       </executions> 
                       <dependencies>  
                         <dependency>                                \
                           <groupId>ant</groupId>                |
                               <artifactId>ant-jmeter</artifactId> <== This
part is not effective at all
                               <version>1.0</version>               |
                         </dependency>                               /
                      </dependencies>
                   </plugin>
              </plugins>
         </build>
         <activation>
              <property>
                   <name>jmeter</name>
              </property>
         </activation>
  </profile>

When I run "mvn -Pjmeter", I will get an exception -
org.programmerplanet.ant.taskdefs.jmeter.JMeterTask cannot be found.  If I
explicitly declare the dependency within in a build block outside the
profile, the above command works. 

Since this is a sub-project, I want to do a build from the parent POM.xml,
and when I run "mvn -Pjmeter" from the root, again, I will get the exception 
- org.programmerplanet.ant.taskdefs.jmeter.JMeterTask cannot be found.

I wonder if there is a bug with Maven 2 profile?

Thanks,
jee
-- 
View this message in context: http://www.nabble.com/Dependency-problem-with-profile-tf3418300s177.html#a9527175
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org