Hi, everyone !
I am new at Primefaces and I am trying to use the QR Code Generator from <p:barcode> component. I am having trouble generating them. I am not sure which .jar files should I include in my project path. I have tried with barcode4j-light and qrgen, but then the server won't start. Then I included zxing-core-2.0 and zxing-javase, but also without luck at the end. Am I missing something? On showcases there is nothing about dependencies.
Best regards,
Stefan Puhalo
QR Code
-
- Posts: 84
- Joined: 11 Sep 2014, 10:13
- Location: Brussels, Belgium
Do you use a build tool? Something like maven or anything else?
Primefaces 6.1+
Wildfly 11
Wildfly 11
-
- Posts: 84
- Joined: 11 Sep 2014, 10:13
- Location: Brussels, Belgium
Which version of Primefaces do you use *exactly*?
Primefaces 6.1+
Wildfly 11
Wildfly 11
-
- Posts: 84
- Joined: 11 Sep 2014, 10:13
- Location: Brussels, Belgium
I see a conflict between what Maven does and what I see in the Primefaces User manual. Maven uses qrgen version 1.4 (as expected) but barcode4j-light in version 2.0 (not 2.1). Maybe because at the time of writing, version 2.1 was not available in the maven repository (it is meanwhile). There are also transitive dependencies that Maven sees, so I would suggest, you put the following libs on your classpath and try again:
Those marked down in the user manual. Not sure about barcode-light, whether to use 2.1 or 2.0
transitive dependeny of barcode-light ... add only if it is not yet on your classpath
Transitive dependeny of qrgen ... add only if it is not yet on your classpath
Good luck and let me know!
Those marked down in the user manual. Not sure about barcode-light, whether to use 2.1 or 2.0
Code: Select all
<dependency>
<groupId>net.glxn</groupId>
<artifactId>qrgen</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>net.sf.barcode4j</groupId>
<artifactId>barcode4j-light</artifactId>
<version>2.1</version> //try 2.0 as well maybe ....
</dependency>
Code: Select all
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.3.04</version>
</dependency>
Code: Select all
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>javase</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>3.0.0</version>
</dependency>
Good luck and let me know!
Primefaces 6.1+
Wildfly 11
Wildfly 11
-
- Posts: 84
- Joined: 11 Sep 2014, 10:13
- Location: Brussels, Belgium
Actually, this is pretty normal. Each software vendor keeps a keen eye on their direct dependencies. This is what Primefaces did, they documented those two and they were done. Documenting dependencies of the dependencies is a tedious process because after each new release (of other groups!) you would need to check these foreign projects for removed/added dependencies. I'd rather see them directing their attention to PF issues than this kind of repetitive tasks.
I know that it might seem a bit frustrating for you but dependency management is a super-well understood (although not trivial) issue that can be automatically solved for 99% of all cases by using a build tool. If I was in a place to give you advice, I would tell you to get started with Maven (if you have some affinity with XML) or Gradle (a more modern approach) or another of these tools I am not as familiar with. It will get your skills as a Software Engineer to the next level.
Heads up and have fun with QR codes!
I know that it might seem a bit frustrating for you but dependency management is a super-well understood (although not trivial) issue that can be automatically solved for 99% of all cases by using a build tool. If I was in a place to give you advice, I would tell you to get started with Maven (if you have some affinity with XML) or Gradle (a more modern approach) or another of these tools I am not as familiar with. It will get your skills as a Software Engineer to the next level.
Heads up and have fun with QR codes!
Primefaces 6.1+
Wildfly 11
Wildfly 11
-
- Information
-
Who is online
Users browsing this forum: No registered users and 35 guests