In versions prior to 2.5, the replication feature was packaged with the main war file. No longer is this the case. Now, if you want Gerrit to replicate your changes upstream to other repositories, you'll need to add the replication plugin using the command line tool `plugin add`. Sadly, I could not find the replication jar hosted anywhere and it appears that you need to build it by hand.
I ran into some confusion  with this end to end process and didn't find a sufficiently succinct answer online, so I'm writing up my own =) Here are the steps that lead me to successfully building the replication jar and installing it.
- git clone --recursive https://gerrit.googlesource.com/gerrit
- You need the --recursive here because the plugins are actually git submodules and won't otherwise be cloned along with your repo.
- If you're already cloned, you can run `git submodule init; git submodule update`
- It's not necessary to skip the tests or generating Java Doc, but it will greatly improve your compile time and decrease the amount of memory maven uses
- This creates the jar that will be necessary for the replication plugin to get built
I hope this helps out anyone who was struggling with the same issues as I!
Our Gerrit Code Review server runs inside an environment with no outside internet access. When upgrading Gerrit, the service assumes that it has internet access and tries to download any jars that are not packaged into its bundle. In my upgrade situation, it tried to download mysql-connector-java-5.1.21.jar from http://repo2.maven.org/maven2/. It obviously failed.
In order to resolve this issue, I downloaded it to a system that had external access and then scp-ed the jar to $review_site/lib and restarted the gerrit.war init upgrade process.
 -- Some errors I saw:
- Maven out of memory
- Child module gerrit/plugins/commit-message-length-validator/pom.xml of gerrit/pom.xml does not exist
- Child module gerrit/plugins/replication/pom.xml of gerrit/pom.xml does not exist
- Child module gerrit/plugins/reviewnotes/pom.xml of gerrit/pom.xml does not exist