Creating JSystem Projects From the Command Line

The fastest way to create a new JSystem projects is from the command line. If you are using Eclipse and prefer to use it you can follow the instruction in the Getting Started Guide.

Maven

Top-Q Maven repository is holding an archetype catalog which describes different projects archetypes that can be generated. To generate your own project, you will need to use the Maven tool. If Maven is not already installed on your machine download it, extract it and add the bin folder to your path environment variable. If you want to make sure that it is installed correctly, open your operating system console and type

> mvn -version

You should see something like

Apache Maven 3.0.4 (r1232337; 2012-01-17 10:44:56+0200)
Maven home: C:\Program Files (x86)\apache-maven-3.0.4\bin\..
Java version: 1.6.0_25, vendor: Sun Microsystems Inc.
Java home: C:\Program Files (x86)\Java\jdk1.6.0_25\jre
Default locale: iw_IL, platform encoding: Cp1255
OS name: “windows 7”, version: “6.1”, arch: “x86”, family: “windows”

Generating JSystem Projects

Open your operating system console, change directory to the folder that you would like to create the project in, and type the following command

> mvn archetype:generate -DarchetypeCatalog=http://maven.top-q.co.il/content/groups/public/archetype-catalog.xml

You will be asked to select the archetype to use.

Choose archetype:
1: http://maven.top-q.co.il/content/groups/public/archetype-catalog.xml -> org.jsystemtest.archetypes:jsystem-tests-archetype (-)
2: http://maven.top-q.co.il/content/groups/public/archetype-catalog.xml -> org.jsystemtest.archetypes:jsystem-so-archetype (-)
Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): :

Select 1 if you would like to create a tests project, select 2 if you would like to create a system object project

Next, you would be asked to select the JSystem version to use

Choose org.jsystemtest.archetypes:jsystem-tests-archetype version:
1: 6.0.01
2: 6.0.02-SNAPSHOT
Choose a number: 2:

In the following steps you would be asked to provide a group id, artifact id, version and package.

Define value for property ‘groupId’: : <Group ID>
Define value for property ‘artifactId’: : <Atrifact ID>
Define value for property ‘version’: 1.0-SNAPSHOT: : <Version>
Define value for property ‘package’: <Group ID>: : <Package>
Confirm properties configuration:
groupId: <Group ID>
artifactId: <Atrifact ID>
version: <Version>
package: <Package>

Confirm your selections and the project would be created.

You would probably want to link the test project with the system object project. Open the test project pom.xml file, locate the dependencies section and add the system object project as a dependency.

<dependencies>
.
	<dependency>
		<groupId>Group ID</groupId>
		<artifactId>SO Artifact ID</artifactId>
		<version>version</version>
	</dependency>
.
.
</dependencies>

The projects are ready. Change directory to the system objects project and execute Maven clean and install phases.

> mvn clean install

 

View Itai Agmon's LinkedIn profileView Itai Agmon’s profile

Fork me on GitHub