Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maven3.8.2 build instructions for Jersey 3.0.1 #4844

Closed
pkcs11newbie opened this issue Aug 25, 2021 · 7 comments
Closed

maven3.8.2 build instructions for Jersey 3.0.1 #4844

pkcs11newbie opened this issue Aug 25, 2021 · 7 comments
Labels
question Further information is requested

Comments

@pkcs11newbie
Copy link

pkcs11newbie commented Aug 25, 2021

Hello

I'm looking for instructions to build jersey source code using maven.

So far,

  1. Installed and setup maven (3.8.2)
  2. Downloaded jersey source code from https://github.com/eclipse-ee4j/jersey/tree/3.0.1 and Unzipped it ( ex: D:\workdir\XXX\jersey3.0.1\jersey-3.0.1)
  3. D:\workdir\XXX\jersey3.0.1\jersey-3.0.1>mvn package -Dmaven.test.skip=true -PcheckstyleSkip

I ran into issue in regards to directory-maven-plugin:0.3.1:highest-basedir (directories), which after a lot of googling, came across stackoverflow user who suggested to use directory-of goal.
Attaching modified pom.xml for reference.
pom.txt

My expectation was to download jersey source code and built it using maven and generate the jersey jars that we need in our application. I wasn't expecting to make any changes to pom.xml, but then again I haven't much experience with maven. So, any help will be greatly appreciated.

Thanks..

@jansupol
Copy link
Contributor

jansupol commented Aug 25, 2021

Note that you can use git instead of zip (if you are not familiar with it):
git clone https://github.com/eclipse-ee4j/jersey.git <dir>
git checkout 3.0.1 to get 3.0.1
and then use maven.

I tried your way, but I could not reproduce your issue. Your output log, however, complains about org.apache.maven.plugins:maven-resources-plugin, and the copy-legaldocs execution. You may remove whole execution, it just adds legal documents to the jars.

Also you do not need to build Jersey, you may just download the jars from maven central.

@jansupol jansupol added the question Further information is requested label Aug 25, 2021
@pkcs11newbie
Copy link
Author

pkcs11newbie commented Aug 26, 2021

Hello,

Thank you for your response.

FYI, I removed the execution block as you mentioned, it still gave me the NPE issue.
Removed all executions from maven-resources-plugin artifactid
pom.txt
That seemed to do ok for a while but then gave me below error:
[ERROR] Bundle org.glassfish.jersey.core:jersey-common:jar:3.0.1 : Input file does not exist:

Just out of curiosity, what version of maven did you use ? Maybe I can try with that.

Appreciate your help.

Thanks...

@pkcs11newbie pkcs11newbie changed the title maven build instructions for Jersey 3.0.1 maven3.8.2 build instructions for Jersey 3.0.1 Aug 26, 2021
@jansupol
Copy link
Contributor

I tried with 3.8.2, it worked fine. Now maven-bundle-plugin in pom.xml has
<Include-Resource>{maven-resources},${project.build.directory}/legal</Include-Resource>. try to remove ${project.build.directory}/legal.

Did you acciddently erase the NOTICE.md and LICENSE.md files?

@pkcs11newbie
Copy link
Author

pkcs11newbie commented Aug 26, 2021

I'm sorry to bug but I think source of my problem is directory-maven-plugin not able to set the Highest basedir. I'm not sure why that could be the case.

I reverted all the changes to original pom.xml: pom.txt

If I modify the goal to be 'directory-of' ( or execution-root' ), in that case I think the relevant jars I'm looking for got built but fails for jersey-examples.

Thank you again for all your help..

@jansupol
Copy link
Contributor

jansupol commented Sep 3, 2021

I have tested it with maven 3.8.2 and it worked for me, but we have a report that the directory-maven-plugin works well only with maven 3.6.x. Can you test it?

@jansupol
Copy link
Contributor

jansupol commented Oct 6, 2021

It really looks like on some OS, directory-maven-plugin did not work with maven 3.8.2. Fortunately, there is recently version 1.0 of directory-maven-plugin released, which seem to working fine.

@jansupol
Copy link
Contributor

Fixed by #4886

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants