<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bazel Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/bazel/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/bazel/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:07:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>How to compile and build Gerrit Plugins?</title>
		<link>https://www.scmgalaxy.com/tutorials/how-to-compile-and-build-gerrit-plugins/</link>
					<comments>https://www.scmgalaxy.com/tutorials/how-to-compile-and-build-gerrit-plugins/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Sun, 19 Aug 2018 20:09:20 +0000</pubDate>
				<category><![CDATA[Gerrit]]></category>
		<category><![CDATA[Bazel]]></category>
		<category><![CDATA[Build]]></category>
		<category><![CDATA[Compile]]></category>
		<category><![CDATA[Plugins]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=5171</guid>

					<description><![CDATA[<p>To build Gerrit Plugins from source, you need: A Linux or macOS system (Windows is not supported at this time) [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-compile-and-build-gerrit-plugins/">How to compile and build Gerrit Plugins?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>To build Gerrit Plugins from source, you need:</strong></p>
<p>A Linux or macOS system (Windows is not supported at this time)</p>
<p><strong>zip, unzip, wget</strong></p>
<pre>$yum install zip -y
$ yum install unzip -y
$ yum install wget -y
$ yum install git -y</pre>
<p><strong>Python 2 or 3</strong><br />
This is installed in each RHEL 7 and Ubunutu server by defaul.</p>
<p><strong>Node.js</strong></p>
<pre>curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
OR
curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash -
sudo yum -y install nodejs</pre>
<p><strong>Bazel</strong></p>
<pre>## RHEL/CentOS 7 64-Bit ##
$ wget https://copr.fedorainfracloud.org/coprs/vbatts/bazel/repo/epel-7/vbatts-bazel-epel-7.repo
$ cp vbatts-bazel-epel-7.repo /etc/yum.repos.d/
$ yum install -y bazel</pre>
<p><strong>How to Installing Bazel on Ubuntu?</strong><br />
https://docs.bazel.build/versions/master/install-ubuntu.html</p>
<p><strong>Maven</strong></p>
<pre>
$ cd /opt
$ wget http://www-us.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.zip
$ unzip apache-maven-3.5.4-bin.zip
$ mv apache-maven-3.5.4 maven
$ export PATH=$PATH:/op/maven/bin</pre>
<p><strong>gcc</strong></p>
<pre class="brush: plain; title: ; notranslate">$ sudo yum install gcc-c++ make</pre>
<p><strong>Now, Bazel in tree driven means it can only be built from within Gerrit tree. Clone or link the plugin into gerrit/plugins directory:</strong></p>
<p><strong># First become a non-root user</strong></p>
<p><strong>A JDK for Java 8</strong></p>
<pre>
$ cd
$ wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/jdk-8u181-linux-x64.tar.gz
$ tar -xvf jdk-8u181-linux-x64.tar.gz
$ export JAVA_HOME=/home/ec2-user/jdk1.8.0_181
$ java -version
</pre>
<p><strong>Follow for Gerrit.war</strong></p>
<pre>
$ git clone --recursive https://gerrit.googlesource.com/gerrit
$ cd gerrit 
$ bazel build release
</pre>
<p><strong>Follow for plugins such as its-jira</strong></p>
<pre>
$ cd plugins
$ git clone https://gerrit.googlesource.com/plugins/its-jira
$ git clone https://gerrit.googlesource.com/plugins/its-base
$ bazel build plugins/its-jira
</pre>
<p><strong>The output can be normally found in the following directory:</strong></p>
<pre>bazel-genfiles/plugins/its-jira/its-jira.jar</pre>
<p># Some plugins describe their build process in src/main/resources/Documentation/build.md file. It may worth checking.</p>
<p># Some plugins cane be build using maven as well</p>
<p><strong>Reference</strong></p>
<ul>
<li>https://gerrit-review.googlesource.com/Documentation/dev-bazel.html</li>
<li>https://gerrit.googlesource.com/gerrit/</li>
<li>https://gerrit-review.googlesource.com/Documentation/cmd-plugin-install.html</li>
<li>https://gerrit-review.googlesource.com/Documentation/dev-build-plugins.html</li>
</ul>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-compile-and-build-gerrit-plugins/">How to compile and build Gerrit Plugins?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/how-to-compile-and-build-gerrit-plugins/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
