Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Commit

Permalink
#1
Browse files Browse the repository at this point in the history
  • Loading branch information
djeang committed May 13, 2015
1 parent f84faf9 commit 5bac666
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
13 changes: 7 additions & 6 deletions _jbake-site-sources/content/tour.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ This example mimics the [tutorial ANT build script](http://ant.apache.org/manual
```Java
public class AntStyleBuild extends JkBuild {
String name = "myProject";
File src = baseDir("src");
File buildDir = baseDir("build");
File buildDir = baseDir("build/output");
File classDir = new File(buildDir, "classes");
File jarFile = new File(buildDir, "jar/" + this.baseDir().root().getName() + ".jar");
File jarFile = new File(buildDir, "jar/" + name + ".jar");
String className = "my.mainClass";
JkClasspath classpath = JkClasspath.of(baseDir().include("libs/*.jar"));
File reportDir = new File(buildDir, "junitRreport");
Expand Down Expand Up @@ -71,10 +72,10 @@ public class AntStyleBuild extends JkBuild {
From this build definition, we can execute Jerkar the following way :
- write a `main` method in your script and launch it within your IDE.
- execute the `org.jerkar.JkMain.main` method in your IDE but with the root of your project as working directory. In this mode you
can pass arguments as you would do with the command line.
- executing a command line in a shell (or on a build server)
- launch the `AntStyleBuild.main` within your IDE
- launch the `org.jerkar.JkMain.main` method within your IDE. In this mode you
can pass arguments as you would do with the command line
- execute a command line in a shell (or on a build server)
To execute command line, open a shell and go under the project root directory. From there you can :
Expand Down
4 changes: 2 additions & 2 deletions feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<atom:link href="http://jerkar.org/feed.xml" rel="self" type="application/rss+xml" />
<description>JBake Bootstrap Template</description>
<language>en-gb</language>
<pubDate>Wed, 13 May 2015 16:22:02 +0200</pubDate>
<lastBuildDate>Wed, 13 May 2015 16:22:02 +0200</lastBuildDate>
<pubDate>mer., 13 mai 2015 20:58:27 +0200</pubDate>
<lastBuildDate>mer., 13 mai 2015 20:58:27 +0200</lastBuildDate>


</channel>
Expand Down
11 changes: 6 additions & 5 deletions tour.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@
<p><h1>Welcome to Jerkar tour</h1><p>With Jerkar you can write free form build definition (ala <em>Ant</em>) or templated ones (ala <em>Maven</em>). In the following section,<br/>we will illustrate different different approach to use Jerkar.<br/>As Jerkar uses a very small set of concept, at the end of this section, you should have well understood most of the Jerkar principles.<br/><br/></p><h4>Ant style build</h4><p>If you like to have complete control over your build, you may prefere the <em>Ant</em> build style.<br/>The price is that you have to <em>write explicitly</em> what your build is doing. </p><p>This example mimics the <a href="http://ant.apache.org/manual/tutorial-HelloWorldWithAnt.html">tutorial ANT build script</a> </p>
<pre><code class="Java">public class AntStyleBuild extends JkBuild {

String name = &quot;myProject&quot;;
File src = baseDir(&quot;src&quot;);
File buildDir = baseDir(&quot;build&quot;);
File buildDir = baseDir(&quot;build/output&quot;);
File classDir = new File(buildDir, &quot;classes&quot;);
File jarFile = new File(buildDir, &quot;jar/&quot; + this.baseDir().root().getName() + &quot;.jar&quot;);
File jarFile = new File(buildDir, &quot;jar/&quot; + name + &quot;.jar&quot;);
String className = &quot;my.mainClass&quot;;
JkClasspath classpath = JkClasspath.of(baseDir().include(&quot;libs/*.jar&quot;));
File reportDir = new File(buildDir, &quot;junitRreport&quot;);
Expand Down Expand Up @@ -124,9 +125,9 @@
}
</code></pre><p>From this build definition, we can execute Jerkar the following way :</p>
<ul>
<li>write a <code>main</code> method in your script and launch it within your IDE.</li>
<li>execute the <code>org.jerkar.JkMain.main</code> method in your IDE but with the root of your project as working directory. In this mode you<br/>can pass arguments as you would do with the command line.</li>
<li>executing a command line in a shell (or on a build server)</li>
<li>launch the <code>AntStyleBuild.main</code> within your IDE</li>
<li>launch the <code>org.jerkar.JkMain.main</code> method within your IDE. In this mode you<br/>can pass arguments as you would do with the command line</li>
<li>execute a command line in a shell (or on a build server)</li>
</ul><p>To execute command line, open a shell and go under the project root directory. From there you can :</p>
<ul>
<li>execute <code>jerkar doDefault</code> =&gt; instantiate <code>JkJavaBuild</code> and invoke the <code>doDefault</code> method.</li>
Expand Down

0 comments on commit 5bac666

Please sign in to comment.