Skip to content

Commit

Permalink
Merge pull request #256 from melloware/255
Browse files Browse the repository at this point in the history
Fix #255: Switch to Quarkus Barcode ZXing
  • Loading branch information
FroMage authored Nov 4, 2024
2 parents e0dc193 + bbfa9f4 commit 8d0706c
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 166 deletions.
11 changes: 3 additions & 8 deletions barcode/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,9 @@
<artifactId>quarkus-core</artifactId>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>${zxing.version}</version>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>javase</artifactId>
<version>${zxing.version}</version>
<groupId>io.quarkiverse.barcode</groupId>
<artifactId>quarkus-zxing</artifactId>
<version>${quarkiverse.zxing.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down
139 changes: 0 additions & 139 deletions barcode/src/main/java/io/quarkiverse/renarde/barcode/Barcode.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.quarkiverse.renarde.barcode.runtime;

import io.quarkiverse.renarde.barcode.Barcode;
import io.quarkiverse.barcode.zxing.ZebraCrossing;
import io.quarkus.qute.EngineConfiguration;
import io.quarkus.qute.SectionHelperFactory;

@EngineConfiguration
public class QuteCode128Code extends QuteBarCode implements SectionHelperFactory<QuteBarCode.CustomSectionHelper> {

public QuteCode128Code() {
super("code128", Barcode::code128Img);
super("code128", ZebraCrossing::code128Img);
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.quarkiverse.renarde.barcode.runtime;

import io.quarkiverse.renarde.barcode.Barcode;
import io.quarkiverse.barcode.zxing.ZebraCrossing;
import io.quarkus.qute.EngineConfiguration;
import io.quarkus.qute.SectionHelperFactory;

@EngineConfiguration
public class QuteCode39Code extends QuteBarCode implements SectionHelperFactory<QuteBarCode.CustomSectionHelper> {

public QuteCode39Code() {
super("code39", Barcode::code39Img);
super("code39", ZebraCrossing::code39Img);
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.quarkiverse.renarde.barcode.runtime;

import io.quarkiverse.renarde.barcode.Barcode;
import io.quarkiverse.barcode.zxing.ZebraCrossing;
import io.quarkus.qute.EngineConfiguration;
import io.quarkus.qute.SectionHelperFactory;

@EngineConfiguration
public class QuteCode93Code extends QuteBarCode implements SectionHelperFactory<QuteBarCode.CustomSectionHelper> {

public QuteCode93Code() {
super("code93", Barcode::code93Img);
super("code93", ZebraCrossing::code93Img);
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.quarkiverse.renarde.barcode.runtime;

import io.quarkiverse.renarde.barcode.Barcode;
import io.quarkiverse.barcode.zxing.ZebraCrossing;
import io.quarkus.qute.EngineConfiguration;
import io.quarkus.qute.SectionHelperFactory;

@EngineConfiguration
public class QuteDataMatrix extends QuteBarCode implements SectionHelperFactory<QuteBarCode.CustomSectionHelper> {

public QuteDataMatrix() {
super("datamatrix", Barcode::dataMatrixImg);
super("datamatrix", ZebraCrossing::dataMatrixImg);
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.quarkiverse.renarde.barcode.runtime;

import io.quarkiverse.renarde.barcode.Barcode;
import io.quarkiverse.barcode.zxing.ZebraCrossing;
import io.quarkus.qute.EngineConfiguration;
import io.quarkus.qute.SectionHelperFactory;

@EngineConfiguration
public class QuteEan13Code extends QuteBarCode implements SectionHelperFactory<QuteBarCode.CustomSectionHelper> {

public QuteEan13Code() {
super("ean13", Barcode::ean13Img);
super("ean13", ZebraCrossing::ean13Img);
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.quarkiverse.renarde.barcode.runtime;

import io.quarkiverse.renarde.barcode.Barcode;
import io.quarkiverse.barcode.zxing.ZebraCrossing;
import io.quarkus.qute.EngineConfiguration;
import io.quarkus.qute.SectionHelperFactory;

@EngineConfiguration
public class QuteEan8Code extends QuteBarCode implements SectionHelperFactory<QuteBarCode.CustomSectionHelper> {

public QuteEan8Code() {
super("ean8", Barcode::ean8Img);
super("ean8", ZebraCrossing::ean8Img);
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.quarkiverse.renarde.barcode.runtime;

import io.quarkiverse.renarde.barcode.Barcode;
import io.quarkiverse.barcode.zxing.ZebraCrossing;
import io.quarkus.qute.EngineConfiguration;
import io.quarkus.qute.SectionHelperFactory;

@EngineConfiguration
public class QuteQrCode extends QuteBarCode implements SectionHelperFactory<QuteBarCode.CustomSectionHelper> {

public QuteQrCode() {
super("qrcode", Barcode::qrCodeImg);
super("qrcode", ZebraCrossing::qrCodeImg);
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.quarkiverse.renarde.barcode.runtime;

import io.quarkiverse.renarde.barcode.Barcode;
import io.quarkiverse.barcode.zxing.ZebraCrossing;
import io.quarkus.qute.EngineConfiguration;
import io.quarkus.qute.SectionHelperFactory;

@EngineConfiguration
public class QuteUpcACode extends QuteBarCode implements SectionHelperFactory<QuteBarCode.CustomSectionHelper> {

public QuteUpcACode() {
super("upca", Barcode::upcAImg);
super("upca", ZebraCrossing::upcAImg);
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.quarkiverse.renarde.barcode.runtime;

import io.quarkiverse.renarde.barcode.Barcode;
import io.quarkiverse.barcode.zxing.ZebraCrossing;
import io.quarkus.qute.EngineConfiguration;
import io.quarkus.qute.SectionHelperFactory;

@EngineConfiguration
public class QuteUpcECode extends QuteBarCode implements SectionHelperFactory<QuteBarCode.CustomSectionHelper> {

public QuteUpcECode() {
super("upce", Barcode::upcEImg);
super("upce", ZebraCrossing::upcEImg);
}
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus.version>3.15.0.CR1</quarkus.version>
<openhtmltopdf.version>1.1.16</openhtmltopdf.version>
<zxing.version>3.5.1</zxing.version>
<quarkiverse.pdfbox.version>1.0.0</quarkiverse.pdfbox.version>
<quarkiverse.zxing.version>0.0.2</quarkiverse.zxing.version>
</properties>
<dependencyManagement>
<dependencies>
Expand Down

0 comments on commit 8d0706c

Please sign in to comment.