
# 打包工程
根据您的需求进行相关代码的开发，并将项目打包，以编辑器IDEA为例：
1. 选中项目-\>右键open Module setting
2. Artifacts-\>单击+号\>JAR-\>From modules with dependencies-\>模块选择monitor-app,选择monitorapp的Main入口类,注意MANIFEST.MF位置选择模块根目录-\>单击apply。 
   ![](https://support.huaweicloud.com/bestpractice-iotedge/figure/zh-cn_image_0000001195915011.png "点击放大")
   
   
3. 单击上方build选项-\>选择build Artifacts-\>monitor-app:jar-\>build
4. 打包完成得到monitor-app.jar文件。(如运行遇到错误(Invalid signature file digest for Manifest main attributes)请使用压缩软件进入打开jar包META-INF目录删除.rsa和.mf文件，或者配置maven排除.RSA和.sf文件) 
   ![](https://support.huaweicloud.com/bestpractice-iotedge/figure/zh-cn_image_0000001195994899.png)
   ![](https://support.huaweicloud.com/bestpractice-iotedge/public_sys-resources/note_3.0-zh-cn.png)
   您也可以借助Maven工具进行项目打包
   Maven打包命令 mvn clean compile package
   
   
 
