当前位置: 首页 > news >正文

网站alexa排名网站域名的设置

网站alexa排名,网站域名的设置,在小说网站做编辑怎么找,中元建设网站在进行java开发时经常遇到一种情况#xff0c;就是windows下和linux下需要引入的jar包是不一样的。 比如说我们需要使用java来操作OpenGL库#xff0c;我们就需要通过maven引入JOGL的依赖#xff0c; 然而在window下和在linux下需要引入JOGL的依赖是不一样的#xff1a; …在进行java开发时经常遇到一种情况就是windows下和linux下需要引入的jar包是不一样的。 比如说我们需要使用java来操作OpenGL库我们就需要通过maven引入JOGL的依赖 然而在window下和在linux下需要引入JOGL的依赖是不一样的 在window下需要引入JOGL的-win版本的依赖。在linux下则需要引入JOGL的-linux版本的依赖。 那么我们应该怎么做呢如何灵活配置和指定不同环境的依赖呢我们需要使用Maven配置文件中的 profiles 元素。 下面是一个常用的pom.xml ?xml version1.0 encodingUTF-8? project xmlnshttp://maven.apache.org/POM/4.0.0xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsdmodelVersion4.0.0/modelVersionparentgroupIdcom.xxx.xxx/groupIdartifactIdxxx-xxx/artifactIdversion1.0-SNAPSHOT/version/parentartifactIdxxx-xxx/artifactIdversion1.0-SNAPSHOT/versionpropertiesmaven.compiler.source8/maven.compiler.sourcemaven.compiler.target8/maven.compiler.target/propertiesdependenciesdependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-web/artifactId/dependency.../dependenciesbuildpluginsplugingroupIdorg.springframework.boot/groupIdartifactIdspring-boot-maven-plugin/artifactIdversion${spring-boot.version}/versionconfigurationfinalName${project.artifactId}/finalNamelayersenabledtrue/enabled/layersincludeSystemScopetrue/includeSystemScope/configurationexecutionsexecutiongoalsgoalrepackage/goal/goals/execution/executions/pluginplugingroupIdorg.apache.maven.plugins/groupIdartifactIdmaven-surefire-plugin/artifactIdversion2.20.1/versionconfigurationskipTeststrue/skipTests/configuration/plugin/plugins/build /project现在我需要操作OpenGL在开发时是win环境amd64需要加入如下依赖: dependencygroupIdorg.jogamp.jogl/groupIdartifactIdjogl-all/artifactIdversion2.3.2/versionclassifiernatives-linux-amd64/classifier/dependencydependencygroupIdorg.jogamp.gluegen/groupIdartifactIdgluegen-rt/artifactIdversion2.3.2/versionclassifiernatives-linux-amd64/classifier/dependency但是上生产的时候是运行在Linux上的则需要将上述依赖改为Linux的如下: dependencygroupIdorg.jogamp.jogl/groupIdartifactIdjogl-all/artifactIdversion2.3.2/versionclassifiernatives-windows-amd64/classifier/dependencydependencygroupIdorg.jogamp.gluegen/groupIdartifactIdgluegen-rt/artifactIdversion2.3.2/versionclassifiernatives-windows-amd64/classifier/dependency那么如何通过maven的配置来指定使用哪个依赖呢则需要使用 Maven 的Profiles在pom中添加如下配置 dependencies.../dependenciesprofilesprofileidwin/idpropertiesprofileActivewin/profileActivedb.urljdbc:mysql://localhost/win_db/db.url/propertiesactivationactiveByDefaulttrue/activeByDefault!-- 根据属性值激活 --propertynameenv/namevaluetest/value/property/activationdependenciesdependencygroupIdorg.jogamp.jogl/groupIdartifactIdjogl-all/artifactIdversion2.3.2/versionclassifiernatives-windows-amd64/classifier/dependencydependencygroupIdorg.jogamp.gluegen/groupIdartifactIdgluegen-rt/artifactIdversion2.3.2/versionclassifiernatives-windows-amd64/classifier/dependency/dependencies/profileprofileidlinux/idpropertiesprofileActivelinux/profileActivedb.urljdbc:mysql://localhost/linux_db/db.url/propertiesactivationactiveByDefaultfalse/activeByDefault!-- 根据属性值激活 --propertynameenv/namevalueprd/value/property/activationdependenciesdependencygroupIdorg.jogamp.jogl/groupIdartifactIdjogl-all/artifactIdversion2.3.2/versionclassifiernatives-linux-amd64/classifier/dependencydependencygroupIdorg.jogamp.gluegen/groupIdartifactIdgluegen-rt/artifactIdversion2.3.2/versionclassifiernatives-linux-amd64/classifier/dependency/dependencies/profile/profilesid 元素用于给 Profile 分配一个唯一的标识符使用maven构建时根据此id选择需要激活的环境。properties元素自定义的属性不同的 Profile 被激活时里面的配置将被设置为不同的值在其他地方可以获取到并使用改属性比如在资源文件中使用 ${} 格式的占位符引用属性的值profileActive${profileActive} db.url${db.url}activation 元素 定义了 Profile 的激活条件。 activeByDefault元素表示是否默认激活设置为 true表示在没有明确指定其他 Profile 时该配置将自动激活可以使用命令mvn clean package -Pwin或mvn clean package -Plinux来指定对应的profile id。property元素根据属性 env 的值来激活可以使用命令-Denvtest或-Denvprd来激活。 dependencies元素该环境下对应的依赖。build元素该环境下的构建选项。......其他元素用处不多不展开介绍。 正如上面所说这时候在构建时就可以指定选项来打包不同的依赖了 通过profile id打包 mvn clean package -Pwin通过自定义环境变量打包 mvn clean package -Denvtest
http://www.pierceye.com/news/143825/

相关文章:

  • 人才网站建设策划书pc网站建设
  • 做网站用哪几个端口 比较好微信营销
  • 网站开发价格有专业做网站的吗网站公司
  • 西安网站建设全包做网站要多少
  • 如何建设传奇网站怎样做招嫖网站
  • 企石镇网站仿做连云港网站开发
  • php 网站做分享功能重庆建设工程信息网30系统
  • 西部数码创建php网站北京上云网站建设公司
  • 中标建设集团有限公司 网站游戏开发软件有哪些
  • 上饶哪里做网站办公家具网站建设公司
  • 建设银行园湖路支行网站外贸网站建设需要注意什么
  • 失物招领网站开发项目需求分析app开发定制公司哪家好做
  • 网站不用备案阿里云 wordpress搭建网站
  • 重庆网站推广软件小朋友做安全教育的网站
  • 商家自己做的商品信息查询网站互联网有哪些行业
  • 用dw做网站时怎么添加弹窗知名网站服务器
  • 网站备案做优惠券第一营销网
  • 网站策划的基本过程全国大型网站建设
  • 个人外贸网站杭州微网站建设公司
  • wordpress皮肤下载站安徽建设工程信息网官方网站
  • 自己的电脑做服务器 并建网站asp sql网站安全性
  • 创新创业营销策略网站建设等信息系统开发计划
  • 安徽建设信息网站做胃镜多少钱天津津门网站I
  • jrs直播网站谁做的广告设计与制作专升本
  • 辽 icp 大连 网站建设个人网站做的类型
  • 做网站搞友情链接网站建设有哪些类型
  • 网站建设更新维护工作总结网站建设源文件
  • 公益网站 html 模板wordpress权限acl
  • 廊坊市网站建设企业网站设计特点
  • 网站建设论证方案传媒的域名做个什么网站