Page tree
Skip to end of metadata
Go to start of metadata

A Nsys-Boot archive can be built using only the Java jar tool, if you spend the necessary effort to create a directory tree that follows the required structure. But it is simpler and easier to use one of the build-tools that know how to build a Nsys-Boot archive.

Maven

There is a Nsys-Boot Maven SNAPSHOT plugin available at the following repository:

Nsys Maven snapshot repository
<repositories>
	<repository>
       	<id>nsys-dev-repository-snapshots</id>
		<name>The Nsys Development Repository - Snapshots</name>
		<url>http://maven.nsys.org/repository/snapshots</url>
	</repository>
</repositories>

There is a Nsys-Boot Maven release plugin available at the following repository:

Nsys Maven release repository
<repositories>
	<repository>
		<id>nsys-dev-repository</id>
		<name>The Nsys Development Repository</name>
		<url>http://maven.nsys.org/repository/releases</url>
	</repository>
</repositories>

Get started by following Maven example!

Just drop the following code into your pom.xml and run mvn package

Creation of a 'regular' executable jar file
<repositories>
	<repository>
		<id>nsys-dev-repository</id>
		<name>The Nsys Development Repository</name>
		<url>http://maven.nsys.org/repository/releases</url>
	</repository>
	<repository>
       	<id>nsys-dev-repository-snapshots</id>
		<name>The Nsys Development Repository - Snapshots</name>
		<url>http://maven.nsys.org/repository/snapshots</url>
	</repository>
</repositories>

<build>
	<finalName>${project.artifactId}-main</finalName>
	<plugins>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-compiler-plugin</artifactId>
			<version>3.1</version>
			<configuration>
				<source>${java.version}</source>
				<target>${java.version}</target>
			</configuration>
		</plugin>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-jar-plugin</artifactId>
			<version>2.5</version>
			<configuration>
				<archive>
					<manifest>
						<mainClass>org.nsys.daemon.server.embedded.ServerLauncher</mainClass>
					</manifest>
				</archive>
			</configuration>
		</plugin>
		<plugin>
			<groupId>org.nsys.maven.plugins</groupId>
			<artifactId>nsys-maven-plugin</artifactId>
			<version>${nsys.nmps.version}</version>
			<extensions>true</extensions>
			<executions>
				<execution>
					<configuration>
						<productName>nsys-boot</productName>
						<productVersion>${nsys.version}</productVersion>
						<buildNumber>${build.number}</buildNumber> <!-- ${build.number}=${build.version}.${build.counter} -->
						<!-- Optional, default is false -->
						<attachToBuild>true</attachToBuild>
						<!-- Optional, default is "nsysboot" -->
						<classifier>bundle</classifier>
						<fileName>${project.artifactId}.jar</fileName>
						<systemLoader>${project.artifactId}-main.jar</systemLoader>
						<mainClass>org.nsys.daemon.server.embedded.ServerLauncher</mainClass>
						<!-- <nsysBootConfig>${project.basedir}/src/main/resources/nsys-boot.cfg</nsysBootConfig> -->
						<manifestEntries>
							<Application-Name>${project.name}</Application-Name>
						</manifestEntries>
					</configuration>
					<goals>
						<goal>nsys-boot</goal>
					</goals>
				</execution>
			</executions>
		</plugin>            
	</plugins>
</build>

<properties>
	<build.number>1.0.0.1</build.number>
	<java.version>1.7</java.version>
	<nsys.version>1.0.0-SNAPSHOT</nsys.version>
	<nsys.nmps.version>1.0.0-SNAPSHOT</nsys.nmps.version>
</properties>
  • No labels