Giter VIP home page Giter VIP logo

Comments (9)

filip26 avatar filip26 commented on September 28, 2024 1

The easiest solution is to name android artifact like titanium-json-ld-androd or titanium-android and publish it as a separate artifact, including separate versioning, javadoc, and sources.

from titanium-json-ld.

filip26 avatar filip26 commented on September 28, 2024

Hi @CluEleSsUK,
the current pom.xml uses profiles to separate Java11 and Android -Pandroid builds, the same applies on deployment -Pmaven-central. Unfortunately, this approach does not allow to build and deploy both artifacts together.

We need to rethink this and find out the right solution. As I'm not an expert on maven nor nexus-staging-maven-plugin a help is needed and very welcome.

from titanium-json-ld.

CluEleSsUK avatar CluEleSsUK commented on September 28, 2024

I'm also no expert in maven or the nexus-staging plugin, but I'm happy to take a look. A cheap solution could be profiles for -Pmaven-central and -Pmaven-central-android - I'll see if I can come up with something tidier!

from titanium-json-ld.

filip26 avatar filip26 commented on September 28, 2024

The tricky part is how to build all the artifact together.

e.g.

titanium-json-ld-1.0.3.jar
titanium-json-ld-1.0.3-android.jar
titanium-json-ld-1.0.3-javadoc.jar
titanium-json-ld-1.0.3-sources.jar
titanium-json-ld-1.0.3.pom

Some recommend https://maven.apache.org/plugins/maven-toolchains-plugin/ to get different builds done at once, to get rid off the android profile.

from titanium-json-ld.

github-actions avatar github-actions commented on September 28, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment!

from titanium-json-ld.

pkozelka avatar pkozelka commented on September 28, 2024

Yes, separate module that gets always compiled. I believe it's best; conditional compilation is rarely a good thing in Java.

from titanium-json-ld.

filip26 avatar filip26 commented on September 28, 2024

@pkozelka The biggest downside of this approach is that it requires two pom.xml - one for JRE11 build and second one for JRE8. Beside duplicates in the files there is no IDE support (e.g. now, you can select a maven profile in Eclipse).

What about Gradle? Could that help?

from titanium-json-ld.

filip26 avatar filip26 commented on September 28, 2024

I've just run into toolchains.

Guide for Supporting Multiple Versions of Java (8, 11, 14) in Your Maven Project.

from titanium-json-ld.

filip26 avatar filip26 commented on September 28, 2024

Structure:

pom_parent.xml
pom.xml <- default, inherits pom_parent.xml
pom_jre8.xml <- android build, inherits pom_parent.xml

Use maven-flatten-plugin to get distributable pom

> export JAVA_HOME=<JDK11>
> mvn clean package

> export JAVA_HOME=<JDK8>
> mvn -f pom_jre8.xml clean package

from titanium-json-ld.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.