Tomcat上的Maven部署:仅webapps中的.java文件
使用Maven和Tomcat 7.0.42 当我的war文件部署到tomcat上时,我会得到一个ClassNotFoundException。当查看tomcat上的文件夹时,我只看到一个.java文件,而没有.class文件。现在再次启动服务器(就像我最近做的那样),它有.class文件。什么都没变!我刚刚听说我们使用wtp插件进行部署。这有用吗 这里发生了什么事Tomcat上的Maven部署:仅webapps中的.java文件,java,maven,tomcat,Java,Maven,Tomcat,使用Maven和Tomcat 7.0.42 当我的war文件部署到tomcat上时,我会得到一个ClassNotFoundException。当查看tomcat上的文件夹时,我只看到一个.java文件,而没有.class文件。现在再次启动服务器(就像我最近做的那样),它有.class文件。什么都没变!我刚刚听说我们使用wtp插件进行部署。这有用吗 这里发生了什么事 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="h
<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>
<artifactId>SVIS3GWebDruck</artifactId>
<packaging>war</packaging>
<parent>
<groupId>de.svi.svis3g</groupId>
<artifactId>SVIS3G_Fragments</artifactId>
<version>3.6.0-SNAPSHOT</version>
</parent>
<profiles>
<profile>
<id>local_tomcat_admin_app_deploy</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.0.1-sr-1</version>
<configuration>
<!-- Container configuration -->
<container>
<containerId>tomcat6x</containerId>
<type>remote</type>
</container>
<configuration>
<type>runtime</type>
<properties>
<cargo.remote.username>admin</cargo.remote.username>
<cargo.remote.password>pwd</cargo.remote.password>
<cargo.tomcat.manager.url>http://localhost:8080/manager</cargo.tomcat.manager.url>
</properties>
</configuration>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>local_tomcat_deploy</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.0.1-sr-1</version>
<configuration>
<!-- Container configuration -->
<container>
<containerId>tomcat6x</containerId>
</container>
<configuration>
<type>existing</type>
<home>B:\applicationserver\apache-tomcat-7.0.42</home>
</configuration>
<deployer>
<deployables>
<deployable>
<artifactId>SVIS3GWebDruck</artifactId>
<groupId>de.svi.svis3g</groupId>
<type>war</type>
</deployable>
</deployables>
</deployer>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>vt_tomcat_deploy</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<executions>
<execution>
<id>start-container</id>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-container</id>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
<configuration>
<container>
<containerId>tomcat6x</containerId>
<type>remote</type>
</container>
<configuration>
<type>runtime</type>
<properties>
<cargo.remote.username>admin</cargo.remote.username>
<cargo.remote.password>pwd</cargo.remote.password>
<cargo.tomcat.manager.url>${ServerURL}/manager</cargo.tomcat.manager.url>
</properties>
</configuration>
<deployer>
<deployables>
<deployable>
<artifactId>SVIS3GWebDruck</artifactId>
<groupId>de.svi.svis3g</groupId>
<type>war</type>
</deployable>
</deployables>
</deployer>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
</dependency>
<dependency>
<groupId>com.caucho.hessian</groupId>
<artifactId>hessian</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>de.svi.svis3g</groupId>
<artifactId>SVIS3GBirt</artifactId>
</dependency>
<dependency>
<groupId>de.svi.svis3g</groupId>
<artifactId>SVIS3GCommons</artifactId>
</dependency>
<dependency>
<groupId>de.svi.svis3g</groupId>
<artifactId>SVIS3GBusiness</artifactId>
</dependency>
<dependency>
<groupId>de.svi.svis3g</groupId>
<artifactId>SVIS3GBirtAPI</artifactId>
</dependency>
<dependency>
<groupId>de.svi.svis3g</groupId>
<artifactId>SVIS3GEISIntegrationAPI</artifactId>
</dependency>
<dependency>
<groupId>de.svi.svis3g</groupId>
<artifactId>SVIS3GEISIntegrationEVBDruck</artifactId>
</dependency>
<dependency>
<groupId>de.svi.svis3g</groupId>
<artifactId>SVIS3GEVBDruckWSGen</artifactId>
</dependency>
</dependencies>
<build>
<finalName>SVIS3GWebDruck</finalName>
<defaultGoal>install</defaultGoal>
<resources>
<resource>
<directory>src/main/resources/de/svi/svis3g/birt/resources</directory>
<targetPath>de/svi/svis3g/birt/resources</targetPath>
<filtering>false</filtering>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
<directory>target</directory>
<excludes>
<exclude>**/*</exclude>
</excludes>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
4.0.0
SVIS3GWebDruck
战争
de.svi.svis3g
SVIS3G_片段
3.6.0-快照
本地\u tomcat\u管理\u应用程序\u部署
错误的
org.codehaus.cargo
cargo-maven2-plugin
1.0.1-sr-1
tomcat6x
遥远的
运行时
管理
pwd
http://localhost:8080/manager
本地\u tomcat\u部署
错误的
org.codehaus.cargo
cargo-maven2-plugin
1.0.1-sr-1
tomcat6x
现有的
B:\applicationserver\apache-tomcat-7.0.42
SVIS3GWebDruck
de.svi.svis3g
战争
vt_tomcat_部署
符合事实的
org.codehaus.cargo
cargo-maven2-plugin
启动容器
开始
停止容器
停止
tomcat6x
遥远的
运行时
管理
pwd
${ServerURL}/manager
SVIS3GWebDruck
de.svi.svis3g
战争
javax.servlet
servlet api
假如
javax.servlet
jstl
org.springframework.ws
SpringWS核心
org.springframework
弹簧芯
cglib
cglib
com.caucho.hessian
黑森
com.sun.xml.ws
jaxws-rt
org.slf4j
slf4j api
org.slf4j
slf4j-log4j12
朱尼特
朱尼特
测验
de.svi.svis3g
SVIS3GBirt
de.svi.svis3g
SVIS3GCommons
de.svi.svis3g
SVIS3g业务
de.svi.svis3g
SVIS3GBirtAPI
de.svi.svis3g
SVIS3GEISINTEGRATION API
de.svi.svis3g
SVIS3GEISINTEGRATION EVBDRUCK
de.svi.svis3g
SVIS3GEVBDruckWSGen
SVIS3GWebDruck
安装
src/main/resources/de/svi/svis3g/birt/resources
de/svi/svis3g/birt/resources
错误的
**/*.*
org.apache.maven.plugins
maven编译器插件
org.apache.maven.plugins
maven eclipse插件
org.apache.maven.plugins
maven战争插件
目标
**/*