I need to use external dependencies for tomcat. I add them to project structures and project build fine. Compiler doesn't show any errors
project structure
The project works fine when i run it on IDE.
The problem starts when I try to build WAR file using Maven package :
package org.apache.catalina does not exist
package org.apache.catalina.connector does not exist
package org.apache.coyote does not exist
I've try with all different scope settings but jars aren't found
maven compilation error:
module 'my.demo' reads package 'springfox.documentation.service' from both 'springfox.core' and 'springfox.spi'
Is it possible to solve split package problem from dependencies?
This question follows this post: Gradle: Where are external dependencies stored?.
I want to use MongoDB driver for Java, so I added the following line:
compile 'org.mongodb:mongodb-driver:3.4.0'
to build.gradle file. After finishing the build successfully, I found the jar file of the dependency in ~/.gradle/caches/modules-2/files-2.1/org.mongodb.
I also added the path ~/.gradle to external libraries.
However, when I write the statement
import com.mongodb.MongoClient;
inside my project, I get an error:
"Can't resolve symbol 'mongodb'".
Do you know how to resolve this issue?
Now IJ searches in .gradle for classfiles. Of course mongodb is not found in there. As I said in the comment of the other issue, if you change the dependencies in your Gradle file and did not enable auto-import when you imported the Gradle project into IJ, its library configuration will not automatically update. Either tell IJ manually to refresh the library configuration from the Gradle file or activate auto-import so that it automatically sees when you change the Gradle file and automatically updates the library configuration.
Make sure you opened the project as Gradle project
When you add dependency, press on the sync dependencies button
I have a multi module project, and when I run Sonarqube task it shows
Could not find class xxx.xxx.xxx, due to: java.lang.NoClassDefFoundError: yyy/xxx/zzz
error.
Which is due to I use providedCompile instead of compile in gradle which cause the class source that has dependencies on another module to not compiled into build/classes/main folder.
Is there a way to point the source or copy the source over to that particular module?
I have recently configured an existing playframework project on my eclipse but I am getting a compile time exception classes like
import controllers.playtemplate.security.SecuredUser;
import controllers.playtemplate.security.WebsealSecure;
Can you please let me know what maven dependency would be required for this module of playframework so that i can get the code compiled?
I was able to resolve this issue by running the following command
play run -DrunEnv=local