eclipsesource / eclipsesource/J2V8

Automate deployment to Maven / Gradle repositories

Open
#320 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.6k
Forks
387
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/eclipsesource/J2V8/blob/master/build.gradle#L6) (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](https://search.maven.org/) & [Gradle](http://central.sonatype.org/pages/gradle.html) repositories ?

Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.