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

Sources jar contains absolute local path #428

Closed
gabro opened this issue Jan 14, 2020 · 4 comments
Closed

Sources jar contains absolute local path #428

gabro opened this issue Jan 14, 2020 · 4 comments

Comments

@gabro
Copy link

gabro commented Jan 14, 2020

The sources jar published on Maven contains an absolute local path to the licenses:

> jar -tf openhtmltopdf-pdfbox-0.0.1-RC19-sources.jar
META-INF/MANIFEST.MF
META-INF/
com/
com/openhtmltopdf/
com/openhtmltopdf/pdfboxout/
com/openhtmltopdf/pdfboxout/quads/
com/openhtmltopdf/pdfboxout/visualtester/
/
/Users/
/Users/daniel/
/Users/daniel/Documents/
/Users/daniel/Documents/workspace/
/Users/daniel/Documents/workspace/flyingsaucer/
/Users/daniel/Documents/workspace/flyingsaucer/target/
/Users/daniel/Documents/workspace/flyingsaucer/target/checkout/
/Users/daniel/Documents/workspace/flyingsaucer/target/checkout/openhtmltopdf-pdfbox/
/Users/daniel/Documents/workspace/flyingsaucer/target/checkout/openhtmltopdf-pdfbox/target/
/Users/daniel/Documents/workspace/flyingsaucer/target/checkout/openhtmltopdf-pdfbox/target/classes/
/Users/daniel/Documents/workspace/flyingsaucer/target/checkout/openhtmltopdf-pdfbox/target/classes/META-INF/
META-INF/maven/
META-INF/maven/com.openhtmltopdf/
META-INF/maven/com.openhtmltopdf/openhtmltopdf-pdfbox/
com/openhtmltopdf/pdfboxout/quads/KongAlgo.java
com/openhtmltopdf/pdfboxout/PdfBoxFontResolver.java
com/openhtmltopdf/pdfboxout/PdfBoxFastOutputDevice.java
com/openhtmltopdf/pdfboxout/PdfRendererBuilder.java
com/openhtmltopdf/pdfboxout/PdfBoxReplacedElementFactory.java
com/openhtmltopdf/pdfboxout/BookmarkElement.java
com/openhtmltopdf/pdfboxout/PdfBoxTextRenderer.java
/Users/daniel/Documents/workspace/flyingsaucer/target/checkout/openhtmltopdf-pdfbox/target/classes/META-INF/LICENSE-W3C-TEST
com/openhtmltopdf/pdfboxout/quads/Triangle.java
com/openhtmltopdf/pdfboxout/PdfBoxPerDocumentFormState.java
com/openhtmltopdf/pdfboxout/PdfBoxRawPDFontMetrics.java
com/openhtmltopdf/pdfboxout/PdfContentStreamAdapter.java
com/openhtmltopdf/pdfboxout/PdfBoxOutputDevice.java
com/openhtmltopdf/pdfboxout/PdfBoxAccessibilityHelper.java
com/openhtmltopdf/pdfboxout/PdfBoxForm.java
com/openhtmltopdf/pdfboxout/PdfBoxFastLinkManager.java
/Users/daniel/Documents/workspace/flyingsaucer/target/checkout/openhtmltopdf-pdfbox/target/classes/META-INF/LICENSE
META-INF/maven/com.openhtmltopdf/openhtmltopdf-pdfbox/pom.properties
com/openhtmltopdf/pdfboxout/PDFCreationListener.java
com/openhtmltopdf/pdfboxout/PdfBoxFSFontMetrics.java
com/openhtmltopdf/pdfboxout/PdfBoxObjectDrawerReplacedElement.java
com/openhtmltopdf/pdfboxout/PdfBoxUserAgent.java
com/openhtmltopdf/pdfboxout/PdfBoxLinkManager.java
com/openhtmltopdf/pdfboxout/visualtester/PdfVisualTester.java
com/openhtmltopdf/pdfboxout/PdfBoxFontContext.java
com/openhtmltopdf/pdfboxout/PdfBoxBookmarkManager.java
com/openhtmltopdf/pdfboxout/PdfBoxRenderer.java
com/openhtmltopdf/pdfboxout/PdfBoxReplacedElement.java
com/openhtmltopdf/pdfboxout/PagePosition.java
/Users/daniel/Documents/workspace/flyingsaucer/target/checkout/openhtmltopdf-pdfbox/target/classes/META-INF/LICENSE-LGPL-2.1.txt
com/openhtmltopdf/pdfboxout/PdfBoxSVGReplacedElement.java
com/openhtmltopdf/pdfboxout/PageSupplier.java
com/openhtmltopdf/pdfboxout/PdfBoxImageElement.java
com/openhtmltopdf/pdfboxout/PdfBoxFSFont.java
com/openhtmltopdf/pdfboxout/PdfBoxImage.java
com/openhtmltopdf/pdfboxout/DOMUtil.java
com/openhtmltopdf/pdfboxout/PdfRendererBuilderState.java
com/openhtmltopdf/pdfboxout/PdfBoxSlowOutputDevice.java
/Users/daniel/Documents/workspace/flyingsaucer/target/checkout/openhtmltopdf-pdfbox/target/classes/META-INF/LICENSE-LGPL-3.txt
META-INF/maven/com.openhtmltopdf/openhtmltopdf-pdfbox/pom.xml

Notice for instance:

/Users/daniel/Documents/workspace/flyingsaucer/target/checkout/openhtmltopdf-pdfbox/target/classes/META-INF/LICENSE-LGPL-2.1.txt

This is not a huge issue per se, but it causes some spurious errors in tools like Metals which reports a warning when trying to index the sources in that jar (see scalameta/metals#1304 for example)

@syjer
Copy link
Contributor

syjer commented Jan 15, 2020

I can confirm the issue.

It seems changing the various pom.xml from

<targetPath>${project.build.outputDirectory}/META-INF</targetPath>

to

<targetPath>META-INF</targetPath>

Is enough to fix the issue, I'll do a PR asap.

Now why only the sources .jar have this problem, is a nice mistery :)

danfickle added a commit that referenced this issue Jan 17, 2020
fix issue #428: use relative path instead of ${project.build.outputDirectory}/META-INF
@vstoykov
Copy link

vstoykov commented Mar 9, 2020

This is fixed in #430 right?

@syjer
Copy link
Contributor

syjer commented Mar 9, 2020

hi @vstoykov , yes I can confirm it's fixed now.

>wget https://repo1.maven.org/maven2/com/openhtmltopdf/openhtmltopdf-pdfbox/1.0.2/openhtmltopdf-pdfbox-1.0.2-sources.jar

>jar -tf openhtmltopdf-pdfbox-1.0.2-sources.jar 
META-INF/MANIFEST.MF
META-INF/
com/
com/openhtmltopdf/
com/openhtmltopdf/pdfboxout/
com/openhtmltopdf/pdfboxout/quads/
com/openhtmltopdf/pdfboxout/visualtester/
META-INF/maven/
META-INF/maven/com.openhtmltopdf/
META-INF/maven/com.openhtmltopdf/openhtmltopdf-pdfbox/
com/openhtmltopdf/pdfboxout/quads/KongAlgo.java
com/openhtmltopdf/pdfboxout/PdfBoxPerDocumentFormState.java
com/openhtmltopdf/pdfboxout/PageSupplier.java
com/openhtmltopdf/pdfboxout/PdfBoxObjectDrawerReplacedElement.java
com/openhtmltopdf/pdfboxout/PdfBoxImageElement.java
com/openhtmltopdf/pdfboxout/PdfBoxUserAgent.java
META-INF/LICENSE-LGPL-2.1.txt
com/openhtmltopdf/pdfboxout/PdfBoxSVGReplacedElement.java
com/openhtmltopdf/pdfboxout/PdfBoxFontResolver.java
com/openhtmltopdf/pdfboxout/PdfBoxFSFontMetrics.java
com/openhtmltopdf/pdfboxout/PdfBoxRawPDFontMetrics.java
com/openhtmltopdf/pdfboxout/PdfContentStreamAdapter.java
com/openhtmltopdf/pdfboxout/PdfBoxFastOutputDevice.java
com/openhtmltopdf/pdfboxout/PdfBoxImage.java
com/openhtmltopdf/pdfboxout/visualtester/PdfVisualTester.java
com/openhtmltopdf/pdfboxout/GradientHelper.java
com/openhtmltopdf/pdfboxout/PdfRendererBuilder.java
com/openhtmltopdf/pdfboxout/PdfBoxForm.java
com/openhtmltopdf/pdfboxout/PdfBoxRenderer.java
com/openhtmltopdf/pdfboxout/PdfBoxFastLinkManager.java
com/openhtmltopdf/pdfboxout/PdfBoxReplacedElement.java
com/openhtmltopdf/pdfboxout/PDFontSupplier.java
com/openhtmltopdf/pdfboxout/PagePosition.java
META-INF/LICENSE-LGPL-3.txt
META-INF/maven/com.openhtmltopdf/openhtmltopdf-pdfbox/pom.properties
com/openhtmltopdf/pdfboxout/PDFCreationListener.java
com/openhtmltopdf/pdfboxout/PdfBoxOutputDevice.java
com/openhtmltopdf/pdfboxout/PdfBoxFSFont.java
com/openhtmltopdf/pdfboxout/PdfBoxLinkManager.java
com/openhtmltopdf/pdfboxout/PdfBoxPDFReplacedElement.java
com/openhtmltopdf/pdfboxout/PdfBoxAccessibilityHelper.java
com/openhtmltopdf/pdfboxout/DOMUtil.java
com/openhtmltopdf/pdfboxout/PdfBoxFontContext.java
com/openhtmltopdf/pdfboxout/PdfRendererBuilderState.java
com/openhtmltopdf/pdfboxout/PdfBoxBookmarkManager.java
com/openhtmltopdf/pdfboxout/PdfBoxReplacedElementFactory.java
com/openhtmltopdf/pdfboxout/PdfBoxSlowOutputDevice.java
com/openhtmltopdf/pdfboxout/BookmarkElement.java
com/openhtmltopdf/pdfboxout/PdfBoxTextRenderer.java
META-INF/LICENSE
META-INF/maven/com.openhtmltopdf/openhtmltopdf-pdfbox/pom.xml
com/openhtmltopdf/pdfboxout/quads/Triangle.java
META-INF/LICENSE-W3C-TEST

@danfickle
Copy link
Owner

Thanks all, closing now.

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

No branches or pull requests

4 participants