I’m new to Java development, here is the question:
I have generated the web application mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=webapp -DarchetypeArtifactId=maven-archetype-webapp
, then i have added java.com.mycompany.app folder with the simple App.java file.
By the command mvn package tomcat:deploy in my localhost:8080/manager i can see my web app, but how can I add my jar file in it?
I’m new to Java development, here is the question: I have generated the web
Share
src/main/java, Maven compiles it and ensures it gets copied into yourWEB-INF/classesdirectory — so no need to do anything. So your classcom.mycompany.app.Appshould have been picked up by Maven, compiled and copied intoWEB-INF/classes(you should be able to verify this in thetarget/folder).pom.xmlfile.