Barcode4J is a flexible generator for barcodes written in Java and available under the Apache License v2.0. Features
Forked from Sourceforge barcode4j:
Barcode4j was originally developed by Jeremias Märki and Marc Guillemot with code available on Sourceforge under Apache License v2.0.
It's not been updated in some time so this fork was made with the intention of merging in the various changes that people have tried to add over the years.
There is another barcode4j on github but it's not being maintained and the svn history was not maintained.
This fork has the following goals:
- Keeping the svn history
- Enabling continuous integration for multiple Java versions
- Support latest JDK versions (for now Java 1.7 and above are supported but future releases will require JDK 11 or above)
- Add JPMS support (from 2.2.3 Automatic-Module-Name is defined in the manifest of each published jar, version 3 and above will use module-info.java)
- Support GraalVM Native Image (changes were needed to allow barcode4j to be AOT compiled for use with GraalVM and/or Quarkus)
- Move to standard maven project structure (Ant build still available but will be removed in future)
- Publish build artifacts to maven central singingbush group on maven.org
- Remove dependency on Avalon-Framework (in version 2.3.0 and above, Avalon was retired years ago. See: #15)
- Improve Test Coverage (this is ongoing but better than it was)
- Publish JaCoCo report results
- Add static analysis (SonarCloud, CodeQL, and Qodana)
- Pulling in various svn patches and git merge requests
- Either remove or update the Saxon code to support the latest Saxon EE version**
** Support for Saxon was never published to Maven central before and these days Saxonica ship 3 versions (Saxon-HE, Saxon-PE, and Saxon-EE). The first of which (Home Edition) is available via maven central but the net.sf.saxon.style.ExtensionElementFactory class that is required is not available. Saxon EE is now available via Saxonica's maven repository so it may be able to revive the code to use Saxon 11 or 12. If this proves to be a pain then the related code will be removed.
This fork should work as a drop in replacement of net.sf.barcode4j:barcode4j:2.1
for most users. Please note however that the original was a fat-jar that included classes that are now in the barcode4j-ant
, barcode4j-cli
, barcode4j-servlet
, and barcode4j-xalan
sub-modules. The singingbush barcode4j is more aligned to the barcode4j-light package that was last released in 2008.
That said, if you've been using net.sf.barcode4j:barcode4j:2.1
then switching to the latest com.singingbush:barcode4j:2.+
should simply be a case of choosing the dependencies you require. In most cases this is likely to be a combination of com.singingbush:barcode4j:2.+
and com.singingbush:barcode4j-fop-ext:2.+
.
Initially the project will continue to be a compatible drop-in replacement for existing use of net.sf.barcode4j:barcode4j:2.1
:
- The v2.* releases will continue to have the existing org.krysalis.barcode4j package names.
- The barcode4j, barcode4j-fop-ext, barcode4j-xgc and barcode4j-xalan artifacts are published to maven central.
- The 2.2.3 release supports JDK 1.7 and above, from 2.3.0 JDK 8 is the minimum.
<dependency>
<groupId>com.singingbush</groupId>
<artifactId>barcode4j</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>com.singingbush</groupId>
<artifactId>barcode4j-xalan</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>com.singingbush</groupId>
<artifactId>barcode4j-xgc</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>com.singingbush</groupId>
<artifactId>barcode4j-fop-ext</artifactId>
<version>2.3.1</version>
</dependency>
- The 2.3.1 release supports JDK 1.8 and above
- Drop all uses of the now defunct Avalon Framework. See issue #15
- Remove the Ant build
In version 3 the project will continue to be compatible for the most part. Older JDK's won't be supported but most users will not be affected.
The only changes required by users will be to change import paths to the newer package name:
- Package names will be updated to com.singingbush.barcode4j equivalent
- Drop support for JDK 8 (support JDK 11 and above)
- Saxon support will be updated to work with the latest Saxon EE (Saxonica now have a Maven repository for Saxon EE)
- Support Java modules (JPMS) via proper use of module-info.java files in the source
mvn package