added new sub library projects
[jprojects-scripts.git] / .jprojects.sh
1 #!/bin/bash
2
3 # Tools repository (this)
4 THIS="jprojects-scripts"
5
6 # Libraries and EJBs
7 LIBRARIES="jcore jcoreee \
8         jcore-logger-lib jcore-logger-ejb \
9         jcountry-core jcountry-lib \
10         jphone-core jphone-lib \
11         jcontacts-core jcontacts-business-core jcontacts-lib \
12         juser-core juser-lib \
13         juser-activity-core juser-activity-lib \
14         jletter-core jletter-lib \
15         jaddressbook-core jaddressbook-lib \
16         jaddressbook-share-core jaddressbook-share-lib \
17         jmailer-ee \
18         jcore-swing \
19         jcustomer-core jcustomer-lib \
20         jproduct-core jproduct-lib \
21         jshop-core jshop-ee-lib \
22         jshop-receipt-lib"
23
24 # Applications and their special libs/EJBs
25 APPLICATIONS="pizzaservice-core pizzaservice-lib pizzaservice-mailer pizzaservice-ejb pizzaservice-swing \
26         jjobs-core jjobs-lib jjobs-mailer jjobs-ejb jjobs-war jjobs \
27         jfinancials-core jfinancials-lib jfinancials-mailer jfinancials-ejb jfinancials-war jfinancials
28         addressbook-core addressbook-lib addressbook-mailer addressbook-ejb addressbook-war addressbook addressbook-uml"
29
30 # Company-specific projects
31 COMPANY_APPS="jrecruiter-core jrecruiter-lib jrecruiter-mailer jrecruiter-ejb jrecruiter-war jrecruiter"
32
33 # Broken (needs fixing)
34 BROKEN="addressbook-swing jfinancials-swing pizzaservice-war pizzaservice"
35
36 # Compile list
37 ALL_PROJECTS="${THIS} ${LIBRARIES} ${APPLICATIONS} ${COMPANY_APPS} ${BROKEN}"
38
39 # Own home directory
40 declare -r JPROJECTS_HOME="${PWD}"
41
42 # ant binary
43 ANT_BIN=$(which ant 2>/dev/null)
44
45 # Check binary
46 if [ -z "${ANT_BIN}" ]
47 then
48         echo "$0: Cannot find ANT binary."
49         exit 1
50 fi
51
52 # Test on .git availability"
53 LIST=""
54 for project in ${ALL_PROJECTS}; do
55         if [ ! -d "${project}" ]
56         then
57                 echo "$0: Project '${project}' not created."
58         elif [ ! -f "${project}/.git/config" ]
59         then
60                 echo "$0: Project '${project}' is no GIT project."
61                 exit 1
62         fi
63
64         # Add it as available
65         LIST="${LIST} ${project}"
66 done