Skip to content

Commit

Permalink
Latest 0.13.0-SNAPSHOT docs, including harrah/xsbt to sbt/sbt changes
Browse files Browse the repository at this point in the history
  • Loading branch information
harrah committed Jan 5, 2013
1 parent 2706181 commit 82a32ff
Show file tree
Hide file tree
Showing 167 changed files with 3,503 additions and 3,636 deletions.
42 changes: 21 additions & 21 deletions 0.13.0-SNAPSHOT/docs/Community/ChangeSummary_0.12.0.html

Large diffs are not rendered by default.

289 changes: 289 additions & 0 deletions 0.13.0-SNAPSHOT/docs/Community/ChangeSummary_0.13.0.html

Large diffs are not rendered by default.

149 changes: 92 additions & 57 deletions 0.13.0-SNAPSHOT/docs/Community/Changes.html

Large diffs are not rendered by default.

56 changes: 42 additions & 14 deletions 0.13.0-SNAPSHOT/docs/Community/Community-Plugins.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 0.13.0-SNAPSHOT/docs/Community/Credits.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<li><a href="../index.html">Documentation</a></li>
<li><a href="../Getting-Started/Setup.html">Download</a></li>
<li><a href="http://groups.google.com/group/simple-build-tool">Mailing List</a></li>
<li><a href="http://github.com/harrah/xsbt">Project</a></li>
<li><a href="http://github.com/sbt/sbt">Project</a></li>
</ul>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion 0.13.0-SNAPSHOT/docs/Community/Nightly-Builds.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<li><a href="../index.html">Documentation</a></li>
<li><a href="../Getting-Started/Setup.html">Download</a></li>
<li><a href="http://groups.google.com/group/simple-build-tool">Mailing List</a></li>
<li><a href="http://github.com/harrah/xsbt">Project</a></li>
<li><a href="http://github.com/sbt/sbt">Project</a></li>
</ul>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions 0.13.0-SNAPSHOT/docs/Community/Opportunities.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<li><a href="../index.html">Documentation</a></li>
<li><a href="../Getting-Started/Setup.html">Download</a></li>
<li><a href="http://groups.google.com/group/simple-build-tool">Mailing List</a></li>
<li><a href="http://github.com/harrah/xsbt">Project</a></li>
<li><a href="http://github.com/sbt/sbt">Project</a></li>
</ul>
</div>
</div>
Expand Down Expand Up @@ -102,7 +102,7 @@ <h1>Opportunites<a class="headerlink" href="#opportunites" title="Permalink to t
<li>Inter-project source dependencies</li>
<li>Binary dependencies (jars + class files)</li>
<li>data structure representing the
<a class="reference external" href="https://github.com/harrah/xsbt/tree/0.13/interface">API</a> of
<a class="reference external" href="https://github.com/sbt/sbt/tree/0.13/interface">API</a> of
the source code There is some code already for generating dot
files that isn't hooked up, but graphing dependencies and
inheritance relationships is a general area of work.</li>
Expand Down
6 changes: 3 additions & 3 deletions 0.13.0-SNAPSHOT/docs/Community/Repository-Rules.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<script type="text/javascript" src="../_static/set-versions.js"></script>
<link rel="top" title="sbt Documentation" href="../index.html" />
<link rel="up" title="Contents" href="../index.html" />
<link rel="prev" title="0.12.0 Changes" href="ChangeSummary_0.12.0.html" />
<link rel="prev" title="0.13.0 Changes" href="ChangeSummary_0.13.0.html" />
</head>
<body>
<div class="navbar">
Expand All @@ -46,7 +46,7 @@
<li><a href="../index.html">Documentation</a></li>
<li><a href="../Getting-Started/Setup.html">Download</a></li>
<li><a href="http://groups.google.com/group/simple-build-tool">Mailing List</a></li>
<li><a href="http://github.com/harrah/xsbt">Project</a></li>
<li><a href="http://github.com/sbt/sbt">Project</a></li>
</ul>
</div>
</div>
Expand Down Expand Up @@ -75,7 +75,7 @@
<a href="../index.html">Contents</a>
</li>
<li>
<span class="divider">«</span> <a href="ChangeSummary_0.12.0.html">0.12.0 Changes</a> <span class="divider">|</span>
<span class="divider">«</span> <a href="ChangeSummary_0.13.0.html">0.13.0 Changes</a> <span class="divider">|</span>
</li>
<li>
<select id="versions"><option selected value="0.13.0-SNAPSHOT">Version 0.13.0-SNAPSHOT</option></select>
Expand Down
12 changes: 6 additions & 6 deletions 0.13.0-SNAPSHOT/docs/Community/Using-Sonatype.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<li><a href="../index.html">Documentation</a></li>
<li><a href="../Getting-Started/Setup.html">Download</a></li>
<li><a href="http://groups.google.com/group/simple-build-tool">Mailing List</a></li>
<li><a href="http://github.com/harrah/xsbt">Project</a></li>
<li><a href="http://github.com/sbt/sbt">Project</a></li>
</ul>
</div>
</div>
Expand Down Expand Up @@ -95,7 +95,7 @@ <h1>Deploying to Sonatype<a class="headerlink" href="#deploying-to-sonatype" tit
<div class="section" id="first-pgp-signatures">
<h2>First - PGP Signatures<a class="headerlink" href="#first-pgp-signatures" title="Permalink to this headline"></a></h2>
<p>You'll need to PGP sign your artifacts for the Sonatype repository.
Don't worry, there's a <a class="reference external" href="http://scala-sbt.org/xsbt-gpg-plugin">plugin for
Don't worry, there's a <a class="reference external" href="http://scala-sbt.org/sbt-pgp">plugin for
that</a>. Follow the instructions
for the plugin and you'll have PGP signed artifacts in no time.</p>
<p><em>Note: The plugin is a jvm-only solution to generate PGP keys and sign
Expand All @@ -112,9 +112,9 @@ <h2>Second - Maven Publishing Settings<a class="headerlink" href="#second-maven-
<p>is used to ensure POMs are generated and pushed. Next, you have to set
up the repositories you wish to push too. Luckily, Sonatype's OSSRH uses
the same URLs for everyone:</p>
<div class="highlight-scala"><div class="highlight"><pre><span class="n">publishTo</span> <span class="o">&lt;&lt;=</span> <span class="n">version</span> <span class="o">{</span> <span class="o">(</span><span class="n">v</span><span class="k">:</span> <span class="kt">String</span><span class="o">)</span> <span class="k">=&gt;</span>
<div class="highlight-scala"><div class="highlight"><pre><span class="n">publishTo</span> <span class="o">:=</span> <span class="o">{</span>
<span class="k">val</span> <span class="n">nexus</span> <span class="k">=</span> <span class="s">&quot;https://oss.sonatype.org/&quot;</span>
<span class="k">if</span> <span class="o">(</span><span class="n">v</span><span class="o">.</span><span class="n">trim</span><span class="o">.</span><span class="n">endsWith</span><span class="o">(</span><span class="s">&quot;SNAPSHOT&quot;</span><span class="o">))</span>
<span class="k">if</span> <span class="o">(</span><span class="n">version</span><span class="o">.</span><span class="n">value</span><span class="o">.</span><span class="n">trim</span><span class="o">.</span><span class="n">endsWith</span><span class="o">(</span><span class="s">&quot;SNAPSHOT&quot;</span><span class="o">))</span>
<span class="nc">Some</span><span class="o">(</span><span class="s">&quot;snapshots&quot;</span> <span class="n">at</span> <span class="n">nexus</span> <span class="o">+</span> <span class="s">&quot;content/repositories/snapshots&quot;</span><span class="o">)</span>
<span class="k">else</span>
<span class="nc">Some</span><span class="o">(</span><span class="s">&quot;releases&quot;</span> <span class="n">at</span> <span class="n">nexus</span> <span class="o">+</span> <span class="s">&quot;service/local/staging/deploy/maven2&quot;</span><span class="o">)</span>
Expand Down Expand Up @@ -278,9 +278,9 @@ <h3>build.sbt<a class="headerlink" href="#build-sbt" title="Permalink to this he
<p>Finally, you'll need to tweak the generated POM in your <tt class="docutils literal"><span class="pre">build.sbt</span></tt>.
The tweaks include specifying the project's authors, URL, SCM and many
others:</p>
<div class="highlight-scala"><div class="highlight"><pre><span class="n">publishTo</span> <span class="o">&lt;&lt;=</span> <span class="n">version</span> <span class="o">{</span> <span class="n">v</span><span class="k">:</span> <span class="kt">String</span> <span class="o">=&gt;</span>
<div class="highlight-scala"><div class="highlight"><pre><span class="n">publishTo</span> <span class="o">:=</span> <span class="o">{</span>
<span class="k">val</span> <span class="n">nexus</span> <span class="k">=</span> <span class="s">&quot;https://oss.sonatype.org/&quot;</span>
<span class="k">if</span> <span class="o">(</span><span class="n">v</span><span class="o">.</span><span class="n">trim</span><span class="o">.</span><span class="n">endsWith</span><span class="o">(</span><span class="s">&quot;SNAPSHOT&quot;</span><span class="o">))</span>
<span class="k">if</span> <span class="o">(</span><span class="n">version</span><span class="o">.</span><span class="n">value</span><span class="o">.</span><span class="n">trim</span><span class="o">.</span><span class="n">endsWith</span><span class="o">(</span><span class="s">&quot;SNAPSHOT&quot;</span><span class="o">))</span>
<span class="nc">Some</span><span class="o">(</span><span class="s">&quot;snapshots&quot;</span> <span class="n">at</span> <span class="n">nexus</span> <span class="o">+</span> <span class="s">&quot;content/repositories/snapshots&quot;</span><span class="o">)</span>
<span class="k">else</span>
<span class="nc">Some</span><span class="o">(</span><span class="s">&quot;releases&quot;</span> <span class="n">at</span> <span class="n">nexus</span> <span class="o">+</span> <span class="s">&quot;service/local/staging/deploy/maven2&quot;</span><span class="o">)</span>
Expand Down
2 changes: 1 addition & 1 deletion 0.13.0-SNAPSHOT/docs/Community/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<li><a href="../index.html">Documentation</a></li>
<li><a href="../Getting-Started/Setup.html">Download</a></li>
<li><a href="http://groups.google.com/group/simple-build-tool">Mailing List</a></li>
<li><a href="http://github.com/harrah/xsbt">Project</a></li>
<li><a href="http://github.com/sbt/sbt">Project</a></li>
</ul>
</div>
</div>
Expand Down
23 changes: 13 additions & 10 deletions 0.13.0-SNAPSHOT/docs/Detailed-Topics/Artifacts.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<li><a href="../index.html">Documentation</a></li>
<li><a href="../Getting-Started/Setup.html">Download</a></li>
<li><a href="http://groups.google.com/group/simple-build-tool">Mailing List</a></li>
<li><a href="http://github.com/harrah/xsbt">Project</a></li>
<li><a href="http://github.com/sbt/sbt">Project</a></li>
</ul>
</div>
</div>
Expand Down Expand Up @@ -127,7 +127,7 @@ <h2>Selecting default artifacts<a class="headerlink" href="#selecting-default-ar
<div class="section" id="modifying-default-artifacts">
<h2>Modifying default artifacts<a class="headerlink" href="#modifying-default-artifacts" title="Permalink to this headline"></a></h2>
<p>Each built-in artifact has several configurable settings in addition to
<tt class="docutils literal"><span class="pre">publish-artifact</span></tt>. The basic ones are <tt class="docutils literal"><span class="pre">artifact</span></tt> (of type
<tt class="docutils literal"><span class="pre">publishArtifact</span></tt>. The basic ones are <tt class="docutils literal"><span class="pre">artifact</span></tt> (of type
<tt class="docutils literal"><span class="pre">SettingKey[Artifact]</span></tt>), <tt class="docutils literal"><span class="pre">mappings</span></tt> (of type
<tt class="docutils literal"><span class="pre">TaskKey[(File,String)]</span></tt>), and <tt class="docutils literal"><span class="pre">artifactPath</span></tt> (of type
<tt class="docutils literal"><span class="pre">SettingKey[File]</span></tt>). They are scoped by <tt class="docutils literal"><span class="pre">(&lt;config&gt;,</span> <span class="pre">&lt;task&gt;)</span></tt> as
Expand All @@ -138,7 +138,7 @@ <h2>Modifying default artifacts<a class="headerlink" href="#modifying-default-ar
<span class="o">}</span>
</pre></div>
</div>
<p>The generated artifact name is determined by the <tt class="docutils literal"><span class="pre">artifact-name</span></tt>
<p>The generated artifact name is determined by the <tt class="docutils literal"><span class="pre">artifactName</span></tt>
setting. This setting is of type
<tt class="docutils literal"><span class="pre">(ScalaVersion,</span> <span class="pre">ModuleID,</span> <span class="pre">Artifact)</span> <span class="pre">=&gt;</span> <span class="pre">String</span></tt>. The ScalaVersion
argument provides the full Scala version String and the binary
Expand All @@ -157,19 +157,21 @@ <h2>Modifying default artifacts<a class="headerlink" href="#modifying-default-ar
</div>
<p>(Note that in practice you rarely want to drop the classifier.)</p>
<p>Finally, you can get the <tt class="docutils literal"><span class="pre">(Artifact,</span> <span class="pre">File)</span></tt> pair for the artifact by
mapping the <tt class="docutils literal"><span class="pre">packaged-artifact</span></tt> task. Note that if you don't need the
mapping the <tt class="docutils literal"><span class="pre">packagedArtifact</span></tt> task. Note that if you don't need the
<tt class="docutils literal"><span class="pre">Artifact</span></tt>, you can get just the File from the package task
(<tt class="docutils literal"><span class="pre">package</span></tt>, <tt class="docutils literal"><span class="pre">package-doc</span></tt>, or <tt class="docutils literal"><span class="pre">package-src</span></tt>). In both cases,
(<tt class="docutils literal"><span class="pre">package</span></tt>, <tt class="docutils literal"><span class="pre">packageDoc</span></tt>, or <tt class="docutils literal"><span class="pre">packageSrc</span></tt>). In both cases,
mapping the task to get the file ensures that the artifact is generated
first and so the file is guaranteed to be up-to-date.</p>
<p>For example:</p>
<div class="highlight-scala"><div class="highlight"><pre><span class="n">myTask</span> <span class="o">&lt;&lt;=</span> <span class="n">packagedArtifact</span> <span class="n">in</span> <span class="o">(</span><span class="nc">Compile</span><span class="o">,</span> <span class="n">packageBin</span><span class="o">)</span> <span class="n">map</span> <span class="o">{</span> <span class="k">case</span> <span class="o">(</span><span class="n">art</span><span class="k">:</span> <span class="kt">Artifact</span><span class="o">,</span> <span class="n">file</span><span class="k">:</span> <span class="kt">File</span><span class="o">)</span> <span class="k">=&gt;</span>
<div class="highlight-scala"><div class="highlight"><pre><span class="k">val</span> <span class="n">myTask</span> <span class="k">=</span> <span class="n">taskKey</span><span class="o">[</span><span class="kt">Unit</span><span class="o">](</span><span class="s">&quot;My task.&quot;</span><span class="o">)</span>

<span class="n">myTask</span> <span class="o">:=</span> <span class="o">{</span>
<span class="k">val</span> <span class="o">(</span><span class="n">art</span><span class="o">,</span> <span class="n">file</span><span class="o">)</span> <span class="k">=</span> <span class="n">packagedArtifact</span><span class="o">.</span><span class="n">in</span><span class="o">(</span><span class="nc">Compile</span><span class="o">,</span> <span class="n">packageBin</span><span class="o">).</span><span class="n">value</span>
<span class="n">println</span><span class="o">(</span><span class="s">&quot;Artifact definition: &quot;</span> <span class="o">+</span> <span class="n">art</span><span class="o">)</span>
<span class="n">println</span><span class="o">(</span><span class="s">&quot;Packaged file: &quot;</span> <span class="o">+</span> <span class="n">file</span><span class="o">.</span><span class="n">getAbsolutePath</span><span class="o">)</span>
<span class="o">}</span>
</pre></div>
</div>
<p>where <tt class="docutils literal"><span class="pre">val</span> <span class="pre">myTask</span> <span class="pre">=</span> <span class="pre">TaskKey[Unit]</span></tt>.</p>
</div>
<div class="section" id="defining-custom-artifacts">
<h2>Defining custom artifacts<a class="headerlink" href="#defining-custom-artifacts" title="Permalink to this headline"></a></h2>
Expand All @@ -190,23 +192,24 @@ <h2>Defining custom artifacts<a class="headerlink" href="#defining-custom-artifa
<span class="nc">Artifact</span><span class="o">(</span><span class="s">&quot;myproject&quot;</span><span class="o">,</span> <span class="s">&quot;jdk15&quot;</span><span class="o">)</span>
</pre></div>
</div>
<p>See the <a class="reference external" href="http://ant.apache.org/ivy/history/2.2.0/ivyfile/dependency-artifact.html">Ivy
<p>See the <a class="reference external" href="http://ant.apache.org/ivy/history/2.3.0-rc1/ivyfile/dependency-artifact.html">Ivy
documentation</a>
for more details on artifacts. See the <a class="reference external" href="../../api/sbt/Artifact$.html">Artifact
API</a> for
combining the parameters above and specifying [Configurations] and extra
attributes.</p>
<p>To declare these artifacts for publishing, map them to the task that
generates the artifact:</p>
<div class="highlight-scala"><div class="highlight"><pre><span class="n">myImageTask</span> <span class="o">:=</span> <span class="o">{</span>
<div class="highlight-scala"><div class="highlight"><pre><span class="k">val</span> <span class="n">myImageTask</span> <span class="k">=</span> <span class="n">taskKey</span><span class="o">[</span><span class="kt">File</span><span class="o">](...)</span>

<span class="n">myImageTask</span> <span class="o">:=</span> <span class="o">{</span>
<span class="k">val</span> <span class="n">artifact</span><span class="k">:</span> <span class="kt">File</span> <span class="o">=</span> <span class="n">makeArtifact</span><span class="o">(...)</span>
<span class="n">artifact</span>
<span class="o">}</span>

<span class="n">addArtifact</span><span class="o">(</span> <span class="nc">Artifact</span><span class="o">(</span><span class="s">&quot;myproject&quot;</span><span class="o">,</span> <span class="s">&quot;image&quot;</span><span class="o">,</span> <span class="s">&quot;jpg&quot;</span><span class="o">),</span> <span class="n">myImageTask</span> <span class="o">)</span>
</pre></div>
</div>
<p>where <tt class="docutils literal"><span class="pre">val</span> <span class="pre">myImageTask</span> <span class="pre">=</span> <span class="pre">TaskKey[File](...)</span></tt>.</p>
<p><tt class="docutils literal"><span class="pre">addArtifact</span></tt> returns a sequence of settings (wrapped in a
<a class="reference external" href="../../api/#sbt.Init$SettingsDefinition">SettingsDefinition</a>).
In a full build configuration, usage looks like:</p>
Expand Down
Loading

0 comments on commit 82a32ff

Please sign in to comment.