0

I'm trying to create some tests for a web application that will be deployed in a WAR file.

I'd like to include several libraries that I have in my webapp/WEB-INF/lib folder to be available during the execution of these tests but I haven't achived it.

I have tried including:

        <testResources>
            <testResource>
                <filtering>false</filtering>
                <directory>src/main/webapp/WEB-INF/lib</directory>
<!--                <targetPath>${project.basedir}/src/test/webapp/WEB-INF/lib</targetPath> -->
            </testResource>
        </testResources>

And altough they seems to appear in the following location target\test-classes I have the following error: LIB ABC is not available to the JVM.

mop
  • 73
  • 1
  • 9
  • 1
    You shouldn't have jars in `src/main/webapp/WEB-INF/lib`, they should be maven dependencies. – tgdavies Jul 04 '23 at 22:16
  • Guess you are right, thing is this dependency is not public nor available in a repository, should I include in a local repository (eg. https://stackoverflow.com/a/28762617/8873596 https://stackoverflow.com/a/19226672/8873596 ) Or is there any better alternative? – mop Jul 04 '23 at 22:34

0 Answers0