Insert licence in Maven dependency

2019-09-16 06:44发布

I've made some tests using JxBrowser and intend to add it to my academic project.

However, it is a Maven project, which I develop using the Netbeans IDE, and although I added the TeamDev JxBrowser repository, the JxBrowser dependency in the pom.xml file and tried to manually insert the licence.jar that I acquire, it is failing to execute properly.

Maybe the issue is the fact that I am downloading the library by its repository and the license is a separated file.

I also upload an attachment that illustrates my problem and the message displayed when I execute the method that uses JxBrowser; it says that I don't have a valid license, although I manually inserted my licence.jar as a local dependency.

Could you please help me through this? What should I do? I really have high hopes about using JxBrowser in my project.

Netbeans Display

2条回答
The star\"
2楼-- · 2019-09-16 06:57

Extract the licence.jar (it's just a zip file), you will get META-INF/teamdev.licenses file Put it in

src/main/java/resources/META-INF/teamdev.licenses

查看更多
放我归山
3楼-- · 2019-09-16 06:58

EDIT: I discovered that I wasn't referencing the proper jar file, but the one in the com.teamdev.jxbrowser repository (default trial version), not the one that I have in my local machine; in that case, after the 30 days trial expired, I am not able to use the Jxbrowser anymore, even thought I have the proper jar file. So, I still have the same problem, I am uploading the error message in netbeans and some parts of my pom.xml file that references to the licence.jar in my computer. I also have tried manually inserted the jar again, not obtaining any success.

<repository>
   <id>mylibid</id>
   <url>file:${basedir}</url>
</repository>
<dependency>
  <groupId>mylibid</groupId>
  <artifactId>licence</artifactId>
  <version>1.0</version>
  <type>jar</type>
  <scope>provided</scope>
</dependency>

NETBEANS COMPILING/EXECUTING MESSAGES

I manually inserted the licence.jar file in a new dependency, but on the artifact's <groupId> I put the com.teamdev.jxbrowser (the same on as the JxBrowser dependency on the pom.xml file); and NetBeans automatically linked the licence with the .jars in the library.

Hope it could help someone that might have some similar doubt.

查看更多
登录 后发表回答