简体   繁体   English

什么是部署Maven Java适配器的正确方法

[英]what is the proper way deploy maven java adapter

this tutorial to deploy adapter with jar file 教程使用jar文件部署适配器

  • File → Import... → Maven → Existing Maven Projects.(java adapter create by cli use this comment "mfpdev adapter create") 文件→导入...→Maven→现有Maven项目。(由cli创建的Java适配器使用此注释“ mfpdev适配器创建”)
  • add two jar file from the lib folder 从lib文件夹添加两个jar文件
  • Select Run → Run Configurations..., right-click on Maven Build and select New. 选择运行→运行配置...,右键单击Maven Build并选择新建。
    • Provide a Name: "Maven deploy". 提供一个名称:“ Maven deploy”。
    • Set as a Goal: "adapter:deploy". 设置为目标:“ adapter:deploy”。

but run not enable . 但无法运行。 what am i missing? 我想念什么? 在此处输入图片说明

project structure : 项目结构:

在此处输入图片说明

Run As → Maven install not found for build an adapter 运行方式→找不到用于构建适配器的Maven安装

在此处输入图片说明

and used flowing command to FileUploadAdapter java adapter by CLI 并通过CLI使用到FileUploadAdapter Java适配器的流动命令

mfpdev adapter create mfpdev适配器创建
cd FileUploadAdapter/ cd FileUploadAdapter /
mfpdev adapter build mfpdev适配器构建
mfpdev adapter deploy mfpdev适配器部署

You're missing the step that you need to build the adapter. 您缺少构建适配器所需的步骤。
There is nothing to deploy if you did not build it yet. 如果您尚未构建,则无需部署。

Building an adapter 建立一个适配器
To build an adapter, right-click on the adapter folder and select Run As → Maven install. 要构建适配器,请右键单击适配器文件夹,然后选择运行方式→Maven安装。

Going by the screenshots you have posted, you need to do 2 things to get this working: 按照您发布的屏幕截图,您需要做两件事才能使此工作正常进行:

1) When creating a Maven run configuration, you need to specify the base directory. 1)创建Maven运行配置时,需要指定基本目录。 Choose your maven project here . 在这里选择您的Maven项目。 ie, "FileUploadAdapter". 即“ FileUploadAdapter”。

2) Once this is done, you need to right click the maven project - ie, the FileUploadAdapter to perform Run As -> Maven deploy. 2)完成此操作后,需要右键单击maven项目-即FileUploadAdapter以执行运行方式-> Maven部署。 As per the screenshot you are trying to perform Run As on the "target" folder of the maven project. 按照屏幕快照,您尝试在maven项目的“目标”文件夹上执行运行方式。 This will not give you any options. 这不会给您任何选择。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM