Comments (6)
There's nothing like that built in to the versions plugin.
There is a relevant question on StackOverflow which suggests several ways you can use the exec-maven-plugin to accomplish this.
The solution I typically use is:
mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec
from versions.
I think there isn't. On the most cases that I needed a functionality like this, I've just read the project's version from the xml, throught an ant script, or somethis so.
from versions.
Something like this:
mvn help:evaluate -Dexpression=project.version
is too simple?
from versions.
I want to be able to store the result as a bash variable, so that dumps out too much output. I just assumed some such feature would be available in the "versions" plugin, seeing as you can change/update them, why not share what it is before updating?
The the solution I have been using is the same as mentioned above:
mvn -q \ -Dexec.executable="echo" \ -Dexec.args='${project.version}' \ --non-recursive \ org.codehaus.mojo:exec-maven-plugin:1.3.1:exec
from versions.
What do you mean by seeing as you can change/update them, why not share what it is before updating?
?
from versions.
Unfortunately no feedback
from versions.
Related Issues (20)
- NullPointerException when the version tag isn't specified HOT 2
- update-properties shouldn't lead to build success if encountering an invalid dependency HOT 2
- Huge decrease performance since 2.13 on goal update-properties with --update-snapshots HOT 2
- Can the ruleSet of the parent module be inherited? HOT 2
- Dom4j contains a XML Injection vulnerability
- Interaction between ranges/scope provokes NullPointerException HOT 4
- Plugin validation issues were detected (warning) HOT 4
- Versions Maven Plugin not showing latest plugins available with ignores. HOT 108
- display-dependency-updates only showing updates from the most major allowed segment? HOT 2
- VersionDetails API takes a version parameter while it already has that information – refactoring needed HOT 4
- Question: on ignoring versions HOT 5
- Updating parent-pom version in a multimodule project updates more than just the parent-pom version HOT 2
- Question about "versions:dependency-updates-report" HOT 3
- Release of 2.16.0
- use-latest-releases and use-latest-snapshot does not resolve properties from parent anymore HOT 2
- Support multiple values for multiple properties in 'set-property' HOT 4
- org.codehaus.mojo:versions-maven-plugin:2.16.0:display-dependency-updates failed: Cannot invoke "Object.toString()" because "otherVersion" is null HOT 7
- [feature] versions:parent-updates-report should respect reports format
- versions:property-updates-report xml report not showing currentVersion
- use-releases does not update parent HOT 2
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 versions.