You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2010/08/07 13:03:52 UTC
svn commit: r983208 - /maven/maven-3/trunk/apache-maven/src/bin/mvnyjp
Author: brett
Date: Sat Aug 7 11:03:52 2010
New Revision: 983208
URL: http://svn.apache.org/viewvc?rev=983208&view=rev
Log:
improve profiling script
Modified:
maven/maven-3/trunk/apache-maven/src/bin/mvnyjp
Modified: maven/maven-3/trunk/apache-maven/src/bin/mvnyjp
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/apache-maven/src/bin/mvnyjp?rev=983208&r1=983207&r2=983208&view=diff
==============================================================================
--- maven/maven-3/trunk/apache-maven/src/bin/mvnyjp (original)
+++ maven/maven-3/trunk/apache-maven/src/bin/mvnyjp Sat Aug 7 11:03:52 2010
@@ -33,10 +33,6 @@
# set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
# ----------------------------------------------------------------------------
-YJPLIB=/applications/YourKit.app/bin/mac/libyjpagent.jnilib
-
-MAVEN_OPTS=-agentpath:$YJPLIB=onexit=snapshot,onexit=memory,tracing,onlylocal
-
QUOTED_ARGS=""
while [ "$1" != "" ] ; do
@@ -69,6 +65,10 @@ case "`uname`" in
if [ -z "$JAVA_HOME" ] ; then
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
fi
+ if [ -z "$YJP_HOME" ]; then
+ YJP_HOME=/Applications/YourKit.app
+ fi
+ YJPLIB=$YJP_HOME/bin/mac/libyjpagent.jnilib
;;
esac
@@ -158,6 +158,13 @@ if $cygwin; then
HOME=`cygpath --path --windows "$HOME"`
fi
+if [ ! -f "$YJPLIB" ]; then
+ echo "Unable to autodetect the YJP library location. Please set YJPLIB variable"
+ exit 1
+fi
+
+MAVEN_OPTS="-agentpath:$YJPLIB=onexit=snapshot,onexit=memory,tracing,onlylocal $MAVEN_OPTS"
+
exec "$JAVACMD" \
$MAVEN_OPTS \
-classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \