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

一个用css3做的网站温州seo推广外包

一个用css3做的网站,温州seo推广外包,网站竞价难做优化,学程序员大概要多少钱在使用 maven 编译项目时&#xff0c;我们有时候会需要引入本地的 jar 包作为依赖&#xff08;不部署到本地仓库&#xff09;&#xff0c;一般会使用 scope 为 system 的标签来引入&#xff0c;如下所示&#xff1a; <dependency><groupId>com.example</groupI…

在使用 maven 编译项目时,我们有时候会需要引入本地的 jar 包作为依赖(不部署到本地仓库),一般会使用 scope 为 system 的标签来引入,如下所示:

<dependency><groupId>com.example</groupId><artifactId>system-dependency</artifactId><version>1.0.0</version><scope>system</scope><systemPath>${basedir}/lib/system-dependency.jar</systemPath>
</dependency>

此时,pom 中往往还有其他的依赖,是从远端的 maven 仓库下载。如果我们需要同时将本地 jar 和远端下载的 jar 同时注册到 classpath 中,我们可以这么配置插件。

一、配置maven-dependency-plugin

首先利用maven-dependency-plugin插件,将 runtime 和 system 的依赖都拷贝到指定路径,这里是选择的路径是target/lib:

            <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-dependency-plugin</artifactId><version>3.4.0</version><executions><execution><id>copy-runtime-dependency</id><phase>package</phase><goals><goal>copy-dependencies</goal></goals><configuration><excludeTransitive>false</excludeTransitive><outputDirectory>${project.build.directory}/lib</outputDirectory><includeScope>runtime</includeScope></configuration></execution><execution><id>copy-system-dependency</id><phase>package</phase><goals><goal>copy-dependencies</goal></goals><configuration><excludeTransitive>false</excludeTransitive><outputDirectory>${project.build.directory}/lib</outputDirectory><includeScope>system</includeScope></configuration></execution></executions></plugin>

二、配置maven-jar-plugin

然后利用maven-jar-plugin插件将这些所有依赖的 jar 都注册到 classpath中,如下所示:

            <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-jar-plugin</artifactId><version>3.3.0</version><configuration><archive><manifest><addClasspath>true</addClasspath><classpathPrefix>lib/</classpathPrefix><mainClass>com.xx.YourMain</mainClass></manifest><manifestEntries><Class-Path>lib/system-dependency.jar</Class-Path></manifestEntries></archive></configuration></plugin>

这里的lib/system-dependency.jar对应的就是我们通过maven-dependency-plugin插件拷贝之后的新 jar,而不是最初的 systemPath 路径。

三、编译 & 执行

最终通过mvn clean package命令编译之后,就可以在我们自己的 jar的MANIFEST.MF文件中查看,所有的 jar 都被写到classpath,包括本地 jar。然后我们就可以通过 java -jar xxx.jar直接执行我们自己的程序。

http://www.hkea.cn/news/998351/

相关文章:

  • 建设一个网站需要用到几个语言seo搜索引擎优化试题
  • 云南省住房与城乡建设厅网站关键词排名零芯互联排名
  • 山东坤泰建设集团网站手机百度搜索app
  • wordpress php推送示例seozou是什么意思
  • 做网站多久天津seo网站管理
  • 建设局查询网站网络上市场推广
  • 怎么做装修网站b2b多平台一键发布
  • ASP做网站源代码大专网络营销专业好不好
  • 网络公司网站 优帮云做网站排名服务热线
  • 制作网页设计软件列表案例谷歌seo 优化
  • wordpress网站备案上海搜索推广
  • 网站建设套餐有哪些安卓在线视频嗅探app
  • 做电影网站要买什么重庆seo网站哪家好
  • 广州北京网站建设公司网站外部优化的4大重点
  • 网站建设书优化大师是干什么的
  • 优秀的网站建设公司百度指数人群画像
  • wordpress企业中文模板太原seo哪家好
  • 广东网广东网站建设网站推广方案模板
  • 网站运营知识快手seo
  • 咖啡公司网站建设策划书微信营销方式
  • 柳江区城乡住房建设局网站上海seo优化服务公司
  • 西城企业网站建设企业网站怎么优化
  • 初学者做动态网站项目例子游戏特效培训机构排名
  • 汽车类网站搭建直链平台
  • 做网站遇到的困难总结网络营销软件代理
  • 做网站登录论坛外链代发
  • 东营专业网站建设公司排行青岛谷歌优化公司
  • 公众号和网站先做哪个口碑营销的形式
  • 长沙企业建网站费用关键词搜索推广排行榜
  • 怎么做网站端口代理沧州网络推广外包公司