java - Maven web project is not properly deployed on Tomcat 8 -


i have maven web project working fine when run maven build , take war file , manually deploy in standalone server.

when use 'run on server' option in eclipse, project seems deployed in tomcat server class files missing in workspace server location. pom.xml , pom.properties available.

not sure why war file not deployed when run through 'run on server' option.

(i tried mvn eclipse:eclipse command convert maven java web project unsuccessful on deployment)

i have m2e plugin in eclipse. tomcat version tomcat 8.

edited: pom.xml

<?xml version="1.0" encoding="utf-8"?> <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.abc</groupid>     <artifactid>reports</artifactid>     <version>0.0.1</version>     <packaging>war</packaging>      <name>report service</name>         <parent>         <groupid>com.abc</groupid>         <artifactid>a1-service</artifactid>         <version>1.0-snapshot</version>         <relativepath>..</relativepath>     </parent>      <properties>         <project.build.sourceencoding>utf-8</project.build.sourceencoding>         <java.version>1.8</java.version>         <rest-assured.version>2.4.0</rest-assured.version>         <rootpath>${basedir}</rootpath>         <main.basedir>${project.basedir}</main.basedir>         <commons-pool2.version>2.4.1</commons-pool2.version>          <maven.build.timestamp.format>yyyy-mm-dd hh:mm z</maven.build.timestamp.format>          <springframework-version>1.3.1.release</springframework-version>         <swagger.version>2.1.4</swagger.version>         <springfox.version>2.3.1</springfox.version>         <spring.boot.version>1.2.2.release</spring.boot.version>         <asciidoctor.version>1.5.3</asciidoctor.version>         <asciidoctorj.pdf.version>1.5.0-alpha.11</asciidoctorj.pdf.version>          <commons-lang3.version>3.4</commons-lang3.version>              </properties>      <dependencies>          <!-- start swagger -->         <dependency>             <groupid>org.apache.commons</groupid>             <artifactid>commons-lang3</artifactid>             <version>${commons-lang3.version}</version>         </dependency>         <dependency>             <groupid>io.springfox</groupid>             <artifactid>springfox-swagger2</artifactid>             <version>${springfox.version}</version>         </dependency>         <dependency>             <groupid>io.springfox</groupid>             <artifactid>springfox-core</artifactid>             <version>${springfox.version}</version>         </dependency>         <dependency>             <groupid>io.springfox</groupid>             <artifactid>springfox-staticdocs</artifactid>             <version>${springfox.version}</version>             <scope>test</scope>         </dependency>         <dependency>             <groupid>io.github.robwin</groupid>             <artifactid>swagger2markup</artifactid>             <version>0.9.2</version>         </dependency>         <dependency>             <groupid>org.springframework.boot</groupid>             <artifactid>spring-boot-devtools</artifactid>             <version> ${springframework-version}</version>                         <optional>true</optional>         </dependency>         <dependency>               <groupid>com.jayway.restassured</groupid>               <artifactid>rest-assured</artifactid>               <version>${rest-assured.version}</version>         </dependency>                <dependency>             <groupid>org.springframework.boot</groupid>             <artifactid>spring-boot-starter-tomcat</artifactid>             <version> ${springframework-version}</version>                         <scope>provided</scope>         </dependency>         <dependency>             <groupid>org.springframework.restdocs</groupid>             <artifactid>spring-restdocs-mockmvc</artifactid>             <version>1.0.1.release</version>             <scope>test</scope>         </dependency>          <dependency>             <groupid>org.springframework.boot</groupid>             <artifactid>spring-boot</artifactid>             <version>1.3.1.release</version>         </dependency>          <dependency>             <groupid>org.springframework</groupid>             <artifactid>spring-context</artifactid>             <version>4.2.5.release</version>         </dependency>          <!-- end swagger -->          <dependency>             <groupid>org.springframework.boot</groupid>             <artifactid>spring-boot-starter-web</artifactid>             <exclusions>                 <exclusion>                     <groupid>org.apache.tomcat.embed</groupid>                     <artifactid>tomcat-embed-core</artifactid>                 </exclusion>                 <exclusion>                     <groupid>org.apache.tomcat.embed</groupid>                     <artifactid>tomcat-embed-el</artifactid>                 </exclusion>                 <exclusion>                     <groupid>org.apache.tomcat.embed</groupid>                     <artifactid>tomcat-embed-jasper</artifactid>                 </exclusion>                 <exclusion>                     <groupid>org.apache.tomcat.embed</groupid>                     <artifactid>tomcat-embed-logging-juli</artifactid>                 </exclusion>                 <exclusion>                     <groupid>org.apache.tomcat.embed</groupid>                     <artifactid>tomcat-embed-websocket</artifactid>                 </exclusion>                 <exclusion>                     <groupid>org.apache.tomcat</groupid>                     <artifactid>tomcat-jdbc</artifactid>                 </exclusion>                 <exclusion>                     <groupid>org.apache.tomcat</groupid>                     <artifactid>tomcat-jsp-api</artifactid>                 </exclusion>             </exclusions>         </dependency>          <dependency>             <groupid>org.apache.tomcat</groupid>             <artifactid>tomcat-catalina</artifactid>             <version>8.0.21</version>             <scope>provided</scope>         </dependency>         <dependency>               <groupid>org.apache.poi</groupid>               <artifactid>poi-ooxml</artifactid>               <version>3.9</version>         </dependency>          <dependency>             <groupid>org.springframework.boot</groupid>             <artifactid>spring-boot-starter-tomcat</artifactid>             <scope>provided</scope>         </dependency>          <dependency>             <groupid>org.springframework.boot</groupid>             <artifactid>spring-boot-starter-test</artifactid>             <scope>test</scope>         </dependency>          <dependency>             <groupid>org.springframework.hateoas</groupid>             <artifactid>spring-hateoas</artifactid>         </dependency>          <dependency>             <groupid>org.springframework</groupid>             <artifactid>spring-aspects</artifactid>         </dependency>          <dependency>             <groupid>org.mockito</groupid>             <artifactid>mockito-core</artifactid>             <scope>test</scope>         </dependency>          <dependency>             <groupid>org.hamcrest</groupid>             <artifactid>hamcrest-core</artifactid>             <scope>test</scope>         </dependency>          <dependency>             <groupid>com.jayway.restassured</groupid>             <artifactid>spring-mock-mvc</artifactid>             <version>${rest-assured.version}</version>             <scope>test</scope>         </dependency>         <dependency>             <groupid>com.googlecode.json-simple</groupid>             <artifactid>json-simple</artifactid>             <version>1.1.1</version>         </dependency>          <dependency>             <groupid>org.apache.httpcomponents</groupid>             <artifactid>httpclient</artifactid>             <version>4.3.6</version>         </dependency>         <dependency>             <groupid>com.abc.commons</groupid>             <artifactid>commons-core</artifactid>             <version>0.0.1</version>             <exclusions>                 <exclusion>                     <groupid>org.slf4j</groupid>                     <artifactid>slf4j-log4j12</artifactid>                 </exclusion>             </exclusions>             <scope>compile</scope>         </dependency>      </dependencies>        <build>          <finalname>reports.${buildnumber}</finalname>          <plugins>          <!-- start swagger -->         <plugin>              <groupid>org.asciidoctor</groupid>             <artifactid>asciidoctor-maven-plugin</artifactid>              <version>1.5.2.1</version>              <dependencies>                 <dependency>                       <groupid>org.asciidoctor</groupid>                       <artifactid>asciidoctorj</artifactid>                       <version>1.5.3.2</version>                 </dependency>                 <dependency>                       <groupid>org.asciidoctor</groupid>                       <artifactid>asciidoctorj-pdf</artifactid>                       <version>1.5.0-alpha.11</version>                   </dependency>                 <dependency>                       <groupid>org.jruby</groupid>                       <artifactid>jruby-complete</artifactid>                       <version>9.0.4.0</version>                   </dependency>              </dependencies>              <executions>                 <execution>                       <id>generate-docs</id>                       <phase>package</phase>                       <goals>                           <goal>process-asciidoc</goal>                       </goals>                       <configuration>                           <backend>html</backend>                           <sourcedirectory>${basedir}/src/docs/asciidoc</sourcedirectory>                           <outputdirectory>${project.build.directory}/generated-docs/html</outputdirectory>                           <attributes>                               <toclevels>2</toclevels>                               <toc>left</toc>                               <doctype>book</doctype>                               <generated>src/docs/asciidoc/generated</generated>                           </attributes>                       </configuration>                   </execution>                 <execution>                       <id>generate-pdf-doc</id>                       <phase>generate-resources</phase>                       <goals>                           <goal>process-asciidoc</goal>                       </goals>                       <configuration>                           <backend>pdf</backend>                           <sourcehighlighter>rouge</sourcehighlighter>                           <sourcedirectory>${basedir}/src/docs/asciidoc</sourcedirectory>                           <outputdirectory>${project.build.directory}/generated-docs/pdf</outputdirectory>                           <attributes>                               <icons>font</icons>                               <pagenums />                               <toc />                               <idprefix />                               <idseparator>-</idseparator>                               <generated>src/docs/asciidoc/generated</generated>                           </attributes>                       </configuration>                   </execution>             </executions>         </plugin>                <!-- end swagger -->              <plugin>                 <groupid>org.springframework.boot</groupid>                 <artifactid>spring-boot-maven-plugin</artifactid>             </plugin>              <plugin>                 <groupid>org.codehaus.mojo</groupid>                 <artifactid>buildnumber-maven-plugin</artifactid>                 <version>1.3</version>                 <executions>                     <execution>                         <phase>validate</phase>                         <goals>                             <goal>create</goal>                         </goals>                     </execution>                 </executions>                 <configuration>                     <docheck>true</docheck>                     <doupdate>true</doupdate>                     <format>${project.version}.r{0,number}</format>                     <items>                         <item>buildnumber0</item>                     </items>                 </configuration>             </plugin>              <plugin>                 <artifactid>maven-war-plugin</artifactid>                 <version>2.6</version>                 <configuration>                     <archive>                         <manifest>                             <adddefaultimplementationentries>true</adddefaultimplementationentries>                         </manifest>                         <manifestentries>                             <build-time>${maven.build.timestamp}</build-time>                             <implementation-build>${buildnumber}</implementation-build>                             <implementation-title>${project.name}</implementation-title>                             <implementation-version>${project.version}</implementation-version>                         </manifestentries>                     </archive>                 </configuration>             </plugin>              <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-dependency-plugin</artifactid>                 <version>2.10</version>                 <executions>                     <execution>                         <id>copy-installed</id>                         <phase>package</phase>                         <goals>                             <goal>copy</goal>                         </goals>                         <configuration>                             <artifactitems>                                 <artifactitem>                                     <groupid>${project.groupid}</groupid>                                     <artifactid>${project.artifactid}</artifactid>                                     <version>${project.version}</version>                                     <type>${project.packaging}</type>                                     <outputdirectory>${project.build.directory}</outputdirectory>                                     <destfilename>${project.artifactid}.${project.packaging}</destfilename>                                 </artifactitem>                             </artifactitems>                         </configuration>                     </execution>                 </executions>             </plugin>         </plugins>          <pluginmanagement>             <plugins>                  <!-- start swagger -->                 <plugin>                     <groupid>org.eclipse.m2e</groupid>                     <artifactid>lifecycle-mapping</artifactid>                     <version>1.0.0</version>                     <configuration>                         <lifecyclemappingmetadata>                             <pluginexecutions>                                 <pluginexecution>                                     <pluginexecutionfilter>                                         <groupid>                                             org.asciidoctor                                         </groupid>                                         <artifactid>                                             asciidoctor-maven-plugin                                         </artifactid>                                         <versionrange>[1.5.2.1,)</versionrange>                                         <goals>                                             <goal>                                                 process-asciidoc                                             </goal>                                         </goals>                                     </pluginexecutionfilter>                                     <action>                                         <ignore></ignore>                                     </action>                                 </pluginexecution>                                 <pluginexecution>                                     <pluginexecutionfilter>                                         <groupid>                                             org.apache.maven.plugins                                         </groupid>                                         <artifactid>                                             maven-compiler-plugin                                         </artifactid>                                         <versionrange>                                             [3.1,)                                         </versionrange>                                         <goals>                                             <goal>testcompile</goal>                                             <goal>compile</goal>                                         </goals>                                     </pluginexecutionfilter>                                     <action>                                         <ignore></ignore>                                     </action>                                 </pluginexecution>                             </pluginexecutions>                         </lifecyclemappingmetadata>                     </configuration>                 </plugin>                 <!-- end swagger -->              </plugins>         </pluginmanagement>     </build>  </project> 


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -