directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ersi...@apache.org
Subject svn commit: r375691 - in /directory/trunks/sh-scripts: modules.sh pomutils/ pomutils/artifactId.sh pomutils/description.sh pomutils/distSiteUrl.sh pomutils/groupId.sh pomutils/modules.sh pomutils/name.sh
Date Tue, 07 Feb 2006 20:42:14 GMT
Author: ersiner
Date: Tue Feb  7 12:42:11 2006
New Revision: 375691

URL: http://svn.apache.org/viewcvs?rev=375691&view=rev
Log:
Added some simple scripts to query project poms.

Added:
    directory/trunks/sh-scripts/pomutils/
    directory/trunks/sh-scripts/pomutils/artifactId.sh   (with props)
    directory/trunks/sh-scripts/pomutils/description.sh   (with props)
    directory/trunks/sh-scripts/pomutils/distSiteUrl.sh   (with props)
    directory/trunks/sh-scripts/pomutils/groupId.sh   (with props)
    directory/trunks/sh-scripts/pomutils/modules.sh   (with props)
    directory/trunks/sh-scripts/pomutils/name.sh   (with props)
Removed:
    directory/trunks/sh-scripts/modules.sh

Added: directory/trunks/sh-scripts/pomutils/artifactId.sh
URL: http://svn.apache.org/viewcvs/directory/trunks/sh-scripts/pomutils/artifactId.sh?rev=375691&view=auto
==============================================================================
--- directory/trunks/sh-scripts/pomutils/artifactId.sh (added)
+++ directory/trunks/sh-scripts/pomutils/artifactId.sh Tue Feb  7 12:42:11 2006
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# This script prints the artifactId of a project looking
+# at the pom whose name given as a parameter.
+
+if [ $# -ne 1 ]
+then
+	echo -e "Error!\tUsage: artifactId.sh <pom_xml_file>"
+	exit 1
+fi
+
+xmlstarlet sel -t -m "/project/artifactId" -v "text()" -n $1 | grep -v '^[ tab]*$'

Propchange: directory/trunks/sh-scripts/pomutils/artifactId.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: directory/trunks/sh-scripts/pomutils/description.sh
URL: http://svn.apache.org/viewcvs/directory/trunks/sh-scripts/pomutils/description.sh?rev=375691&view=auto
==============================================================================
--- directory/trunks/sh-scripts/pomutils/description.sh (added)
+++ directory/trunks/sh-scripts/pomutils/description.sh Tue Feb  7 12:42:11 2006
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# This script prints the description of a project looking
+# at the pom whose name given as a parameter.
+
+if [ $# -ne 1 ]
+then
+	echo -e "Error!\tUsage: description.sh <pom_xml_file>"
+	exit 1
+fi
+
+xmlstarlet sel -t -m "/project/description" -v "text()" -n $1 | grep -v '^[ tab]*$' | tr
-s ' ' | sed 's/^ //g'

Propchange: directory/trunks/sh-scripts/pomutils/description.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: directory/trunks/sh-scripts/pomutils/distSiteUrl.sh
URL: http://svn.apache.org/viewcvs/directory/trunks/sh-scripts/pomutils/distSiteUrl.sh?rev=375691&view=auto
==============================================================================
--- directory/trunks/sh-scripts/pomutils/distSiteUrl.sh (added)
+++ directory/trunks/sh-scripts/pomutils/distSiteUrl.sh Tue Feb  7 12:42:11 2006
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# This script prints the distribution site url of a project
+# looking at the pom whose name given as a parameter.
+
+if [ $# -ne 1 ]
+then
+	echo -e "Error!\tUsage: distSiteUrl.sh <pom_xml_file>"
+	exit 1
+fi
+
+xmlstarlet sel -t -m "/project/distributionManagement/site/url" -v "text()" -n $1 | grep
-v '^[ tab]*$'

Propchange: directory/trunks/sh-scripts/pomutils/distSiteUrl.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: directory/trunks/sh-scripts/pomutils/groupId.sh
URL: http://svn.apache.org/viewcvs/directory/trunks/sh-scripts/pomutils/groupId.sh?rev=375691&view=auto
==============================================================================
--- directory/trunks/sh-scripts/pomutils/groupId.sh (added)
+++ directory/trunks/sh-scripts/pomutils/groupId.sh Tue Feb  7 12:42:11 2006
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# This script prints the groupId of a project looking
+# at the pom whose name given as a parameter.
+
+if [ $# -ne 1 ]
+then
+	echo -e "Error!\tUsage: groupId.sh <pom_xml_file>"
+	exit 1
+fi
+
+xmlstarlet sel -t -m "/project/groupId" -v "text()" -n $1 | grep -v '^[ tab]*$'

Propchange: directory/trunks/sh-scripts/pomutils/groupId.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: directory/trunks/sh-scripts/pomutils/modules.sh
URL: http://svn.apache.org/viewcvs/directory/trunks/sh-scripts/pomutils/modules.sh?rev=375691&view=auto
==============================================================================
--- directory/trunks/sh-scripts/pomutils/modules.sh (added)
+++ directory/trunks/sh-scripts/pomutils/modules.sh Tue Feb  7 12:42:11 2006
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# This script lists the modules of a project looking
+# at the pom whose name given as a parameter.
+
+if [ $# -ne 1 ]
+then
+	echo -e "Error!\tUsage: modules.sh <pom_xml_file>"
+	exit 1
+fi
+
+# xml_grep "/project/modules/module" $1  | grep '<module>.*</module>' | sed 's/.*>\(.*\)<.*/\1/g'
| sort
+
+xmlstarlet sel -t -m "//modules/module" -v "text()"  -n $1 | grep -v '^$' | sort -u

Propchange: directory/trunks/sh-scripts/pomutils/modules.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: directory/trunks/sh-scripts/pomutils/name.sh
URL: http://svn.apache.org/viewcvs/directory/trunks/sh-scripts/pomutils/name.sh?rev=375691&view=auto
==============================================================================
--- directory/trunks/sh-scripts/pomutils/name.sh (added)
+++ directory/trunks/sh-scripts/pomutils/name.sh Tue Feb  7 12:42:11 2006
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# This script prints the name of a project looking
+# at the pom whose name given as a parameter.
+
+if [ $# -ne 1 ]
+then
+	echo -e "Error!\tUsage: name.sh <pom_xml_file>"
+	exit 1
+fi
+
+xmlstarlet sel -t -m "/project/name" -v "text()" -n $1 | grep -v '^$'

Propchange: directory/trunks/sh-scripts/pomutils/name.sh
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message