OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Compare Revisions

Ignore whitespace Rev 115 → Rev 116

/trunk/Tools/.classpath
New file
0,0 → 1,7
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/OpenConcerto"/>
<classpathentry kind="output" path="bin"/>
</classpath>
/trunk/Tools/.project
New file
0,0 → 1,17
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Tools</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
/trunk/Tools/src/org/openconcerto/tools/AllModulesPackager.java
New file
0,0 → 1,54
package org.openconcerto.tools;
 
import java.io.File;
import java.io.IOException;
 
import org.openconcerto.erp.modules.ModulePackager;
 
public class AllModulesPackager {
/**
* Tool to package all the modules
*/
private File dir;
 
public AllModulesPackager(File dir) {
this.dir = dir;
}
 
public static void main(String[] args) throws IOException {
AllModulesPackager p = new AllModulesPackager(new File("../"));
p.packageTo(new File("Modules"));
}
 
private void packageTo(File outputDir) throws IOException {
outputDir.mkdirs();
File[] dirs = this.dir.listFiles();
for (int i = 0; i < dirs.length; i++) {
File projectDir = dirs[i];
String name = projectDir.getName();
if (!projectDir.isDirectory() || name.equals("OpenConcerto") || name.equals("Tools")
|| name.startsWith(".")) {
continue;
}
 
File propsFile = new File(projectDir, "module.properties");
if (propsFile.exists()) {
System.out.println("AllModulesPackager.packageTo() packaging module : " + name);
try {
final ModulePackager modulePackager = new ModulePackager(propsFile, new File(projectDir, "bin"));
modulePackager.setSkipDuplicateFiles(true);
File libDir = new File(projectDir, "lib");
if (libDir.exists())
modulePackager.addJarsFromDir(libDir);
modulePackager.writeToDir(outputDir);
} catch (Exception e) {
e.printStackTrace();
System.err.println("AllModulesPackager.packageTo() packaging module : " + name + " failed");
}
} else {
System.out.println("AllModulesPackager.packageTo() skipping " + name + " no module.properties");
}
}
}
 
}
/trunk/Tools/.
Property changes:
Added: svn:ignore
+Modules