分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
在Maven项目中使用本地JAR包有两种方法:
1. 使用system scope
<dependencies> <dependency> <groupId>org.richard</groupId> <artifactId>my-jar</artifactId> <version>1.0</version> <scope>system</scope> <systemPath>${project.basedir}/lib/my-jar.jar</systemPath> </dependency> </dependencies>
system scope引入的包,在使用jar-with-dependencies打包时将不会被包含,可以使用resources将本地包打进jar-with-dependencies
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <finalName>xxx-jar-with-dependencies</finalName> </configuration> </execution> </executions> </plugin> </plugins> <resources> <resource> <targetPath>lib/</targetPath> <directory>lib/</directory> <includes> <include>**/my-jar.jar</include> </includes> </resource> </resources> </build>
生成的xxx-jar-with-dependencies.jar中,将会包含lib目录以及my-jar.jar,并且能够被在执行的时候被找到。
有的时候这种方法会实效,比如JDBCDriver在声明的时候Class.forName("xxx.Driver")就会说找不到类,用下面两种方法就可以。
2. 将jar包安装到本地repository中
mvn install:install-file -Dfile=my-jar.jar -DgroupId=org.richard -DartifactId=my-jar -Dversion=1.0 -Dpackaging=jar
3. 添加 in project repository,在新机器上执行时就不用运行mvn install:install-file命令了
<repository> <id>in-project</id> <name>In Project Repo</name> <url>file://${project.basedir}/lib</url></repository><dependency> <groupId>org.richard</groupId> <artifactId>my-jar</artifactId> <version>1.0</version></dependency>
你的jar包及路径必须严格遵循格式:
/groupId/artifactId/version/artifactId-verion.jar
本例中: lib/org/richard/my-jar/1.0/my-jar-1.0.jar
给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow
![这里写图片描述](https://i-blog.csdnimg.cn/blog_migrate/2e19ffb3303a490d20ea5d00dd397156.gif)
新的改变
我们对Markdown编辑器进行了一些功能拓展与语法支持,除了标准的Markdown编辑器功能,我们增加了如下几点新功能,帮助你用它写博客:
- 全新的界面设计 ,将会带来全新的写作体验;
- 在创作中心设置你喜爱的代码高亮样式,Markdown 将代码片显示选择的高亮样式 进行展示;
- 增加了 图片拖拽 功能,你可以将本地的图片直接拖拽到编辑区域直接展示;
- 全新的 KaTeX数学公式 语法;
- 增加了支持甘特图的mermaid语法