clean up the Makefile to make it more robust
.PHONY: all
.DEFAULT_GOAL := all
-CURRENT = $(shell mvn -f ../pom.xml org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v INFO)
-DRIVER = $(shell mvn -f ../pom.xml org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=driver.version | grep -v INFO \
+POM = ../../pom.xml
+CURRENT = $(shell mvn -f $(POM) help:evaluate -Dexpression=project.version 2>&1 | grep -v INFO)
+DRIVER = $(shell mvn -f $(POM) help:evaluate -Dexpression=driver.version 2>&1 | grep -v INFO \
| sed -e 's/-SNAPSHOT//' -e 's/.[0-9]*$$//')
MAJOR = $(shell echo ${CURRENT} | sed -e 's/-SNAPSHOT//' -e 's/.[0-9]*$$//')
@@ -13,7 +14,7 @@ $(JAVADOC)/index.html: $(shell find $(CORE)/src/main/java -name *.java)
mvn -f ../../morphia javadoc:javadoc
public/index.html: $(shell find . | grep -v public)
- sed -e "s/currentVersion.*/currentVersion = \"$(CURRENT)\"/" \
+ @sed -e "s/currentVersion.*/currentVersion = \"$(CURRENT)\"/" \
-e "s/majorVersion.*/majorVersion = \"$(MAJOR)\"/" \
-e "s|coreApiUrl.*|coreApiUrl = \"http://mongodb.github.io/mongo-java-driver/$(DRIVER)/javadoc/\"|" \
data/morphia.toml > data/morphia.toml.sed
