Comments (11)
i'll take a look. the ITs do not run on windows, but that should be fixed easily.
from build-helper-maven-plugin.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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)
- Allow one to specify majorVersion and minorVersion when using released-version mojo
- Allow port ranges on reserve-network-port mojo
- released-version does not detect version if maven repository is not configured to look for snapshot
- The plugin does not execute with command line "mvn compile" as in the Maven Handbook. HOT 4
- Use `bsh-property` property for profile activation HOT 5
- Plugin does not honour the skip directive HOT 2
- timestamp-property setting pattern has no effect HOT 1
- Using parse-version with effective-pom generates invalid XML, adds <?xml...?> tag twice
- [RFE] attach-artifact: Add a ignoreIfMissing property to Artifact
- Quiet option for `regex-property` goal. HOT 2
- Please provide a `<skip>` option for each goal. HOT 1
- Feature request: Add version limits to released-version goal
- `regex-property` goal doesn't interpret `<replacement>` correctly, corrupting output
- Request: Capability to use goal "add-source" from the command line
- Option to override nextIncrementalVersion
- Fails the build when running using Maven 3.9.0 HOT 18
- Wrong encoding of pom file in maven central HOT 4
- Plugin should declare these Maven artifacts in `provided` scope HOT 2
- nextBuildNumber HOT 3
- Extension HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from build-helper-maven-plugin.