'. '

Bck2BrwsrViaCLI

From APIDesign

(Difference between revisions)
Jump to: navigation, search
Line 3: Line 3:
<source lang="bash">
<source lang="bash">
$ mvn archetype:generate -DarchetypeGroupId=org.apidesign.bck2brwsr \
$ mvn archetype:generate -DarchetypeGroupId=org.apidesign.bck2brwsr \
-
-DarchetypeArtifactId=bck2brwsr-archetype-html-sample -DarchetypeVersion=0.5 \
+
-DarchetypeArtifactId=bck2brwsr-archetype-html-sample -DarchetypeVersion=0.6 \
-DarchetypeRepository=https://maven.java.net/content/repositories/releases/
-DarchetypeRepository=https://maven.java.net/content/repositories/releases/
</source>
</source>
Line 16: Line 16:
<source lang="bash">
<source lang="bash">
-
$ mvn process-classes org.apidesign.bck2brwsr:mojo:0.5:brwsr
+
$ mvn process-classes org.apidesign.bck2brwsr:mojo:0.6:brwsr
</source>
</source>

Revision as of 21:15, 14 April 2013

The Bck2Brwsr project is publishing artifact snapshots to Maven repository since Feb 13, 2013. That means there is an easy, three steps, way to start coding for the browser yourself. All you need is Java and Maven installed. Type:

$ mvn archetype:generate -DarchetypeGroupId=org.apidesign.bck2brwsr \
  -DarchetypeArtifactId=bck2brwsr-archetype-html-sample -DarchetypeVersion=0.6 \
  -DarchetypeRepository=https://maven.java.net/content/repositories/releases/

Maven will download its libraries. Then it asks few questions (for example name of the project you want to create) and generates the skeleton project for you. When the project is successfully created, switch to the created subfolder:

$ cd nameofyourproject

and you are ready to compile and launch your first Bck2Brwsr project:

$ mvn process-classes org.apidesign.bck2brwsr:mojo:0.6:brwsr

A browser window opens and you can check how easy it is to synchronize content of various elements on the HTML page, to compute derived properties and how to draw a text on an HTML canvas.

Of course, you don't have to work only from command line. Good IDEs, including NetBeans will recognize the generated project without any struggle and provide you all the comfort you are used to when coding in Java.

Your favourite language has just returned bck2brwsr!

Personal tools
buy