长治哪里做网站,广州外发加工网,公司企业信息查询,jsp做的简单的图书馆网站序言
在传统java开发项目中#xff0c;我们可以利用maven来管理jar包依赖#xff0c;但在mendix项目开发Custom Java Action时#xff0c;由于目录结构有一些差异#xff0c;我们需要自行配置。同样的#xff0c;在mendix项目开发Custom JavaScript Action时#xff0c;…序言
在传统java开发项目中我们可以利用maven来管理jar包依赖但在mendix项目开发Custom Java Action时由于目录结构有一些差异我们需要自行配置。同样的在mendix项目开发Custom JavaScript Action时我们也希望可以安装npm依赖从而自动构建进js bundle文件中而不是通过script标签在index.html中引用。那么接下来我们就分别介绍这两种方案吧
完整示例
https://gitee.com/engalar/mendix-debugger-demo
后端依赖管理(maven)
配置文件
{项目目录}/pom.xml
project xmlnshttp://maven.apache.org/POM/4.0.0xmlns:xsihttp://www.w3.org/2001/XMLSchema-instance xsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsdmodelVersion4.0.0/modelVersiongroupIdcom.mxcn/groupIdartifactIdDataImport/artifactIdversion1.1.0/versionbuildpluginsplugingroupIdorg.apache.maven.plugins/groupIdartifactIdmaven-dependency-plugin/artifactIdexecutionsexecutionidcopy-dependencies/idgoalsgoalcopy-dependencies/goal/goalsconfigurationoutputDirectory${project.basedir}/userlib/outputDirectoryoverWriteReleasesfalse/overWriteReleasesoverWriteSnapshotsfalse/overWriteSnapshotsoverWriteIfNewertrue/overWriteIfNewerexcludeGroupIdscom.mendix/excludeGroupIds/configuration/execution/executions/plugin/plugins/builddependenciesdependencygroupIdcom.github.javafaker/groupIdartifactIdjavafaker/artifactIdversion1.0.2/version/dependency!-- 此处添加你需要的jar包依赖 --/dependenciespluginRepositoriespluginRepositoryidaliyun-plugin/idurlhttps://maven.aliyun.com/repository/central/url/pluginRepository/pluginRepositoriesrepositoriesrepositoryidaliyun-central/idnamealiyun central/nameurlhttps://maven.aliyun.com/repository/central/urlreleasesenabledtrue/enabled/releasessnapshotsenabledfalse/enabled/snapshots/repository/repositories/project接下来我们只需要把我们项目的依赖填入即可如
dependenciesdependencygroupIdcom.github.javafaker/groupIdartifactIdjavafaker/artifactIdversion1.0.2/version/dependency!-- 此处添加你需要的jar包依赖 --/dependencies执行依赖安装
mvn compile确保我们安装了mvn和jdk8详细安装可以参考 https://www.runoob.com/maven/maven-setup.html
一切顺利我们就可以看到相应的依赖被下载到mendix期望的目录{项目目录}/userlib中了。
前端依赖管理(npm) 使用场景
我们新建了一个JavaScript Action LuckysheetRender需要用到mobx这个npm包做状态管理
安装过程
安装node参考 https://www.runoob.com/nodejs/nodejs-install-setup.htmlcd到LuckysheetRender所在的模块JavaScript源码目录即{项目目录}/javascriptsource/luckysheetnpm install mobx
使用
安装之后就可以在js代码中import了。
关于Mendix公司
在一个数字化先行的世界中客户希望自己的每一项需求都得到满足员工希望使用更好的工具来完成工作而企业意识到自己只有通过全面数字化转型才能生存并取得成功。Mendixa Siemens business正在迅速成为企业数字化转型的推动者。Mendix公司是权威行业分析师眼中的领导者和远见者从人工智能和增强现实到智能自动化和原生移动Mendix公司已成为数字化先行企业的骨干。Mendix公司企业低代码平台已被全球4000多家领先的公司采用。