9月21日,源创会西安,聊聊大模型技术与产业应用
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <build> <resources> <resource> <directory>src</directory> <excludes> <exclude>**/*.java</exclude> </excludes> </resource> </resources> </build> </project>
gradle项目是 在 build.gradle 添加
sourceSets.main.resources.srcDirs = ["src/main/java","src/main/resources"] bootJar.enabled = false jar { enabled(true) from('src/main/java'){ include '**/*.xml' } }
你应该把xml等资源文件移到src/main/resources下对应的package中。
以上说的不是非常严格,但就是这回事情。
< directory > src/main/java </ directory >
< includes >
< include > **/*.xml </ include >
</ includes >
<filtering>false</filtering>
</ resource >
sourceSets.main.resources.srcDirs = ["src/main/java","src/main/resources"] bootJar.enabled = false jar { enabled(true) from('src/main/java'){ include '**/*.xml' } }