While I have seen many solutions for this problem (or maybe I should call them workarounds) what causes these files to have to be pushed to an external library. It almost seems random that the occasional project needs to have the jars exported and a few other steps done in order to be able to deploy your project to an external server. I'm included my pom.xml file below. Maybe it's how I set up my pom file.
TIA
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.websystique.springmvc</groupId>
<artifactId>SecureRESTApiWithBasicAuthentication</artifactId>
<version>1.0.0</version>
<packaging>war</packaging>
<name>SecureRESTApiWithBasicAuthentication</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<springframework.version>4.3.1.RELEASE</springframework.version>
<springsecurity.version>4.1.1.RELEASE</springsecurity.version>
<jackson.library>2.7.5</jackson.library>
</properties>
<dependencies>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${springframework.version}</version>
</dependency>
<!-- Spring Security -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${springsecurity.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${springsecurity.version}</version>
</dependency>
<!-- Jackson libraries -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.library}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>${jackson.library}</version>
</dependency>
<!-- Servlet -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<!-- apache commons codedc -->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.10</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<warSourceDirectory>src/main/webapp</warSourceDirectory>
<warName>SecureRESTApiWithBasicAuthentication</warName>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<finalName>SecureRESTApiWithBasicAuthentication</finalName>
</build>
</project>
Below are the warnings I'm receiving.
Description Resource Path Location Type
Classpath entry M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. SecureRESTApiWithBasicAuthentication P/SecureRESTApiWithBasicAuthentication Classpath Dependency Validator Message
Classpath entry M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.7.0/jackson-annotations-2.7.0.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. SecureRESTApiWithBasicAuthentication P/SecureRESTApiWithBasicAuthentication Classpath Dependency Validator Message
Classpath entry M2_REPO/com/fasterxml/jackson/core/jackson-core/2.7.5/jackson-core-2.7.5.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. SecureRESTApiWithBasicAuthentication P/SecureRESTApiWithBasicAuthentication Classpath Dependency Validator Message
Classpath entry M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.7.5/jackson-databind-2.7.5.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. SecureRESTApiWithBasicAuthentication P/SecureRESTApiWithBasicAuthentication Classpath Dependency Validator Message
Classpath entry M2_REPO/com/fasterxml/jackson/dataformat/jackson-dataformat-xml/2.7.5/jackson-dataformat-xml-2.7.5.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. SecureRESTApiWithBasicAuthentication P/SecureRESTApiWithBasicAuthentication Classpath Dependency Validator Message
Classpath entry M2_REPO/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.7.5/jackson-module-jaxb-annotations-2.7.5.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. SecureRESTApiWithBasicAuthentication P/SecureRESTApiWithBasicAuthentication Classpath Dependency Validator Message
Classpath entry M2_REPO/commons-codec/commons-codec/1.10/commons-codec-1.10.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. SecureRESTApiWithBasicAuthentication P/SecureRESTApiWithBasicAuthentication Classpath Dependency Validator Message
Classpath entry M2_REPO/commons-logging/commons-logging/1.2/commons-logging-1.2.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. SecureRESTApiWithBasicAuthentication P/SecureRESTApiWithBasicAuthentication Classpath Dependency Validator Message
Classpath entry M2_REPO/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. SecureRESTApiWithBasicAuthentication P/SecureRESTApiWithBasicAuthentication Classpath Dependency Validator Message
Classpath entry M2_REPO/org/codehaus/woodstox/stax2-api/3.1.4/stax2-api-3.1.4.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. SecureRESTApiWithBasicAuthentication P/SecureRESTApiWithBasicAuthentication Classpath Dependency Validator Message
Classpath entry M2_REPO/org/springframework/security/spring-security-config/4.1.1.RELEASE/spring-security-config-4.1.1.RELEASE.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. SecureRESTApiWithBasicAuthentication P/SecureRESTApiWithBasicAuthentication Classpath Dependency Validator Message
Classpath entry M2_REPO/org/springframework/security/spring-security-core/4.1.1.RELEASE/spring-security-core-4.1.1.RELEASE.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. SecureRESTApiWithBasicAuthentication P/SecureRESTApiWithBasicAuthentication Classpath Dependency Validator Message
Classpath entry M2_REPO/org/springframework/security/spring-security-web/4.1.1.RELEASE/spring-security-web-4.1.1.RELEASE.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. SecureRESTApiWithBasicAuthentication P/SecureRESTApiWithBasicAuthentication Classpath Dependency Validator Message
Classpath entry M2_REPO/org/springframework/spring-aop/4.3.1.RELEASE/spring-aop-4.3.1.RELEASE.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. SecureRESTApiWithBasicAuthentication P/SecureRESTApiWithBasicAuthentication Classpath Dependency Validator Message
Classpath entry M2_REPO/org/springframework/spring-beans/4.3.1.RELEASE/spring-beans-4.3.1.RELEASE.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. SecureRESTApiWithBasicAuthentication P/SecureRESTApiWithBasicAuthentication Classpath Dependency Validator Message
Classpath entry M2_REPO/org/springframework/spring-context/4.3.1.RELEASE/spring-context-4.3.1.RELEASE.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. SecureRESTApiWithBasicAuthentication P/SecureRESTApiWithBasicAuthentication Classpath Dependency Validator Message
Classpath entry M2_REPO/org/springframework/spring-core/4.3.1.RELEASE/spring-core-4.3.1.RELEASE.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. SecureRESTApiWithBasicAuthentication P/SecureRESTApiWithBasicAuthentication Classpath Dependency Validator Message
Classpath entry M2_REPO/org/springframework/spring-expression/4.3.1.RELEASE/spring-expression-4.3.1.RELEASE.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. SecureRESTApiWithBasicAuthentication P/SecureRESTApiWithBasicAuthentication Classpath Dependency Validator Message
Classpath entry M2_REPO/org/springframework/spring-web/4.3.1.RELEASE/spring-web-4.3.1.RELEASE.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. SecureRESTApiWithBasicAuthentication P/SecureRESTApiWithBasicAuthentication Classpath Dependency Validator Message
Classpath entry M2_REPO/org/springframework/spring-webmvc/4.3.1.RELEASE/spring-webmvc-4.3.1.RELEASE.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. SecureRESTApiWithBasicAuthentication P/SecureRESTApiWithBasicAuthentication Classpath Dependency Validator Message