Question

What I want is to build the 1.1 release version of my project directly from svn. The current version number is 1.2-SNAPSHOT.
Is there any way to do that? I assume there is but I don't know the command. If you need more information, please let me know I will provide it to you.
Thanks,
V.

Was it helpful?

Solution

There is no such command to get source code to a temporary location + build it + clean up. You have to script it, for example:

#!/bin/bash -e

work=$TMPDIR/builder-$$

cleanup() {
    rm -fr "$work"
}

trap 'cleanup; exit 1' 1 2 3 15

mkdir -p $work
svn co url/to/release/1.1 $work/
(cd $work; mvn clean install)

cleanup
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top