[java-parent-project COMMIT] in /trunk/bin: add-module.sh create-monolithic.sh create-multimodule.sh create-project-c...

noreply at shibboleth.net noreply at shibboleth.net
Fri Nov 25 17:00:43 GMT 2011


Author: lajoie
Date: Fri Nov 25 17:00:42 2011
New Revision: 31

URL: http://svn.shibboleth.net/view/java-parent-project?rev=31&view=rev
Log:
Add scripts for creating new projects and adding modules to multi-module projects

Added:
    trunk/bin/add-module.sh   (with props)
    trunk/bin/create-project-common.sh   (with props)
    trunk/bin/create-project-monolithic.sh   (contents, props changed)
      - copied, changed from r24, trunk/bin/create-monolithic.sh
    trunk/bin/create-project-multimodule.sh   (contents, props changed)
      - copied, changed from r24, trunk/bin/create-multimodule.sh
    trunk/bin/lock-version-monolithic.sh
      - copied unchanged from r24, trunk/bin/monolithic-lock-version.sh
    trunk/bin/lock-version-multimodule.sh   (props changed)
      - copied unchanged from r24, trunk/bin/multimodule-lock-version.sh
Removed:
    trunk/bin/create-monolithic.sh
    trunk/bin/create-multimodule.sh
    trunk/bin/monolithic-lock-version.sh
    trunk/bin/multimodule-lock-version.sh

Copied: trunk/bin/create-project-monolithic.sh (from r24, trunk/bin/create-monolithic.sh)
URL: http://svn.shibboleth.net/view/java-parent-project/trunk/bin/create-project-monolithic.sh?p2=trunk/bin/create-project-monolithic.sh&p1=trunk/bin/create-monolithic.sh&r1=24&r2=31&rev=31&view=diff
==============================================================================
--- trunk/bin/create-monolithic.sh (original)
+++ trunk/bin/create-project-monolithic.sh Fri Nov 25 17:00:42 2011
@@ -1,3 +1,53 @@
 #! /bin/bash
 
-# TODO
+LOCATION=$0
+LOCATION=${LOCATION%/*}
+
+source $LOCATION/create-project-common.sh
+
+$ECHO "This script will create a new monolothic project."
+$ECHO "Before you begin you must have already created an empty SVN repository that will recieve the project."
+$ECHO ""
+
+read -p "Please enter the SVN server URL, do not include the project name: " SVN_PROJ_URL
+if [ -z "$SVN_PROJ_URL" ] ; then
+    $ECHO "SVN repository URL can not be empty"
+    exit 1
+fi
+
+read -p "Please enter the maven group ID for the project: " MVN_GROUP_ID
+if [ -z "$MVN_GROUP_ID" ] ; then
+    $ECHO "Maven group ID can not be empty"
+    exit 1
+fi
+
+declare -r MVN_ARTF_ID=${SVN_PROJ_URL##*/}
+
+#read -p "Please enter the maven artifact ID for the project: " MVN_ARTF_ID
+#if [ -z "$MVN_ARTF_ID" ] ; then
+#    $ECHO "Maven artifact ID can not be empty"
+#    exit 1
+#fi
+
+# Check to make sure this command is going to write in to some existing directory
+declare -r SVN_PROJ_DIR="$TMPDIR/$MVN_ARTF_ID-project"
+check_path_not_exist $SVN_PROJ_DIR
+
+$ECHO "Creating project structure"
+create_svn_structure $SVN_PROJ_DIR
+declare -r PROJ_DIR="$SVN_PROJ_DIR/trunk"
+
+create_src $PROJ_DIR
+create_assembly $PROJ_DIR
+create_doc $PROJ_DIR
+create_eclipse_files $PROJ_DIR $MVN_ARTF_ID
+create_pom_file $PROJ_DIR $PARENT_PROJ_URL/resources/maven/pom.xml.tmpl $MVN_GROUP_ID $MVN_ARTF_ID 
+
+$ECHO "Importing project structure into SVN repository $SVN_PROJ_URL and checking out working copy to ./$MVN_ARTF_ID"
+import_checkout_svn_project $SVN_PROJ_DIR $SVN_PROJ_URL $MVN_ARTF_ID
+
+$ECHO "Setting SVN externals and ignore properties on ./$MVN_ARTF_ID"
+set_svn_properties_commit_and_update "$MVN_ARTF_ID"
+
+$ECHO "Creation of project $MVN_ARTF_ID completed.  Working copy is located at ./$MVN_ARTF_ID"
+exit 0

Copied: trunk/bin/create-project-multimodule.sh (from r24, trunk/bin/create-multimodule.sh)
URL: http://svn.shibboleth.net/view/java-parent-project/trunk/bin/create-project-multimodule.sh?p2=trunk/bin/create-project-multimodule.sh&p1=trunk/bin/create-multimodule.sh&r1=24&r2=31&rev=31&view=diff
==============================================================================
--- trunk/bin/create-multimodule.sh (original)
+++ trunk/bin/create-project-multimodule.sh Fri Nov 25 17:00:42 2011
@@ -1,3 +1,48 @@
 #! /bin/bash
 
-# TODO
+LOCATION=$0
+LOCATION=${LOCATION%/*}
+
+source $LOCATION/create-project-common.sh
+
+$ECHO "This script will create a new multi-module project and set up the parent module for the project."
+$ECHO "Before you begin you must have already created an empty SVN repository that will recieve the project."
+$ECHO ""
+
+read -p "Please enter the SVN server URL, do not include the project name: " SVN_PROJ_URL
+if [ -z "$SVN_PROJ_URL" ] ; then
+    $ECHO "SVN repository URL can not be empty"
+    exit 1
+fi
+
+read -p "Please enter the maven group ID for the project: " MVN_GROUP_ID
+if [ -z "$MVN_GROUP_ID" ] ; then
+    $ECHO "Maven group ID can not be empty"
+    exit 1
+fi
+
+declare -rf PROJ_ID=${SVN_PROJ_URL##*/}
+
+# Check to make sure this command is going to write in to some existing directory
+declare -r SVN_PROJ_DIR="$TMPDIR/$PROJ_ID-project"
+check_path_not_exist $SVN_PROJ_DIR
+
+$ECHO "Creating project structure"
+create_svn_structure $SVN_PROJ_DIR
+declare -r PROJ_DIR="$SVN_PROJ_DIR/trunk"
+
+declare -r PROJ_PARENT_DIR=$PROJ_DIR/$PROJ_ID-parent
+$MKDIR $PROJ_PARENT_DIR
+check_retval $? "Unable to create project parent module directory"
+

[... 12 lines stripped ...]


More information about the commits mailing list