Giter VIP home page Giter VIP logo

Comments (11)

stefanseifert avatar stefanseifert commented on August 15, 2024 1

i'll take a look. the ITs do not run on windows, but that should be fixed easily.

from build-helper-maven-plugin.

stefanseifert avatar stefanseifert commented on August 15, 2024 1

the PR #84 is not sufficient - it works only when the parent pom = aggregation root pom. if you have a parent that is a child pom separate from the aggregation root pom it returns the path of the parent pom which is not the intention.

i've created a new PR #92 which should work in all cases.
@kriegaex @tmcsantos can you verify that the PR works in your scenarios as well?

from build-helper-maven-plugin.

nadilas avatar nadilas commented on August 15, 2024

Did you mean this issue by that?

[INFO] Processing change of org.identifier:SubModule:1.0.139-SNAPSHOT -> 1.0.140-SNAPSHOT
[DEBUG] Applying change null:SubMlodule:1.0.139-SNAPSHOT -> 1.0.140-SNAPSHOT
[ERROR] Failed to execute goal org.codehaus.mojo:versions-maven-plugin:2.2:set (default-cli) on project SubModule: Execution default-cli of goal org.codehaus.mojo:versions-maven-plugin:2.2:set failed. NullPointerException -> [Help 1]

from build-helper-maven-plugin.

khmarbaise avatar khmarbaise commented on August 15, 2024

This is related to versions-maven-plugin. Apart from that you are referencing a very old version. This issue of the versions-maven-plugin has already been fixed with version 2.4...

from build-helper-maven-plugin.

kriegaex avatar kriegaex commented on August 15, 2024

This issue has been open for more than 3 years, the rootlocation goal is useless in multi-module builds (and in single-module builds nobody needs it). Is anything wrong with PR #48? Can someone please review it, then merge and/or manually fix the problem and release a new version? That would be wonderful.

BTW, it is not just mvn -pl submodule package being problematic, but e.g. also in IntelliJ IDEA when double-clicking on a goal or phase in a sub-module, it runs the build with

java -Dmaven.multiModuleProjectDirectory=/path/to/submodule (...) verify

which means that I cannot use ${maven.multiModuleProjectDirectory} (which is meant for internal use only anyway according to some a comment by @khmarbaise on StackOverflow), so if I do need a path relative to the project root in order to e.g. run tests with Java agents build in some sub-modules and used in others, a relative path from one module to the other just won't do in all situations because it depends from which module directory I run a build. I will never understand why Maven does not expose the project root directory as a core feature, but at least if this would work I could use the Build Helper.


Update: Just as a related background info why it would be nice to get this feature fixed, here are the problems I have with maven.multiModuleProjectDirectory in IntelliJ IDEA:

from build-helper-maven-plugin.

kriegaex avatar kriegaex commented on August 15, 2024

A quick test indicates that this seems to work from the command line, unless when I am running any tests based on it from IntelliJ IDEA, either via Maven from the IDE or directly by running tests from there. But that is of course not a problem in the plugin but IDEA's inability to recognise and import the variable from the goal.

I did not do a thorough test with different types of projects and situations, just some builds from both root directory and from a sub-module directory with the default settings for the goal. It seems to be working nicely now. Before it was not working at all.

I am not an expert in Maven or this plugin, but you get my thumbs up.

I think @khmarbaise is much more qualified to tell if this is as it should be for all cases, including edge ones.

from build-helper-maven-plugin.

kriegaex avatar kriegaex commented on August 15, 2024

Oh, I forgot a detail: The build in your branch runs with version number 3.1.0-SNAPSHOT, but 3.1.0 is the current release already. Should it not rather be 3.1.1-SNAPSHOT then?

from build-helper-maven-plugin.

kriegaex avatar kriegaex commented on August 15, 2024

OMG, I just noticed why I had the wrong snapshot version: I accidentally built and tested the original PR, not the improved one. Yours links to the original and I just clicked the wrong link in order to get to the repository to clone from. GitHub really should provide a direct clone URL right from the PR without having to navigate first.

Your PR also works for me, but I did not test against a project where the aggregator POM is not the project parent POM at the same time. I trust you did that.

from build-helper-maven-plugin.

kriegaex avatar kriegaex commented on August 15, 2024

Quick question: Yesterday you released the new version 3.2.0, but it still is unavailable on Maven Central. Usually my experience when releasing to Central is that it does not take that long to be published. Did you maybe forget to deploy the artifact?

from build-helper-maven-plugin.

stefanseifert avatar stefanseifert commented on August 15, 2024

it's under voting process which takes at least 72h - see mail thread
if no objection is raised it's published to maven central when the voting is completed.

from build-helper-maven-plugin.

kriegaex avatar kriegaex commented on August 15, 2024

Oh, of course. Stupid me! This is OSS with a release process, not my private project which I can push to Maven Central anytime.

from build-helper-maven-plugin.

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.