maven dependency without version

Ok, I think I’m gonna answer it myself. Of course I took a look at dependency:tree, but all the dependencies that I mentioned were first-level members of the tree. What I failed to notice right away, is that dependencyManagement is not present in the parent, but it is however present in the submodules, and what … Read more

m2e error in MavenArchiver.getManifest()

I encountered the same issue after updating the maven-jar-plugin to its latest version (at the time of writing), 3.0.2. Eclipse 4.5.2 started flagging the pom.xml file with the org.apache.maven.archiver.MavenArchiver.getManifest error and a Maven > Update Project.. would not fix it. Easy solution: downgrade to 2.6 version Indeed a possible solution is to get back to … Read more

How to override maven property in command line?

See Introduction to the POM finalName is created as: <build> <finalName>${project.artifactId}-${project.version}</finalName> </build> One of the solutions is to add own property: <properties> <finalName>${project.artifactId}-${project.version}</finalName> </properties> <build> <finalName>${finalName}</finalName> </build> And now try: mvn -DfinalName=build clean package

Maven: Lifecycle vs. Phase vs. Plugin vs. Goal [closed]

A Maven lifecycle is an (abstract) concept that covers all steps (or better: all the steps the Maven designers decided to support) that are expected to occur in a project’s development lifetime. These steps (or stages) are called phases in Maven terminology. A Maven plugin is a container for/supplier of goals. Code implemented in goals … Read more

How to access maven.build.timestamp for resource filtering

I have discovered this article, explaining that due to a bug in maven, the build timestamp does not get propagated to the filtering. The workaround is to wrap the timestamp in another property: <properties> <timestamp>${maven.build.timestamp}</timestamp> <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format> </properties> Filtering then works as expected for buildTimestamp=${timestamp}

Run a single Maven plugin execution?

As noted in How to execute maven plugin execution directly from command line?, this functionality has been implemented as MNG-5768, and is available in Maven 3.3.1. The change will: extend direct plugin invocation syntax to allow optional @execution-id parameter, e.g., org.apache.maven.plugins:maven-remote-resources-plugin:1.0:process@executionId. So, as long as you give your execution an id: mvn sql:execute@specific-execution-id uses the … Read more