Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include a provided denpendency when debug webapp using maven tomcat plugin?

I have webapp which has a jdbc driver dependency. And this is dependency's scope is provided. So when I use maven tomcat plugin to run it, it is not include in my local. So how can I include this provided plugin when I debug it using maven tomcat plugin ?

Thanks

like image 865
zjffdu Avatar asked Dec 22 '25 14:12

zjffdu


1 Answers

One way to do this would be to use a profile for debugging using tomcat. In this you can specify the required dependency with the needed scope. Something like this...

   <profile>
        <id>tomcat</id>
        <dependencies>
            <dependency>
                <groupId>myGroup</groupId>
                <artifactId>myArtifact</artifactId>
                <version>a.b.c</version>
            </dependency>
        </dependencies>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>tomcat-maven-plugin</artifactId>
                    <version>1.1</version>
                </plugin>
            </plugins>
        </build>
    </profile>
like image 58
Raghuram Avatar answered Dec 24 '25 07:12

Raghuram



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!