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

Automate deployment to Maven / Gradle repositories #320

Open
drywolf opened this issue Jul 27, 2017 · 2 comments
Open

Automate deployment to Maven / Gradle repositories #320

drywolf opened this issue Jul 27, 2017 · 2 comments

Comments

@drywolf
Copy link
Contributor

drywolf commented Jul 27, 2017

In the current implementation of the build-system I tried to automate the specification of the J2V8 platform, architecture and version in the Maven pom.xml to come closer to a fully automated build / deployment pipeline (see #261)

But it seems that the approach that I took is not really recommended, since maven even explicitely warns about it in each run:

[WARNING] Some problems were encountered while building the effective model for com.eclipsesource.j2v8:j2v8_win32_x64:bundle:${env.J2V8_FULL_VERSION}
[WARNING] 'artifactId' contains an expression but should be a constant. @ com.eclipsesource.j2v8:j2v8_${os}${arch}:${env.J2V8_FULL_VERSION}, C:\code\Github-Fork\J2V8\pom.xml, line 12, column 15
[WARNING] 'version' contains an expression but should be a constant. @ com.eclipsesource.j2v8:j2v8
${os}${arch}:${env.J2V8_FULL_VERSION}, C:\code\Github-Fork\J2V8\pom.xml, line 13, column 12
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ com.eclipsesource.j2v8:j2v8
${os}${arch}:${env.J2V8_FULL_VERSION}, C:\code\Github-Fork\J2V8\pom.xml, line 76, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.felix:maven-bundle-plugin is missing. @ com.eclipsesource.j2v8:j2v8
${os}_${arch}:${env.J2V8_FULL_VERSION}, C:\code\Github-Fork\J2V8\pom.xml, line 88, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]

For a better solution that still solves the problem I think about parsing the XML of the Maven pom and putting the appropriate values directly into the XML.

I am not sure if grade would have a similar problem, because there I used the same approach (via environment variables) at least for setting the current version number of the J2V8 bundle.

@irbull I have no experience deploying Maven or Gradle bundles to the public repositories, do you have any hints for me about the points above ? Or any other points that should be considered for potentially automating the deployment of J2V8 bundles to the public Maven & Gradle repositories ?

Thanks

@matiwinnetou
Copy link
Contributor

Maybe silly question but do we have to have both maven and gradle?

@drywolf
Copy link
Contributor Author

drywolf commented Jul 29, 2017

From the deployment perspective I can't really tell if there are pros/cons of having both, since I have no experience hosting either artifacts publicly.
But from the build-system side of things, for Android builds using gradle is so much better than using maven (also there is a dedicated blog post about this topic).

If there would be benefits in moving everything over to gradle and remove the maven parts, or if there are still some legitimate reasons to have both systems in place @irbull would have to answer that.

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