blob: ae20ab9264463c246519e47bbfe40cbac98d3ecf [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Generated by Apache Maven Doxia at May 13, 2012 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Apache log4j 1.2 -
How to build Apache log4j</title>
<style type="text/css" media="all">
@import url("./css/maven-base.css");
@import url("./css/maven-theme.css");
@import url("./css/site.css");
</style>
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
<meta name="author" content="The Apache log4j team" />
<meta name="Date-Revision-yyyymmdd" content="20120513" />
<meta http-equiv="Content-Language" content="en" />
</head>
<body class="composite">
<div id="banner">
<a href="../../" id="bannerLeft">
<img src="images/ls-logo.jpg" alt="Apache Logging Services Project" />
</a>
<a href=".." id="bannerRight">
<img src="images/logo.jpg" alt="Apache log4j™" />
</a>
<div class="clear">
<hr/>
</div>
</div>
<div id="breadcrumbs">
<div class="xleft">
<span id="publishDate">Last Published: 2012-05-13</span>
&nbsp;| <span id="projectVersion">Version: 1.2.17</span>
| <a href="http://www.apache.org/" class="externalLink" title="Apache">Apache</a>
&gt;
<a href="../../" title="Logging Services">Logging Services</a>
&gt;
<a href="../" title="log4j">log4j</a>
&gt;
<a href="./" title="1.2">1.2</a>
</div>
<div class="xright">
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="leftColumn">
<div id="navcolumn">
<h5>About log4j 1.2</h5>
<ul>
<li class="none">
<a href="index.html" title="What is log4j?">What is log4j?</a>
</li>
<li class="none">
<a href="download.html" title="Download">Download</a>
</li>
<li class="none">
<a href="faq.html" title="FAQ">FAQ</a>
</li>
<li class="none">
<a href="roadmap.html" title="Roadmap">Roadmap</a>
</li>
</ul>
<h5>Community</h5>
<ul>
<li class="none">
<a href="mail-lists.html" title="Mailing Lists">Mailing Lists</a>
</li>
<li class="none">
<a href="issue-tracking.html" title="Issue Tracking">Issue Tracking</a>
</li>
<li class="none">
<a href="http://blogs.apache.org/logging/" class="externalLink" title="Blog">Blog</a>
</li>
</ul>
<h5>Documentation</h5>
<ul>
<li class="none">
<a href="manual.html" title="Introduction">Introduction</a>
</li>
<li class="none">
<a href="apidocs/index.html" title="JavaDoc">JavaDoc</a>
</li>
<li class="none">
<a href="publications.html" title="Publications">Publications</a>
</li>
<li class="none">
<strong>Building</strong>
</li>
<li class="none">
<a href="http://wiki.apache.org/logging-log4j" class="externalLink" title="Wiki">Wiki</a>
</li>
</ul>
<h5>Project Documentation</h5>
<ul>
<li class="collapsed">
<a href="project-info.html" title="Project Information">Project Information</a>
</li>
<li class="collapsed">
<a href="project-reports.html" title="Project Reports">Project Reports</a>
</li>
</ul>
<h5>Apache</h5>
<ul>
<li class="none">
<a href="http://www.apache.org" class="externalLink" title="Home">Home</a>
</li>
<li class="none">
<a href="http://www.apache.org/licenses" class="externalLink" title="License">License</a>
</li>
<li class="none">
<a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship">Sponsorship</a>
</li>
<li class="none">
<a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks">Thanks</a>
</li>
<li class="none">
<a href="http://www.apache.org/security/" class="externalLink" title="Security">Security</a>
</li>
<li class="none">
<a href="http://www.apachecon.com" class="externalLink" title="Conferences">Conferences</a>
</li>
</ul>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
<img class="poweredBy" alt="Built by Maven" src="./images/maven-feather.png" />
</a>
</div>
</div>
<div id="bodyColumn">
<div id="contentBox">
<!-- Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<div class="section"><h2>End of Life</h2>
<p>On August 5, 2015 the Logging Services Project Management Committee announced that Log4j 1.x had reached end of life.
For complete text of the announcement please see the
<a href="http://blogs.apache.org/foundation/entry/apache_logging_services_project_announces">Apache Blog</a>.
Users of Log4j 1 are recommended to upgrade to <a class="externalLink" href="http://logging.apache.org/log4j/2.x/index.html">Apache Log4j 2</a>.</p>
</div>
<div class="section"><h2>Building Apache log4j<a name="Building_Apache_log4j"></a></h2>
<div class="section"><h2>Introduction<a name="Introduction"></a></h2>
<p>This is a detailed instruction to reproduce the log4j distribution
either to verify that the release is reproducable or to prepare
a hot-fix.</p>
<p>The log4j build is platform dependent. The best is to setup a VM using virtualbox (or similar),
install Ubuntu and follow the steps here.</p>
<div class="section"><h2>Preparation of environment<a name="Preparation_of_environment"></a></h2>
<div class="section"><h3>Install Sun Java 6<a name="Install_Sun_Java_6"></a></h3>
<div><pre>
$&gt; sudo sed 's/restricted/restricted universe multiverse/' -i /etc/apt/sources.list
$&gt; sudo apt-get update &amp;&amp; sudo apt-get -y update
$&gt; sudo apt-get install openjdk-6-jdk
</pre></div>
</div><div class="section"><h3>Install Maven 2, Subversion, mingw and xemacs21, openssh-server:<a name="Install_Maven_2_Subversion_mingw_and_xemacs21_openssh-server:"></a></h3>
<div><pre>
$&gt; sudo apt-get install maven2 subversion mingw32 xemacs21 openssh-server
</pre></div>
</div><div class="section"><h3>Copy Win32 version of jni_md.h for NTEventLogAppender.dll<a name="Copy_Win32_version_of_jni_md.h_for_NTEventLogAppender.dll"></a></h3>
<div><pre>
c:\&gt;cd &quot;\Program Files\Java\jdk_1.6.0_16\include\win32
c:\&gt;scp jni_md.h username@hostname:
$&gt; export JNI_WIN32_INCLUDE_DIR=/home/username
</pre></div>
</div><div class="section"><h3>Signing &amp; Deploying<a name="Signing__Deploying"></a></h3>
<p>Create a local ssh key with no passphrase to enable
&quot;deployment&quot; of site back to the local machine using scp.</p>
<div><pre>
$&gt; ssh-keygen
$&gt; cd ~/.ssh
$&gt; cat id_rsa.pub &gt;&gt; authorized_keys
$&gt; ssh localhost
$&gt; exit
</pre></div>
<p>It's important to add localhost and people.a.o to the list of permanent allowed hosts.
Besides the above, this should have been runned at least once:</p>
<div><pre>
$&gt; ssh people.apache.org
</pre></div>
<p>If you intended to deploy jars to the repo or update the site,
you need to set up ssh to use private keys to access people.apache.org
and create or modify ~/.m2/settings.xml to specify user name and key location.
</p>
<div><pre>
&lt;settings xmlns=&quot;http://maven.apache.org/SETTINGS/1.0.0&quot;
xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation=&quot;http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd&quot;&gt;
&lt;servers&gt;
&lt;server&gt;
&lt;id&gt;logging.repo&lt;/id&gt;
&lt;username&gt;USERNAME for people.apache.org&lt;/username&gt;
&lt;privateKey&gt;/home/username/.ssh/id_rsa&lt;/privateKey&gt;
&lt;passphrase&gt;&lt;/passphrase&gt;
&lt;/server&gt;
&lt;/servers&gt;
&lt;/settings&gt;
</pre></div>
<p>You should test your ssh connection to people.apache.org
and localhost before attempting a deployment like:</p>
<div><pre>
$ ssh -l USERNAME people.apache.org
$ ssh localhost
</pre></div>
</div><div class="section"><h2>Building release artifacts<a name="Building_release_artifacts"></a></h2>
<p>Before you build, please make sure you have a nonblocking editor set as SVN editor. Like:</p>
<div><pre>
$ export SVN_EDITOR=xemacs
</pre></div>
<p>Other checks:</p>
<ul>
<li>Please make sure changes.xml reflect all fixed issues. The release date in changes is to be set
to the date the release candidate is created.</li>
<li>Please update doap_log4j.rdf to reflect the correct version. Use the same release date as in changes.</li>
</ul>
<p>The release artifacts were originally built by:</p>
<div><pre>
$&gt; svn co http://svn.apache.org/repos/asf/logging/log4j/trunk log4j
$&gt; cd log4j
$&gt; mvn package release:prepare
$&gt; mvn release:perform
</pre></div>
<p>Note: you'll be ask for a SVN tagname. Please use the following pattern: v1.2.17-RC1.</p>
<p>
Attention: this is an non-interactive build. In some cases it is necessary
to add: -Dusername=paouser -Dpassword=paopassword
to the release plugin commands. This is surely not safe because your password
can be seen clearly.
</p>
<p>The release artifacts can be rebuilt by:</p>
<div><pre>
$ mvn release:perform -DconnectionUrl=scm:svn:https://svn.apache.org/repos/asf/logging/log4j/tags/v1_2_16
</pre></div>
<p>Building site and artifacts from a tag:</p>
<div><pre>
$ svn co https://svn.apache.org/repos/asf/logging/log4j/tags/v1_2_16
$ cd v1_2_16
$ mvn site assembly:assembly
</pre></div>
<p>TODO: the following section describes site staging. This must be altered: the staging must not happen in SVN.</p>
<p>
The website content will automatically be staged to the ASF SVN repo by &quot;mvn site-deploy&quot;.
This phase checks out https://svn.apache.org/repos/asf/logging/site/trunk/docs/log4j/1.2
into target/site-deploy, copys the generated documentation to that directory using
scp to localhost and then commits the changed content. You will be prompted for an
SVN commit message using the configured SVN_EDITOR. A commit message must be entered or the
site commit will be aborted.
</p>
<p>
The staged content can be tested by opening
http://svn.apache.org/repos/asf/logging/site/trunk/docs/1.2/index.html,
however some links may be broken due to the staged location.
The staged version can be published to the main public site by executing
&quot;svn update&quot; in /www/logging.apache.org/log4j/1.2 on people.apache.org.
</p>
<div class="section"><h2>If a vote has failed<a name="If_a_vote_has_failed"></a></h2>
<ul>
<li>Send a &quot;cancel&quot; note to the mailinglist (usually resend the vote mail with [CANCEL] in subject</li>
<li>Delete the RC artifacts from:<div><pre>http://people.apache.org/builds/logging/repo/log4j/log4j/</pre></div></li>
</ul>
<div class="section"><h2>If a vote has passed<a name="If_a_vote_has_passed"></a></h2>
<p>If a RC has passed the vote, these steps are necessary:</p>
<p>Rename the tag:</p>
<div><pre>
$&gt; svn mv https://svn.apache.org/repos/asf/logging/log4j/tags/log4j-1.2.17-RC1 https://svn.apache.org/repos/asf/logging/log4j/tags/log4j-1.2.17
</pre></div>
<p>Change the pom.xml version to the prior version number.</p>
</div>
</div>
</div>
<div class="clear">
<hr/>
</div>
<div id="footer">
<div class="xleft">Copyright &#169; 1999-2012
<a href="http://www.apache.org">Apache Software Foundation</a>.
Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache Software License, Version 2.0</a>.</div>
<div class="xleft">Apache Extras Companion for Apache log4j, Apache log4j, Apache, the Apache feather logo,
the Apache Logging Services project logo, the log4j logo, and the Built by Maven logo are trademarks of The Apache Software Foundation. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.</div>
<div class="clear">
<hr/>
</div>
</div>
</body>
</html>