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

Plan to publish to Maven repository? #1

Open
mquan86 opened this issue Jan 10, 2025 · 6 comments
Open

Plan to publish to Maven repository? #1

mquan86 opened this issue Jan 10, 2025 · 6 comments

Comments

@mquan86
Copy link

mquan86 commented Jan 10, 2025

Hi,

Thanks for this great work. But at the moment I concern do you have any plan to publish this to central maven repository?
The reason is I don't want to depend on someone mirror that may be offline tomorrow or next year, then my project build will fail.

@eureka-bpo
Copy link
Owner

Hello,
it was already published and will be published in future.

@mquan86
Copy link
Author

mquan86 commented Jan 13, 2025

@eureka-bpo
I saw it before, but I don't think it works or completed.

e.g. version 4.18 depends on a lot other BIRT artifacts and those are not available in Maven central repo (see screenshot)

2025-01-13_13-27-50

Or in other words, if I add below to my Gradle build file:
implementation 'eu.eureka-bpo.birt:org.eclipse.birt.runtime:4.18.0.0'

then the build will fail as below error:

> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find org.eclipse.birt:org.eclipse.birt.report.data.oda.jdbc:4.18.0.v202409161007.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/org/eclipse/birt/org.eclipse.birt.report.data.oda.jdbc/4.18.0.v202409161007/org.eclipse.birt.report.data.oda.jdbc-4.18.0.v202409161007.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > eu.eureka-bpo.birt:org.eclipse.birt.runtime:4.18.0.0
   > Could not find org.eclipse.birt:org.eclipse.birt.report.engine.fonts:4.18.0.v202409161007.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/org/eclipse/birt/org.eclipse.birt.report.engine.fonts/4.18.0.v202409161007/org.eclipse.birt.report.engine.fonts-4.18.0.v202409161007.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > eu.eureka-bpo.birt:org.eclipse.birt.runtime:4.18.0.0
   > Could not find org.eclipse.birt:uk.co.spudsoft.birt.emitters.excel:4.18.0.v202411091916.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/org/eclipse/birt/uk.co.spudsoft.birt.emitters.excel/4.18.0.v202411091916/uk.co.spudsoft.birt.emitters.excel-4.18.0.v202411091916.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > eu.eureka-bpo.birt:org.eclipse.birt.runtime:4.18.0.0
   > Could not find org.eclipse.birt:org.eclipse.birt.axis.overlay:4.18.0.v202409161007.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/org/eclipse/birt/org.eclipse.birt.axis.overlay/4.18.0.v202409161007/org.eclipse.birt.axis.overlay-4.18.0.v202409161007.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > eu.eureka-bpo.birt:org.eclipse.birt.runtime:4.18.0.0
   > Could not find org.eclipse.birt:org.eclipse.birt.chart.device.extension:4.18.0.v202409161007.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/org/eclipse/birt/org.eclipse.birt.chart.device.extension/4.18.0.v202409161007/org.eclipse.birt.chart.device.extension-4.18.0.v202409161007.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > eu.eureka-bpo.birt:org.eclipse.birt.runtime:4.18.0.0

@eureka-bpo
Copy link
Owner

Errors are shown correct: corresponding artifacts/versions are not published in maven central. As described on maven-birt-artifacts homepage, it is necessary to add repository to your pom.xml.

        <repositories>
		<repository>
			<id>birt-4.18.0</id>
			<url>https://p2repository.com/mvn4/birt-4.18.0/</url>
		</repository>
	</repositories>

Addition of this repository makes artifacts accessible.

@mquan86
Copy link
Author

mquan86 commented Jan 15, 2025

@eureka-bpo, and exactly that is the problem I mentioned originaly. If I add your repo url, it will works, but then mean my project build depends on your repo. If tomorrow you shutdown the repo, my project stop working. Of course you don't do it, but nothing guaranteed in long term such as next year you are out of budget and decide to shutdown server...
I prefer to have them on maven central officialy, so the avialability is guranteed.

Did I understand correct the you own domain and host of p2repository.com? Or did I missunderstand it?

@eureka-bpo
Copy link
Owner

eureka-bpo commented Jan 15, 2025

The reasons why BIRT artifacts are not published in Maven Central are explained in detail. The main reason is the difference in dependency resolving between p2 and Maven repositories.

The problem you mentioned can be resolved by creating a corporate caching repository. Artifacts can be added to it using a specially designed script (as you had written absolutely correct) or during the process of downloading artifacts from the p2 repository. A caching repository ensures the availability of artifacts even if the original repository becomes unavailable.

This diagram explains, how p2repository.com works. This is a service, algorithm, not a data/file storage. Consider p2repository.com as a converter (on the fly) of p2 repository into maven format.

@mquan86
Copy link
Author

mquan86 commented Jan 20, 2025

The problem you mentioned can be resolved by creating a corporate caching repository
This is not possible in my use case usually because:

  • If my hobby project, I don't want to create my own caching repo.
  • If company project, I don't think it will easy to convience IT department to allow host a caching repo or even it will trigger multiple questions from them that "where is that file from, how safe it is...". You know, typical security challenge in coporate...

I beleive you have answered all concern and pretty much there is nothing else rather waiting for eclipse-birt/birt#625

Initial I thought you may think about different plan such as publish all other dependencies to maven under your artifact id "eu.eureka-bpo.birt" and change pom file to point to those.... something like that.

Anyway, thank you so much for your work. Most likely I still get stuck with fat jar 4.8.0
You can close the case now if you have no other plans.

Thank you so much for your dedicated work.

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

2 participants