Improved JavaCodeBundle>>standardPackageBundleFor: to support layout with separated tests...
authorJan Vrany <jan.vrany@fit.cvut.cz>
Wed, 16 Apr 2014 08:59:01 +0200
changeset 3134 e35f2fac0337
parent 3133 7cb0df30d317
child 3151 ee329fef15db
Improved JavaCodeBundle>>standardPackageBundleFor: to support layout with separated tests... ...sources in src-tests and .class files in bin-tests.
JavaCodeBundle.st
--- a/JavaCodeBundle.st	Mon Apr 14 14:38:32 2014 +0200
+++ b/JavaCodeBundle.st	Wed Apr 16 08:59:01 2014 +0200
@@ -82,8 +82,10 @@
      package has standard layout, i.e.,
 
      <package-dir>/java
-        bin ..................... compiler .class files
+        bin ..................... compiled .class files
+        bin-tests ............... compiler .class files for JUnit tests
         src ..................... java sources
+        src-tests ............... java sources for JUnit tests
         libs .................... required .jar files
         libs-src ................ (optional) sources code for .jars
     "
@@ -96,13 +98,24 @@
     (javadir isDirectory not or:[javadir isReadable not]) ifTrue:[ ^ nil ].
     bundle := JavaCodeBundle new name: pkg package.
     (p := javadir / 'bin') isDirectory ifTrue:[
-        lib := JavaCodeLibrary new name: 'java'.
+        lib := JavaCodeLibrary new name: 'Java Code'.
         lib classes: p pathName.
         (p := javadir /'src') isDirectory ifTrue:[
             lib sources: p pathName
         ].
         bundle add: lib.
     ].
+
+    (p := javadir / 'bin-tests') isDirectory ifTrue:[
+        lib := JavaCodeLibrary new name: 'JUnit Tests'.
+        lib classes: p pathName.
+        (p := javadir /'src-tests') isDirectory ifTrue:[
+            lib sources: p pathName
+        ].
+        bundle add: lib.
+    ].
+
+
     libs := javadir / 'libs'.
     libssrc := javadir / 'libs-src'.
     libs isDirectory ifTrue:[
@@ -139,7 +152,7 @@
     "
 
     "Created: / 15-01-2013 / 17:05:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 02-09-2013 / 00:16:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 16-04-2014 / 00:17:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaCodeBundle class methodsFor:'others'!