fixed:构建子插件,META-INF文件位置错误

This commit is contained in:
uidoer 2025-03-25 16:48:49 +08:00
parent 21a3c74f00
commit a151fb4306
2 changed files with 3 additions and 11 deletions

10
pom.xml
View File

@ -192,15 +192,7 @@
</dependencies>
</dependencyManagement>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.noear</groupId>
<artifactId>solon-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>

View File

@ -72,7 +72,7 @@ public class SysPlugsServiceImpl extends ServiceImpl<SysPlugsMapper, SysPlugsEnt
}
}
List<String> solonMetas = nameList.stream().filter( n ->
n.startsWith("BOOT-INF/classes/META-INF/solon/")
n.startsWith("META-INF/solon/")
&& n.endsWith(".properties")).collect(Collectors.toList());
Assert.isTrue(ObjectUtil.isNotEmpty(solonMetas), ()-> new BusinessException("jar文件不是solon插件缺少插件元文件META-INF/solon/*.properties"));
String anyOneMeta = solonMetas.get(0);
@ -98,7 +98,7 @@ public class SysPlugsServiceImpl extends ServiceImpl<SysPlugsMapper, SysPlugsEnt
String P_DOC_URL = "plugin.docUrl";
List<String> pluginInfoPropNames = nameList.stream().filter( n ->
n.equals("BOOT-INF/classes/"+PLUGIN_INFO_PATH)
n.equals(PLUGIN_INFO_PATH)
).collect(Collectors.toList());
Assert.isTrue(ObjectUtil.isNotEmpty(pluginInfoPropNames) , ()-> new BusinessException("插件缺少描述文件: "+PLUGIN_INFO_PATH));
String pInfoOne = pluginInfoPropNames.get(0);