Updated antlr3-maven-plugin & set Java 7 as an environment variable.

Change-Id: I31a0a90bb344805f48ab3ae473e0c07cca044474
diff --git a/README.md b/README.md
index ded5e67..b0d64ff 100644
--- a/README.md
+++ b/README.md
@@ -86,13 +86,11 @@
 
 ## Installation
 
-Koral requires Java 1.7 particularly to compile
-Cosmas2 ANTLR grammars. In pom.xml, specify the javac location of your Java 1.7
-in the ```<java1.7>``` property. By default it set to ```/usr/local/java/jdk1.7.0_79```.
+Koral requires Java 1.7 particularly to compile Cosmas2 ANTLR grammars. 
+Set an environment variable JAVA7_HOME to the location of Java 1.7 in your system. 
 
-	<properties>
-		<java1.7>/usr/local/java/jdk1.7.0_79</java1.7>
-	</properties>
+	set JAVA7_HOME="/usr/local/java/jdk1.7.0_79"
+	
 
 Installation is straightforward (Maven3 required):
 
diff --git a/pom.xml b/pom.xml
index 80804d9..e63d6c9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -37,7 +37,6 @@
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>		
 		<jackson.version>2.9.1</jackson.version>
-		<java1.7>/usr/local/java/jdk1.7.0_79</java1.7>
 	</properties>
 	
 	<repositories>
@@ -181,9 +180,9 @@
 				<artifactId>maven-compiler-plugin</artifactId>
 				<version>3.3</version>
 				<configuration>
-					<verbose>true</verbose>
-		          	<fork>true</fork>
-		         	<executable>${java1.7}/bin/javac</executable>
+					<!-- <verbose>true</verbose>
+		          	<fork>true</fork> -->
+		         	<executable>${env.JAVA7_HOME}/bin/javac</executable>
 					<compilerVersion>1.7</compilerVersion>
 					<source>1.7</source>
 					<target>1.7</target>
@@ -292,7 +291,7 @@
 							<outputDirectory>${basedir}/src/main/java/de/ids_mannheim/korap/query/parse/poliqarpplus</outputDirectory>
 							<libDirectory>${basedir}/src/main/antlr/poliqarpplus</libDirectory>
 						</configuration>
-						<phase>generate-sources</phase>
+						<!-- <phase>generate-sources</phase> -->
 					</execution>
 					<execution>
 						<id>annis</id>
@@ -304,7 +303,7 @@
 							<outputDirectory>${basedir}/src/main/java/de/ids_mannheim/korap/query/parse/annis</outputDirectory>
 							<libDirectory>${basedir}/src/main/antlr/annis</libDirectory>
 						</configuration>
-						<phase>generate-sources</phase>
+						<!-- <phase>generate-sources</phase> -->
 					</execution>
 					<execution>
 						<id>collection</id>
@@ -316,7 +315,7 @@
 							<outputDirectory>${basedir}/src/main/java/de/ids_mannheim/korap/query/parse/collection</outputDirectory>
 							<libDirectory>${basedir}/src/main/antlr/collection</libDirectory>
 						</configuration>
-						<phase>generate-sources</phase>
+						<!-- <phase>generate-sources</phase> -->
 					</execution>
 				</executions>
 			</plugin>
@@ -325,7 +324,7 @@
 					recipe is based on http://stackoverflow.com/questions/15310628/ customize-maven-to-automatically-create-antlr4-grammar-java-files-on-build -->
 				<groupId>org.antlr</groupId>
 				<artifactId>antlr3-maven-plugin</artifactId>
-				<version>3.5.1</version>
+				<version>3.5.2</version>
 				<configuration>
 					<sourceDirectory>${basedir}/src/main/antlr/cosmas</sourceDirectory>
 					<outputDirectory>${basedir}/src/main/java/de/ids_mannheim/korap/query/parse/cosmas</outputDirectory>
@@ -336,7 +335,7 @@
 						<goals>
 							<goal>antlr</goal>
 						</goals>
-						<phase>generate-sources</phase>
+						<!-- <phase>generate-sources</phase> -->
 					</execution>
 				</executions>
 			</plugin>