alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Scala example source code file (mkinstrumented)

This example Scala source code file (mkinstrumented) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Scala tags/keywords

artifact, artifact, builddir, classdir, classdir, classdir=classes, jsources, scalac, scalalib, sources, sources, src_dir, topdir, topdir

The Scala mkinstrumented source code

#
# 
# Used to compile a jar with instrumented versions of certain classes.
# 




if [ $# -ne 1 ]
then
  echo "Must provide build dir ('target' or 'build')."
  exit 1
fi


BUILDDIR=$1
TOPDIR=../..
SCALAC=$TOPDIR/$BUILDDIR/pack/bin/scalac
SRC_DIR=library/
SCALALIB=$TOPDIR/$BUILDDIR/pack/lib/scala-library.jar
CLASSDIR=classes/
ARTIFACT=instrumented.jar


# compile it
rm -rf $CLASSDIR
mkdir $CLASSDIR
JSOURCES=`find $SRC_DIR -name "*.java" -print`
SOURCES=`find $SRC_DIR \( -name "*.scala" -o -name "*.java" \) -print`
echo $SOURCES
$SCALAC -d $CLASSDIR $SOURCES
javac -cp $SCALALIB -d $CLASSDIR $JSOURCES


# jar it up
rm $ARTIFACT
cd $CLASSDIR
jar cf $ARTIFACT .
mv $ARTIFACT ../
cd ..






Other Scala examples (source code examples)

Here is a short list of links related to this Scala mkinstrumented source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.