Skip to content

Latest commit

 

History

History
74 lines (54 loc) · 3.08 KB

getting_source_and_compiling.md

File metadata and controls

74 lines (54 loc) · 3.08 KB

Building & Development

Building

  1. Install the Java Development Kit (JDK) 8 from Oracle.

  2. Install the Java Card Classic Development Kit from Oracle, which provides the Java Card API classes. Set the JC_CLASSIC_HOME environment variable system-wide.

  3. Install Apache Maven, which is used to build jCardSim. Follow the installation tips to set the PATH and JAVA_HOME environment variables.

  4. From the directory containing the jCardSim source code, execute the following commands:

mvn clean install

NOTE: Also check the Javadoc to prevent errors during the deployment if this fails:

mvn javadoc:javadoc

Creating Release

Open Maven's settings.xml and edit to fit your settings:

<profiles>
    <profile>
        <id>jcardsim</id>
        <properties>
            <!-- the group id to use for the artifact - each deployment must use a unique-->
            <group.id>your registered Sonatype coordinates</group.id>
            <!-- Run gpg --list-signatures --keyid-format 0xshort and select the key id -->
            <gpg.keyname>0x.....</gpg.keyname>
            <github.username>github username</github.username>
            <github.name>your name</github.name>
            <github.mail>email to use</github.mail>
            <!-- optional: in case you use several ssh keys and have a ssh host identifier set -->
            <github.dev.host>github.com</github.dev.host>
        </properties>
    </profile>
</profiles>

Release the jar on Sonatype:

# Java 1.8 is required:
JAVA_HOME=/usr/lib/jvm/java-1.8.0-amazon-corretto
export JAVA_HOME
mvn release:clean release:prepare -Pjcardsim
mvn release:perform -Pjcardsim

When being asked for a version number use the pattern 'Java Card version-buildnumber', e.g.'3.0.5-1'. The version of the jar seems to be aligned with the Java Card version, so only the build number can be used for updates.

NOTE: It might take a while (multiple hours) until the Sonatype Nexus server has successfully checked the upload in the staging environment and closed it. Because the Nexus Maven plugin times out after 300 seconds it might report that the connection was reset or the build failed because of a rule check. This might be not the case. Wait until the upload is marked as closed and release it manually in the Nexus UI.

NOTE: An error of the release plugin is coming from the autoReleaseAfterCloseflag passed to the Nexus plugin. In this case jCardSim was already released and this error can be ignored.

Development

jCardSim is an open source project, and it would be a pleasure for us to see you as committers and contributors!

We are using the following principles in jCardSim's development process: