added jtrainings
[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-lib"
25
26 # Base application names (all)
27 BASE_APPLICATION_NAMES="addressbook jfinancials jjobs jrecruiter 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="jrecruiter-core jrecruiter-lib jrecruiter-mailer-ejb jrecruiter-mailer-lib jrecruiter-ejb jrecruiter-war jrecruiter
37         jtrainings-core jtrainings-lib jtrainings-mailer-ejb jtrainings-mailer-lib jtrainings-ejb jtrainings-war jtrainings"
38
39 # Broken (needs fixing)
40 BROKEN="addressbook-swing jfinancials-swing jtrainings-swing pizzaservice-war pizzaservice"
41
42 # Compile list
43 ALL_PROJECTS="${THIS} ${LIBRARIES} ${APPLICATIONS} ${COMPANY_APPS} ${BROKEN}"
44
45 # Own home directory
46 declare -r JPROJECTS_HOME="${PWD}"
47
48 # ant binary
49 ANT_BIN=$(which ant 2>/dev/null)
50
51 # Check binary
52 if [ -z "${ANT_BIN}" ]
53 then
54         echo "$0: Cannot find ANT binary."
55         exit 1
56 fi
57
58 # Test on .git availability"
59 LIST=""
60 for project in ${ALL_PROJECTS}; do
61         if [ ! -d "${project}" ]
62         then
63                 echo "$0: Project '${project}' not created."
64         elif [ ! -f "${project}/.git/config" ]
65         then
66                 echo "$0: Project '${project}' is no GIT project."
67                 exit 1
68         fi
69
70         # Add it as available
71         LIST="${LIST} ${project}"
72 done