java - Maven dependency scope conflict with Eclipse scope -


when declare maven dependancy in eclipse runtime, additional jar's copied tomcat on deployment. on compile have deployment errors, because absence of libraries. eclipse compiles without errors.

but, when want build same project maven (mvn compile), runtime dependencies not in classpath when compiling, have compilation errors.

this causes have compile 1 of tools or maintain 2 pom.xml files.

any solution on pom.xml dependencies both used in mvn command compilation , deployed runtime environment eclipse?

why declare dependencies runtime if needed compilation?

runtime scope indicates dependency not required compilation, execution. in runtime , test classpaths, not compile classpath. 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -