maven dependency scope for mojo exec:java -


i want run local activemq broker jmeter tests with:

mvn exec:java -pjmeterprofile 

i have deps in provided scope, causing java.lang.noclassdeffounderror, like

            <dependency>                     <groupid>org.slf4j</groupid>                     <artifactid>slf4j-api</artifactid>                     <version>1.6.4</version>                     <scope>provided</scope>             </dependency>             <dependency>                     <groupid>org.slf4j</groupid>                     <artifactid>slf4j-log4j12</artifactid>                     <version>1.6.4</version>                     <scope>provided</scope>             </dependency>             <dependency>                     <groupid>log4j</groupid>                     <artifactid>log4j</artifactid>                     <version>1.2.17</version>                     <scope>provided</scope>             </dependency> 

is there scope apropriated maven provide classes exec:java? or how other way provide dependency in exec:java?

resolved adding dependency mojo plugin sugested tom ( , adding includeplugindependencies true ):

                    <plugin>                             <groupid>org.codehaus.mojo</groupid>                             <artifactid>exec-maven-plugin</artifactid>                             <configuration>                                     <mainclass>${target.main.class}</mainclass>                                     <commandlineargs>${target.cmd.args}</commandlineargs>                                     <includeplugindependencies>true</includeplugindependencies>                             </configuration>                             <dependencies>                                     <dependency>                                             <groupid>org.slf4j</groupid>                                             <artifactid>slf4j-api</artifactid>                                             <version>1.6.4</version>                                             <scope>compile</scope>                                     </dependency>                                     <dependency>                                             <groupid>org.slf4j</groupid>                                             <artifactid>slf4j-log4j12</artifactid>                                             <version>1.6.4</version>                                             <scope>compile</scope>                                     </dependency>                                     <dependency>                                             <groupid>log4j</groupid>                                             <artifactid>log4j</artifactid>                                             <version>1.2.17</version>                                             <scope>compile</scope>                                     </dependency>                             </dependencies>                     </plugin> 

i believe can add dependencies plugin itself. way added when plugin executed.

check out this url.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -