MAVEN打包時引入外部連結的包
阿新 • • 發佈:2019-07-18
1.專案引入了ORACLE的jar包,MAVEN配置如下
2.打jar包的時候需要指定下main如何函式mainClass
<dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>11.2.0.1.0</version> <scope>system</scope> <systemPath>${pom.basedir}/lib/ojdbc6.jar</systemPath> </dependency> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <includeSystemScope>true</includeSystemScope> <mainClass>com.task.PingPangTaskApplication</mainClass> </configuration> </plugin> </plugins> </build>
3.POM報錯可以把錯誤位置移動到最左邊然後用tab鍵調整格式
pom.xml mvn package expected START_TAG or END_T