用 maven 战争文件生成的缺少一些罐子



我用maven生成.war文件,最后缺少一个jar。结果我的应用程序甚至无法启动。当我将错过的罐子添加到雄猫下的解压缩战争中时,一切都开始正常工作。

这是一个包含我需要的依赖项的pom.xml:

<dependencies>
 <dependency>
  <groupId>com.vaadin</groupId>
  <artifactId>vaadin-server</artifactId>
  <version>${vaadin.version}</version>
  <scope>runtime</scope>
 </dependency>
 <dependency>
  <groupId>com.vaadin</groupId>
  <artifactId>vaadin-client</artifactId>
  <version>${vaadin.version}</version>
 </dependency>
 <dependency>
  <groupId>com.allen-sauer.gwt.log</groupId>
  <artifactId>gwt-log</artifactId>
  <version>${google.gwt-log.version}</version>
  <exclusions>
   <exclusion>
    <groupId>com.google.gwt</groupId>
    <artifactId>gwt-user</artifactId>
   </exclusion>
   <exclusion>
    <groupId>com.google.gwt</groupId>
    <artifactId>gwt-dev</artifactId>
   </exclusion>
  </exclusions>
 </dependency>
 <dependency>
  <groupId>net.sf.gwt-widget</groupId>
  <artifactId>gwt-sl</artifactId>
  <version>${google.gwt-sl.version}</version>
  <exclusions>
   <exclusion>
    <groupId>org.springframework</groupId>
    <artifactId>spring-jdbc</artifactId>
   </exclusion>
   <exclusion>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webmvc</artifactId>
   </exclusion>
   <exclusion>
    <groupId>cglib</groupId>
    <artifactId>cglib-nodep</artifactId>
   </exclusion>
   <exclusion>
    <groupId>com.google.gwt</groupId>
    <artifactId>gwt-servlet</artifactId>
   </exclusion>
  </exclusions>
 </dependency>
<dependencies>

似乎一切都是正确的,但是最后vaadin-server.jar存在,而vaadin-client.jar不存在。这是怎么回事?

提前谢谢你。

您是否尝试为 vaadin-client 添加运行时范围?

喜欢这个:

<dependency>
  <groupId>com.vaadin</groupId>
  <artifactId>vaadin-client</artifactId>
  <version>${vaadin.version}</version>
  <scope>runtime</scope>
</dependency>

最新更新