当前位置: 首页 > 知识库问答 >
问题:

Jenkins构建失败:包org.eclipse.swt不存在

苏硕
2023-03-14
 Started calculate disk usage of build
 Finished Calculation of disk usage of build in 0 seconds
 Started calculate disk usage of workspace
 Finished Calculation of disk usage of workspace in 0 seconds
 [INFO] [1m------------------------------------------------------------------------[m
 [INFO] [1;31mBUILD FAILURE[m
 [INFO] [1m------------------------------------------------------------------------[m
 [INFO] Total time: 7.360 s
 [INFO] Finished at: 2019-10-24T13:55:12-05:00
 [INFO] [1m------------------------------------------------------------------------[m
 Waiting for Jenkins to finish collecting data
 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project myrcp-app: Compilation failure: Compilation failure:
 [ERROR] /c:/jenkins/workspace/myrcp-app/src/main/java/com/company/myrcp/app/internal/handlers/AboutHandler.java:[8,23] package org.eclipse.swt does not exist
 [ERROR] /c:/jenkins/workspace/myrcp-app/src/main/java/com/company/myrcp/app/internal/handlers/AboutHandler.java:[9,30] package org.eclipse.swt.events does not exist
 [ERROR] /c:/jenkins/workspace/myrcp-app/src/main/java/com/company/myrcp/app/internal/handlers/AboutHandler.java:[10,30] package org.eclipse.swt.events does not exist
 [ERROR] /c:/jenkins/workspace/myrcp-app/src/main/java/com/company/myrcp/app/internal/handlers/AboutHandler.java:[11,32] package org.eclipse.swt.graphics does not exist
 [ERROR] /c:/jenkins/workspace/myrcp-app/src/main/java/com/company/myrcp/app/internal/handlers/AboutHandler.java:[12,30] package org.eclipse.swt.layout does not exist
 [ERROR] /c:/jenkins/workspace/myrcp-app/src/main/java/com/company/myrcp/app/internal/handlers/AboutHandler.java:[13,30] package org.eclipse.swt.layout does not exist
 [ERROR] /c:/jenkins/workspace/myrcp-app/src/main/com/company/myrcp/app/internal/handlers/AboutHandler.java:[14,30] package org.eclipse.swt.layout does not exist
 [ERROR] /c:/jenkins/workspace/myrcp-app/src/main/java/com/company/myrcp/app/internal/handlers/AboutHandler.java:[15,31] package org.eclipse.swt.widgets does not exist
 [ERROR] /c:/jenkins/workspace/myrcp-app/src/main/java/com/company/myrcp/app/internal/handlers/AboutHandler.java:[16,31] package org.eclipse.swt.widgets does not exist
 [ERROR] /c:/jenkins/workspace/myrcp-app/src/main/java/com/company/myrcp/app/internal/handlers/AboutHandler.java:[17,31] package org.eclipse.swt.widgets does not exist
 [ERROR] /c:/jenkins/workspace/myrcp-app/src/main/java/com/company/myrcp/app/internal/handlers/AboutHandler.java:[18,31] package org.eclipse.swt.widgets does not exist
 [ERROR] /c:/jenkins/workspace/myrcp-app/src/main/java/com/company/myrcp/app/internal/handlers/AboutHandler.java:[19,31] package org.eclipse.swt.widgets does not exist
 [ERROR] /c:/jenkins/workspace/myrcp-app/src/main/java/com/company/myrcp/app/internal/handlers/AboutHandler.java:[20,31] package org.eclipse.swt.widgets does not exist
 [ERROR] /c:/jenkins/workspace/myrcp-app/src/main/java/com/company/myrcp/app/internal/handlers/AboutHandler.java:[45,39] cannot find symbol
 [ERROR] symbol:   class Dialog
 [ERROR] location: class com.company.myrcp.app.internal.handlers.AboutHandler
 [ERROR] /c:/jenkins/workspace/myrcp-app/src/main/java/com/company/myrcp/app/nternal/handlers/AboutHandler.java:[47,34] cannot find symbol
 [ERROR] symbol:   class Shell
 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
 [ERROR] 
        <dependency>
          <groupId>org.eclipse.swt</groupId>
          <artifactId>org.eclipse.swt</artifactId>
          <scope>compile</scope>
        </dependency>

不确定我是否必须添加任何插件才能让它在詹金斯运行?

共有1个答案

慕项明
2023-03-14

如果您使用的是maven,请指定版本。一旦成功地内置了本地版本,您就可以调查所有的依赖项是否可用。如果您尝试在eclipse内部运行,eclipse了解依赖关系并帮助您在本地构建。

幸运的是,如果您在另一台机器上运行Jenkins,从repo构建代码,则必须指定版本,maven下载依赖项并构建它。

可以通过在内部维护远程存储库来消除这种情况。如果您有一个内部回购,然后考虑检查回购可用性。

 类似资料:
  • ----maven-enforcer-plugin:1.0.1:enforce(default)@cli---添加ignore:org.eclipse.jetty.spdy.* ----maven-enforcer-plugin:1.0.1:enforce(enforce-bang-dependencies)@cli-- ---build-helper-maven-plugin:1.7:times

  • 我需要在maven项目中解析json文件。为此,我从java文件(App.java)中的一个简单导入开始 然后,我尝试使用编译项目,但出现错误: 下面是我如何构建maven项目的: 我创建了maven项目: 你知道如何解决这个错误吗?

  • [maventest]$/system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/bin/java-xmx512m-xx:maxpermsize=128m-dfile.encoding=utf-8-cp/users/shared/jenkins/home/plugins/maven-plugin/web-inf/lib/mav

  • 问题内容: 每当我尝试使用Jenkins进行构建时,都会出现以下错误 无法应用插件[id’io.fabric’]无法创建类型为’CrashlyticsPlugin’的插件。 从Gradle中删除Crashlytics可以解决此问题 问题答案: 所以我想我通过结合使用这个答案这些是您需要遵循的最终命令: 这是这种情况的相关调试日志: 和@TarahWheelerVanVlack答案来解决它,我不得不

  • 我是詹金斯的新手。然而,这个问题看起来很容易,但它对我不起作用。我的源代码是在GIT中,我正在使用GIT存储库。我得到下面的错误。 提前谢了。 由用户abc在工作区/var/lib/jenkins/workspace/hello World中的master上构建启动 从以下内容获取上游更改 git--版本#timeout=10使用.gitcredentials设置凭据git config--本地凭

  • 问题内容: 我已经设置了一个Jenkins服务器来运行Selenium测试。生成脚本是用Ant(CentOS 6.3上的v 1.7.1)编写的,并且测试在Sauce Labs上运行。我通过外壳执行构建: 问题是测试失败时,詹金斯(Jenkins)将其标记为成功。我可以通过将设置为来避免这种情况,请参阅: 但是,这并不理想,因为Jenkins会在遇到第一个故障时终止构建。构建完成后是否可以检查失败,