Skip to content

Commit 3056119

Browse files
committed
更新脚本文件
1 parent bb4f295 commit 3056119

2 files changed

Lines changed: 38 additions & 6 deletions

File tree

src/test/java/com/xwintop/xJavaFxTool/javafx/PluginProgectBuildTool.java

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,20 @@
1414
*/
1515

1616
public class PluginProgectBuildTool {
17-
private String projectPath = "E:/ideaWorkspaces/xwintop/xJavaFxTool/src/main/";
17+
private String projectPath = "C:/IDEA/xwintop/xJavaFxTool/src/main/";
1818
// private String projectPath = "";
1919
private String resources = "resources/com/xwintop/xJavaFxTool/";
20-
// private String xmlPath = "assistTools/";
20+
// private String xmlPath = "assistTools/";
2121
// private String xmlPath = "codeTools/";
2222
// private String xmlPath = "debugTools/";
2323
// private String xmlPath = "developTools/";
24-
// private String xmlPath = "games/";
25-
private String xmlPath = "littleTools/";
26-
// private String xmlPath = "webTools/";
24+
// private String xmlPath = "epmsTools/";
25+
// private String xmlPath = "games/";
26+
// private String xmlPath = "littleTools/";
27+
private String xmlPath = "webTools/";
2728
private String srcPath = "java/com/xwintop/xJavaFxTool/";
2829

29-
private String pluginPath = "E:/ideaWorkspaces/xwintop/xJavaFxTool-plugin/";
30+
private String pluginPath = "C:/IDEA/xJavaFxTool-plugin/";
3031

3132
@Test
3233
public void buildJava() throws Exception {
@@ -65,6 +66,26 @@ public void buildJava() throws Exception {
6566
}
6667
}
6768

69+
@Test
70+
public void buildJson() throws Exception {
71+
File[] fxmlFileList = new File(projectPath + resources + "fxmlView/" + xmlPath).listFiles();
72+
for (File file : fxmlFileList) {
73+
if (file.isDirectory()) {
74+
continue;
75+
}
76+
String pluginProgectName = FilenameUtils.getBaseName(file.getName());
77+
String pluginProgectPath = pluginPath + xmlPath + "x-" + pluginProgectName;
78+
System.out.println(PluginProgectPomBuildTool.getPluginList_Json(pluginProgectName,xmlPath));
79+
// System.out.println("cd " + pluginProgectPath + "\n mvn package");
80+
File pluginLibsJarFile = new File(pluginProgectPath + "/target/x-" + pluginProgectName + "-0.0.1.jar");
81+
if (pluginLibsJarFile.exists()) {
82+
File pluginLibsFile = new File(pluginPath + "plugin-libs/" + xmlPath);
83+
FileUtils.copyFileToDirectory(pluginLibsJarFile, pluginLibsFile);
84+
}
85+
// break;
86+
}
87+
}
88+
6889
private void copyPluginFile(String path, String pluginProgectPath) {
6990
try {
7091
File fromFile = new File(projectPath + path);

src/test/java/com/xwintop/xJavaFxTool/javafx/PluginProgectPomBuildTool.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,17 @@ public static String getToolFxmlLoaderConfiguration_xml(String projectName, Stri
164164
"</root>";
165165
}
166166

167+
public static String getPluginList_Json(String projectName, String xmlPath){
168+
return "{\n" +
169+
" \"name\": \""+projectName+"\",\n" +
170+
" \"synopsis\": \"\",\n" +
171+
" \"jarName\": \"x-"+projectName+"\",\n" +
172+
" \"version\": \"0.0.1\",\n" +
173+
" \"versionNumber\": 1,\n" +
174+
" \"downloadUrl\": \"https://xwintop.gitee.io/xjavafxtool-plugin/plugin-libs/"+xmlPath+"x-"+projectName+"-0.0.1.jar\"\n" +
175+
" },";
176+
}
177+
167178
public static String getLocal_properties(String projectName) {
168179
return "# Dorian.properties是默认的\"Dorian\"资源束文件。 \n" +
169180
"# 作为中国人,我用自己的地区作为默认 \n" +

0 commit comments

Comments
 (0)