Cleanup Maven build by using common plugin management

Most of our build will want to assume the same version of each
plugin across all components, just like do with our dependencies.

Also, start populating some data into the manifest of each created
JAR file, to better document where the JAR came from.

Change-Id: I38c62949dfb0e14603a31e9045e4ab5f7ca1424b
Signed-off-by: Shawn O. Pearce <sop@google.com>
diff --git a/gerrit-gwtui/pom.xml b/gerrit-gwtui/pom.xml
index a2c5f33..b34e3d7 100644
--- a/gerrit-gwtui/pom.xml
+++ b/gerrit-gwtui/pom.xml
@@ -159,7 +159,6 @@
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>gwt-maven-plugin</artifactId>
-        <version>1.2</version>
         <configuration>
           <module>com.google.gerrit.GerritGwtUI</module>
           <extraJvmArgs>-Xmx512m</extraJvmArgs>
diff --git a/gerrit-main/pom.xml b/gerrit-main/pom.xml
index db9e1c0..2826a22 100644
--- a/gerrit-main/pom.xml
+++ b/gerrit-main/pom.xml
@@ -44,7 +44,6 @@
     <plugins>
       <plugin>
         <artifactId>maven-compiler-plugin</artifactId>
-        <version>2.0.2</version>
         <configuration>
           <source>1.2</source>
           <target>1.2</target>
@@ -55,7 +54,6 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-shade-plugin</artifactId>
-        <version>1.2</version>
         <executions>
           <execution>
             <phase>package</phase>
diff --git a/gerrit-server/pom.xml b/gerrit-server/pom.xml
index 08e5c8c..9cc94f8 100644
--- a/gerrit-server/pom.xml
+++ b/gerrit-server/pom.xml
@@ -130,7 +130,6 @@
       <plugin>
         <groupId>org.antlr</groupId>
         <artifactId>antlr3-maven-plugin</artifactId>
-        <version>3.1.1</version>
         <executions>
           <execution>
             <goals>
diff --git a/pom.xml b/pom.xml
index 97af8d5..99a4454 100644
--- a/pom.xml
+++ b/pom.xml
@@ -296,10 +296,76 @@
   </licenses>
 
   <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jar-plugin</artifactId>
+          <configuration>
+            <archive>
+              <manifestEntries>
+                <Implementation-Title>Gerrit Code Review - ${project.artifactId}</Implementation-Title>
+                <Implementation-Version>${project.version}</Implementation-Version>
+                <Implementation-Vendor>Gerrit Code Review</Implementation-Vendor>
+                <Implementation-Vendor-Id>com.google.gerrit</Implementation-Vendor-Id>
+                <Implementation-Vendor-URL>http://code.google.com/p/gerrit/</Implementation-Vendor-URL>
+              </manifestEntries>
+            </archive>
+          </configuration>
+        </plugin>
+
+        <plugin>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>2.0.2</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-shade-plugin</artifactId>
+          <version>1.2</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-antrun-plugin</artifactId>
+          <version>1.3</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-war-plugin</artifactId>
+          <version>2.1-beta-1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-dependency-plugin</artifactId>
+          <version>2.1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.antlr</groupId>
+          <artifactId>antlr3-maven-plugin</artifactId>
+          <version>3.1.1</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>gwt-maven-plugin</artifactId>
+          <version>1.2</version>
+        </plugin>
+
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>build-helper-maven-plugin</artifactId>
+          <version>1.3</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+
     <plugins>
       <plugin>
         <artifactId>maven-compiler-plugin</artifactId>
-        <version>2.0.2</version>
         <configuration>
           <source>1.6</source>
           <target>1.6</target>
@@ -581,9 +647,9 @@
       </dependency>
 
       <dependency>
-          <groupId>postgresql</groupId>
-          <artifactId>postgresql</artifactId>
-          <version>8.4-701.jdbc4</version>
+        <groupId>postgresql</groupId>
+        <artifactId>postgresql</artifactId>
+        <version>8.4-701.jdbc4</version>
       </dependency>
 
       <dependency>