added new project jshop-receipt-core which currently only holds the factory
[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-lib \
12         jcontacts-business-core jcontacts-business-lib \
13         juser-core juser-lib \
14         juser-login-core juser-login-lib \
15         juser-activity-core juser-activity-lib \
16         jletter-core jletter-lib \
17         jaddressbook-core jaddressbook-lib \
18         jaddressbook-share-core jaddressbook-share-lib \
19         jmailer-ee \
20         jcore-swing \
21         jcustomer-core jcustomer-lib \
22         jproduct-core jproduct-lib \
23         jshop-core jshop-ee-lib \
24         jshop-receipt-core jshop-receipt-lib"
25
26 # Base application names (all)
27 BASE_APPLICATION_NAMES="addressbook jfinancials jjobs jtrainings pizzaservice"
28
29 # Applications and their special libs/EJBs
30 APPLICATIONS="pizzaservice-core pizzaservice-lib pizzaservice-mailer-ejb pizzaservice-mailer-lib pizzaservice-ejb pizzaservice-swing \
31         jjobs-core jjobs-lib jjobs-mailer-ejb jjobs-mailer-lib jjobs-ejb jjobs-war jjobs \
32         jfinancials-core jfinancials-lib jfinancials-mailer-ejb jfinancials-mailer-lib jfinancials-ejb jfinancials-war jfinancials
33         addressbook-core addressbook-lib addressbook-mailer-ejb addressbook-mailer-lib addressbook-ejb addressbook-war addressbook addressbook-uml"
34
35 # Company-specific projects
36 COMPANY_APPS="jtrainings-core jtrainings-lib jtrainings-mailer-ejb jtrainings-mailer-lib jtrainings-ejb jtrainings-war jtrainings"
37
38 # Broken (needs fixing)
39 BROKEN="addressbook-swing jfinancials-swing jtrainings-swing pizzaservice-war pizzaservice"
40
41 # Compile list
42 ALL_PROJECTS="${THIS} ${LIBRARIES} ${APPLICATIONS} ${COMPANY_APPS} ${BROKEN}"
43
44 # Own home directory
45 declare -r JPROJECTS_HOME="${PWD}"
46
47 # ant binary
48 ANT_BIN=$(which ant 2>/dev/null)
49
50 # Check binary
51 if [ -z "${ANT_BIN}" ]
52 then
53         echo "$0: Cannot find ANT binary."
54         exit 1
55 fi
56
57 # Test on .git availability"
58 LIST=""
59 for project in ${ALL_PROJECTS}; do
60         if [ ! -d "${project}" ]
61         then
62                 echo "$0: Project '${project}' not created."
63         elif [ ! -f "${project}/.git/config" ]
64         then
65                 echo "$0: Project '${project}' is no GIT project."
66                 exit 1
67         fi
68
69         # Add it as available
70         LIST="${LIST} ${project}"
71 done