Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jenkins在多模块maven项目中部署war文件的工作_Maven_Jenkins_Continuous Integration_Maven Tomcat Plugin - Fatal编程技术网

Jenkins在多模块maven项目中部署war文件的工作

Jenkins在多模块maven项目中部署war文件的工作,maven,jenkins,continuous-integration,maven-tomcat-plugin,Maven,Jenkins,Continuous Integration,Maven Tomcat Plugin,我尝试设置Jenkins作业,以部署我的多模块maven项目的war文件。 我的项目结构与此类似: --Platform |-- Core |-- ... |-- Backend |-- BackendWeb |-- Frontend |-- WebFrotnend1 |-- WebService |-- ... 我已经设法创建了一个作业,它从SVN检索根平台,并使用Maven构建所有内容。 当我手动部署时,此作业生成的war文件工作正常 现在我想创建一个作

我尝试设置Jenkins作业,以部署我的多模块maven项目的war文件。 我的项目结构与此类似:

--Platform
 |-- Core
   |-- ...
 |-- Backend
   |-- BackendWeb
 |-- Frontend
   |-- WebFrotnend1
   |-- WebService
   |-- ...
我已经设法创建了一个作业,它从SVN检索根平台,并使用Maven构建所有内容。 当我手动部署时,此作业生成的war文件工作正常

现在我想创建一个作业,通过TomcatMaven插件构建和部署后端Web模块

为了实现这一点,我尝试创建另一个作业,它只检索单个模块,而不是整个项目并执行 tomcat重新部署目标。乍一看,构建和部署似乎不错,但在tomcat日志中,我看到了以下内容:

Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.myproject.core.service.config.ConfigurationService]
: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
        The import com.myproject.core.config.ConfigEntry cannot be resolved
        ConfigEntry cannot be resolved to a type
        The method getByKey(String) from the type ConfigurationDAO refers to the missing type ConfigEntry
        ConfigEntry cannot be resolved to a type
        ConfigEntry cannot be resolved to a type

        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:162)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:76)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:990)
        ... 69 more
Caused by: java.lang.Error: Unresolved compilation problems:
        The import com.myproject.core.config.ConfigEntry cannot be resolved
        ConfigEntry cannot be resolved to a type
        The method getByKey(String) from the type ConfigurationDAO refers to the missing type ConfigEntry
        ConfigEntry cannot be resolved to a type
        ConfigEntry cannot be resolved to a type
我忘了什么吗? 我不知道为什么这个构建与第一个作业的构建不同,依赖项应该取自同一个maven存储库

到目前为止,我还没有在网上找到解决这个问题的办法。
Jenkins中有没有实现这一点的最佳实践?

我只是忘了在tomcat:redeploy之前添加clean任务。不知道为什么要花很长时间才能找到解决方案