Skip to content

Commit

Permalink
preparing sonatype release from github repo
Browse files Browse the repository at this point in the history
  • Loading branch information
koh-osug committed Dec 16, 2021
1 parent 7946e58 commit dc8a3f5
Show file tree
Hide file tree
Showing 7 changed files with 157 additions and 104 deletions.
63 changes: 32 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,5 @@
jCardSim (Official repo of the [jCardSim](http://jcardsim.org) project)
========

### Congratulations! jCardSim has won [Duke's Choice 2013 Award](https://www.java.net/dukeschoice/2013)!

![alt text](https://licelus.com/wp-content/uploads/DCA2013_Badge_Winner.jpg "jCardSim is a winner of Duke's Choice 2013")

This repo is including several [pull request from the original GitHub repository](https://github.com/licel/jcardsim/pulls)
and an up-to-date release files with all changes.

The following pull request have been included:

* #176: Wrap 'nbsp' to CDATA in pom.xml
* #174: test: Do not reuse KeyPair context to generate second key pair
* #171: Bump bcprov-jdk14 from 1.46 to 1.67
* #158: Do not throw CryptoException if EC KeyBuilder.buildKey() does not match a known curve
* #157: Max case 4 command APDU size is 261
* #155: Add option to randomize RandomData
* #151: Building on Linux w/ vpcd support
* #141: Make SecureRandom securely random
* #138: Logical Channel Support / pom.xml fix
* #113 Added resize of ByteContainer for longer buffer

Not included are:

* #75: Fix AssymetricSignatureImpl behaviour wrt ISO9796_MR signatures: covered by more recent patches
* #62: Intercept Shareable creation with proxy: correctness of patch not verified
* #159: Simulate card removal and insertion by raising SIGUSR2 (when using vpcd): This is using an internal Java API
jCardSim (Forked repo of the [jCardSim](http://jcardsim.org) project)
======

jCardSim is an open source simulator for Java Card, v3.0.5:

Expand Down Expand Up @@ -61,12 +35,33 @@ assertEquals(0x9000, response.getSW());
* APDU scripting (scripts are compatible with `apdutool` from Java Card Development Kit)
* Simplifies verification tests creation (Common Criteria)

*JavaDoc*: https://github.com/licel/jcardsim/tree/master/javadoc
[*JavaDoc*](./javadoc)

(Javadoc rendered: https://jcardsim.org/jcardsim/)
### Upstream Project Changes

*Latest release 3.0.5*: https://github.com/licel/jcardsim/raw/master/jcardsim-3.0.5-SNAPSHOT.jar
This repo is including several [pull request from the original GitHub repository](https://github.com/licel/jcardsim/pulls)
and an up-to-date release files with all changes.

For issues reporting please use the upstream project. Pull requests can be created.

The following pull request have been included:

* 176: Wrap 'nbsp' to CDATA in pom.xml
* 174: test: Do not reuse KeyPair context to generate second key pair
* 171: Bump bcprov-jdk14 from 1.46 to 1.67
* 158: Do not throw CryptoException if EC KeyBuilder.buildKey() does not match a known curve
* 157: Max case 4 command APDU size is 261
* 155: Add option to randomize RandomData
* 151: Building on Linux w/ vpcd support
* 141: Make SecureRandom securely random
* 138: Logical Channel Support / pom.xml fix
* 113 Added resize of ByteContainer for longer buffer

Not included are:

* 75: Fix AssymetricSignatureImpl behaviour wrt ISO9796_MR signatures: covered by more recent patches
* 62: Intercept Shareable creation with proxy: correctness of patch not verified
* 159: Simulate card removal and insertion by raising SIGUSR2 (when using vpcd): This is using an internal Java API

### What is the difference from Oracle Java Card Development Kit simulator?

Expand All @@ -86,6 +81,12 @@ assertEquals(0x9000, response.getSW());

jCardSim is completely written in Java and can therefore be used on all platforms which support Java (Windows, Linux, MacOS, etc).

### Maintainer Information

* [Building & Development](./sitedocs/getting_source_and_compiling.md)
* [Quick Start Guide: API](./sitedocs/quick_start_guide_simulator_api.md)
* [Quick Start Guide: CLI](./sitedocs/quick_start_guide_using_in_cli_mode.md)

### How to help jCardSim?

* Join the team of jCardSim developers.
Expand Down
Binary file removed jcardsim-3.0.5-SNAPSHOT-android.jar
Binary file not shown.
Binary file removed jcardsim-3.0.5-SNAPSHOT.jar
Binary file not shown.
130 changes: 71 additions & 59 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,28 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.licel</groupId>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<netbeans.hint.license>apache20</netbeans.hint.license>
<maven-javadoc-plugin.version>2.10.1</maven-javadoc-plugin.version>
<ant.build.dir>${project.build.directory}/antrun/build</ant.build.dir>
<junit.version>4.13.2</junit.version>
<java.version>1.7</java.version>
<jcApiVersion>3.0.5</jcApiVersion>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.7</maven.compiler.source>
<asm.version>9.2</asm.version>
<github.dev.host>github.com</github.dev.host>
<group.id>com.licel</group.id>
</properties>

<groupId>${group.id}</groupId>
<version>3.0.5-SNAPSHOT</version>
<packaging>jar</packaging>
<url>http://maven.apache.org</url>
<url>https://github.com/${github.username}/jcardsim</url>

<artifactId>jcardsim</artifactId>
<name>Java Card Runime Environment Simulator</name>
<name>Java Card Runtime Environment Simulator</name>
<description>jCardSim is open-source library contains implementation of Java Card API</description>

<organization>
Expand All @@ -22,49 +37,40 @@
<name>jCardSim Team</name>
<organization>Licel Corporation</organization>
</developer>
<developer>
<email>${github.mail}</email>
<name>${github.name}</name>
</developer>
</developers>

<licenses>
<license>
<name>Apache 2</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<netbeans.hint.license>apache20</netbeans.hint.license>
<maven-javadoc-plugin.version>2.10.1</maven-javadoc-plugin.version>
<ant.build.dir>${project.build.directory}/antrun/build</ant.build.dir>
<junit.version>4.13.2</junit.version>
<java.version>1.7</java.version>
<jcApiVersion>3.0.5</jcApiVersion>
<asm.version>9.2</asm.version>
</properties>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>bintray-jcardsim-maven-jCardSim</id>
<name>jcardsim-maven-jCardSim</name>
<url>https://api.bintray.com/maven/jcardsim/maven/jCardSim</url>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<scm>
<connection>scm:git:[email protected]:licel/jcardsim.git</connection>
<developerConnection>scm:git:git@github.com:licel/jcardsim.git</developerConnection>
<url>[email protected]:licel/jcardsim.git</url>
<connection>scm:git:[email protected]:${github.username}/jcardsim.git</connection>
<developerConnection>scm:git:git@${github.dev.host}:${github.username}/jcardsim.git</developerConnection>
<url>[email protected]:${github.username}/jcardsim.git</url>
</scm>

<profiles>
<profile>
<id>sign</id>
<activation>
<property>
<name>keystoreLocation</name>
</property>
</activation>
<id>release</id>
<build>
<plugins>
<plugin>
Expand All @@ -84,36 +90,53 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<version>3.2.0</version>
<configuration>
<links>
<link>https://docs.oracle.com/javase/7/docs/api/</link>
<link>https://docs.oracle.com/javase/7/docs/jre/api/security/smartcardio/spec/</link>
</links>
<author>false</author>
<source>7</source>
<bottom><![CDATA[&nbsp;]]></bottom>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<id>sign</id>
<id>attach-javadocs</id>
<goals>
<goal>sign</goal>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>verify</id>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>verify</goal>
<goal>sign</goal>
</goals>
<configuration>
<keyname>${gpg.keyname}</keyname>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<keystore>${keystoreLocation}</keystore>
<alias>${keyAlias}</alias>
<storepass>${keystorePass}</storepass>
<keypass>${keyPass}</keypass>
<storetype>${storeType}</storetype>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<skipStagingRepositoryClose>true</skipStagingRepositoryClose>
<keepStagingRepositoryOnCloseRuleFailure>true</keepStagingRepositoryOnCloseRuleFailure>
</configuration>
</plugin>
</plugins>
Expand Down Expand Up @@ -157,11 +180,13 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
<goals>deploy nexus-staging:release</goals>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -249,19 +274,6 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<links>
<link>https://docs.oracle.com/javase/7/docs/api/</link>
<link>https://docs.oracle.com/javase/7/docs/jre/api/security/smartcardio/spec/</link>
</links>
<author>false</author>
<source>7</source>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
Expand Down
41 changes: 33 additions & 8 deletions sitedocs/getting_source_and_compiling.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
## Building & Development

### Source code
The official jCardSim source repository is located at [https://github.com/licel/jcardsim](https://github.com/licel/jcardsim).


### Building

1. Install the [Java Development Kit (JDK) 8](http://www.oracle.com/technetwork/java/javase/downloads/) from Oracle.
Expand All @@ -13,11 +9,40 @@ The official jCardSim source repository is located at [https://github.com/licel/
3. Install [Apache Maven](https://maven.apache.org/download.html), which is used to build jCardSim. Follow the [installation tips](https://maven.apache.org/install.html) to set the `PATH` and `JAVA_HOME` environment variables.

4. From the directory containing the jCardSim source code, execute the following commands:
~~~
mvn initialize
mvn clean install
~~~

~~~
mvn clean install
~~~

### Creating Release

Open Maven's `settings.xml`:

~~~xml
<profiles>
<profile>
<id>jcardsim</id>
<properties>
<!-- the group id to use for the artifact - each deployment must use a unique-->
<group.id>de.ohmesoftware</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:

~~~shell
mvn release:clean release:prepare -Pjcardsim
mvn release:perform -Pjcardsim
~~~

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

0 comments on commit dc8a3f5

Please sign in to comment.