jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r25159 - /dev/jackrabbit/compare-dependencies.sh
Date Tue, 20 Feb 2018 10:33:23 GMT
Author: reschke
Date: Tue Feb 20 10:33:23 2018
New Revision: 25159

Log:
JCR-4265: Utility for dependency comparisons - initial version

Added:
    dev/jackrabbit/compare-dependencies.sh   (with props)

Added: dev/jackrabbit/compare-dependencies.sh
==============================================================================
--- dev/jackrabbit/compare-dependencies.sh (added)
+++ dev/jackrabbit/compare-dependencies.sh Tue Feb 20 10:33:23 2018
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+##
+##    Licensed to the Apache Software Foundation (ASF) under one or more
+##    contributor license agreements.  See the NOTICE file distributed with
+##    this work for additional information regarding copyright ownership.
+##    The ASF licenses this file to You under the Apache License, Version 2.0
+##    (the "License"); you may not use this file except in compliance with
+##    the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+##    Unless required by applicable law or agreed to in writing, software
+##    distributed under the License is distributed on an "AS IS" BASIS,
+##    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+##    See the License for the specific language governing permissions and
+##    limitations under the License.
+##
+
+COMPAREWITH=$1
+XMLLINT=xmllint
+USAGE="usage: $0 [groupId:artifactId:version]"
+EXTRACTXPATHJR="string(//*[namespace-uri()='http://maven.apache.org/POM/4.0.0' and local-name()='jackrabbit.version'])"
+GROUPARTIFACTJR=org.apache.jackrabbit:jackrabbit-standalone
+
+if [ -z "$1" ]; then
+  if ! type $XMLLINT >/dev/null 2>/dev/null; then
+    echo "$USAGE"
+    echo "(would try $XMLLINT to identify Jackrabbit version from Oak project)"
+    exit 2
+  elif [ -r oak-parent/pom.xml ]; then
+    JRVERSION=$($XMLLINT oak-parent/pom.xml --xpath "$EXTRACTXPATHJR")
+  elif [ -r ../oak-parent/pom.xml ]; then
+    JRVERSION=$($XMLLINT ../oak-parent/pom.xml --xpath "$EXTRACTXPATHJR")
+  fi
+fi
+
+if [ ! -z "$JRVERSION" ]; then
+  COMPAREWITH=$GROUPARTIFACTJR:$JRVERSION
+fi
+
+if [ -z "$COMPAREWITH" ]; then
+  echo "$USAGE"
+  exit 2
+fi
+
+echo "Comparing current project with $COMPAREWITH"
+echo "using:" mvn org.codehaus.mojo:versions-maven-plugin:2.5:compare-dependencies -DremotePom="$COMPAREWITH"
+mvn org.codehaus.mojo:versions-maven-plugin:2.5:compare-dependencies -DremotePom="$COMPAREWITH"
| fgrep -- "->" | fgrep "[INFO]" | sort| uniq
+

Propchange: dev/jackrabbit/compare-dependencies.sh
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message