java - Maven: build tasks (updating/copying files etc) outside lifecycle? -


What is the popular approach to managing construction tasks while using Maven? I am currently using Maven for dependency management, but I need to define many "functions" which can be independent of any lifecycle like ant or rake; Just a simple "function" that, when named according to the names, is indexed, executes the sequence.

For example, a "work" user must take a jar file from one user in one of their Mewen modules in a local Mewen repository Install it by using the mvn install: install-file -DlocalRepositoryPath = repo command, and install pom.xml of that module to point to the new version of the jar with some of the lifecycle of this task Not to even do it, it's just a matter of talking to something special Amany work, so I do not have to manually do it, I want to type any time I like mvn task updates issued .

Another example would be a "work" that would remove the contents of one of the directories in my Maven module, and then the user provided the directory in the blank directory, then again, There is nothing to do with, but it is not good to do all the time manually.

How do people write these works - should this be a common problem? I know that Maven Enter provides the plugin, but as far as I know it can only be related to the steps of the Maven lifecycle, which is what I do not want. I can use the ant with the addition of a build.xml file, but it is unclear if I want to do Maven myself in any way. Also, to manage my project, both Maven and Ant are required. I will not be the right choice for you to build this kind of work.

However, you have other options if you want just dependency management, for example

  1. Gradle
  2. Ivy + Ant
  3. < / Ol>

    They give you direct support for dependency management using the Maven repository, yet you provide complete control over the flow of the build script.


Comments