2015-11-26 52 views
1

没有检测到春天WebApplicationInitializer类型我有一个奇怪的错误,当我尝试部署我的war文件中的Liferay部署战争:在类路径

РЅРѕСЏ 26, 2015 2:57:08 PM org.apache.catalina.startup.HostConfig deployDirectory 
INFO: Deploying web application directory D:\dev\liferay\liferay-portal-6.2-ce-ga4\tomcat-7.0.42\webapps\site-hook 
РЅРѕСЏ 26, 2015 2:57:10 PM org.apache.catalina.core.ApplicationContext log 
INFO: No Spring WebApplicationInitializer types detected on classpath 

这就是我在我的日志。我使用Tomcat 7.042与6.2的Liferay当 我建我的钩与Maven这是确定的除外此行

[WARNING] Warning: selected war files include a WEB-INF/web.xml which will be ignored 
(webxml attribute is missing from war task, or ignoreWebxml attribute is specified as 'true') 

,这里是我的web.xml

<?xml version="1.0"?> 

<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> 

,并建立在POM节.xml

<build> 
    <plugins> 
     <plugin> 
      <groupId>com.liferay.maven.plugins</groupId> 
      <artifactId>liferay-maven-plugin</artifactId> 
      <configuration> 
       <pluginType>hook</pluginType> 
      </configuration> 
     </plugin> 
     <plugin> 
      <artifactId>maven-compiler-plugin</artifactId> 
     </plugin> 
     <plugin> 
      <artifactId>maven-resources-plugin</artifactId> 
     </plugin> 
    </plugins> 
</build> 

该问题出现在小时前,但最近一切都很好。你可以帮我吗?

回答

0

尝试在您的pom.xml中添加'maven-war-plugin'版本2.6