I see references to both on line but can't find out why. Is there a difference? If so, how?
maven-rpm-plugin is an older version of the plugin (which I suspect works with maven-1). rpm-maven-plugin is the one which works with the current versions of maven. You should be using this.
Related
I am working on enhancing the versions-maven-plugin. I want to tentatively modify the pom.xml files for a project, then look at the version conflicts of the modified pom.xml to decide what modifications should be kept. I have found MavenXpp3Reader.read(String) that returns a Model but it is very raw. I not only need the version properties to be resolved, but I also need transitive dependencies, or even better, the version conflicts. Can anyone provide some help? I remember hearing about aether and found out that it was renamed to maven-resolver-provider, but I'm not sure that I should be using that in a plugin, or even if I should, I don't know how to use it. Can anyone help?
FWIW, the exact issue I'm working on is https://github.com/mojohaus/versions-maven-plugin/issues/270
I have two modules: A and B.
A depends from B.
In the module A there is a dependency to B with the following version setting: [1.0.0,)
From the B there are two versions: 1.0.0-1 and 1.0.0-2. The 1.0.0-1 is out of date, it has some missing dependencies, hence I cannot create a build from it. But the 1.0.0-2 is working fine.
When I use the install for the module A I get an error that B:1.0.0-1 has a missing dependency.
That's happening because the maven downloaded all the versions from the 1.0.0 not just the last one.
If I would use LATEST then just the 1.0.0-2 would be downloaded, but it's not what I want. Basically I would like to download just the latest from the 1.0.0.
How could I do this ?
Thank you for the answers!
(Maven version: 3.5.0)
First don't use versions ranges cause they make your build non reproducible.. If you like to update things like that you can use versions-maven-plugin to update the dependency. Apart from that what is the difference between 1.0.0-1 and 1.0.0-2..From your explanations i would assume you should change your versions schema cause the second one is not compatible with the first one so I would say 2.0.0 instead of 1.0.0-2..or is see it as a bug fix than 1.0.1...(following semver). Another point LATEST is marked deprecated for a long time and will produce a WARNING in the next Maven versions..
Coming to you explanations: I have my doubts that all artifacts are being downloaded...If you take a look at the logging output I assume there are some line saying ...maven-metadata.xml will be downloaded...
First part of the answer...
In the src/test/resources folder of a maven project there's a relative symbolic link.
With the 2.6 version of the plugin, the actual file is copied.
After updating to the 3.0.1 version, it copies the link instead of the file and on a subsequent run (without clean) fails (mvn -e shows it's because of a FileAlreadyExistsException).
Is there any config option to restore the behavior from the previous version ?
I agree, having a link as a test resource is a really bad idea.
This is a known bug in the maven-resources-plugin: MRESOURCES-237 Resource plugin’s handling of symbolic links changed in 3.0.x, broke existing behaviour, unfixed but known for 1½ years.
Unfortunately, there’s not (yet) a configuration option. Introducing it (and defaulting it to “follow symlinks” instead of copy-preserving them) would fix this issue.
For now, the only solution is to downgrade the maven-resources-plugin. I also upgraded from 2.6, and have just now downgraded to 2.7 (last of the 2.x series), and can confirm that it works around this bug and properly copies the symlinks’ contents.
Update: due to the “Mark invalid” issue (a bug in maven-filtering) you should consider staying with 2.6 if you don’t need any of the new 2.7 features, or have to amend the plugin definition with an updated dependency on maven-filtering 1.3 (or maybe newer).
I am trying out Spring Roo 1.2.2 and can't get past this error:
roo> hint
Version is required for org.apache.maven.plugins:maven-compiler-plugin
My maven version: Apache Maven 2.2.1
Appreciate any help.
Update:
Changing the directory and trying again makes it disappear! But I would still like to know what it was looking at, thanks.
Roo 1.2.2 has issues working with maven plugin versions. You will need to make sure that all your plugin declarations in every module have version tag specified. Similar problem is described here http://forum.springsource.org/showthread.php?132520-Multimodule-application-issue-Spring-Roo-1-2-2
Besides that I assume that you are trying to use Roo 1.2.2. on existing codebase. Than you need to follow this http://static.springsource.org/spring-roo/reference/html/existing.html
Although it is not said in this documentation, you possibly will need Maven 3 (3.0.4 comes with Roo/STS distribution) I suggest using this. It would be better first to migrate your project to Maven 3.
You should always start roo in an empty directory (or already existing roo project directory) because the working directory is scanned by roo. In your case a POM is probably detected.
Also notice that roo becomes very slow when working from a "crowded" directory.
I try, but didn't found any information about what difference between e.g. 2.0 and 2.2 maven war plugin. Does it possible to find?
Thanks.
You can view release notes here. Unfortunately, I didn't find any way to specify 2 versions.
The best thing is to look at the change log
http://jira.codehaus.org/browse/MWAR#selectedTab=com.atlassian.jira.plugin.system.project%3Achangelog-panel