Skip to content

Maven Plugin for running Maven goals and commands sequentially or in parallel

License

Notifications You must be signed in to change notification settings

maciejwalkowiak/paseq-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paseq Maven Plugin

Logo

by @maciejwalkowiak

Paseq Maven Plugin executes series of commands or Maven goals sequentially or in parallel.

Example

Plugin has to be configured in build/plugins section of pom.xml:

<build>
    <plugins>
        <!-- ... -->
        <plugin>
            <groupId>com.maciejwalkowiak.paseq</groupId>
            <artifactId>paseq-maven-plugin</artifactId>
            <version>0.1.1</version>
            <configuration>
                <tasks>
                    <!-- runs docker-compose from 'etc' directory relative to pom.xml -->
                    <task>
                        <exec>
                            <directory>etc</directory>
                            <command>docker-compose up -d --wait</command>
                        </exec>
                    </task>
                    <!-- runs npx in a background process -->
                    <task>
                        <async>true</async>
                        <exec>
                            <command>npx run develop</command>
                        </exec>
                    </task>
                    <!-- runs spring-boot:run after previous sync task finishes -->
                    <task>
                        <goals>spring-boot:run</goals>
                    </task>
                </tasks>
            </configuration>
        </plugin>
        <!-- ... -->
    </plugins>
</build>

Then the series of commands can be executed with:

$ mvn paseq:exec

Configuration

Task can have either goals or exec configured:

  • goals - Maven goals or lifecycle phases. Can be either a list or comma-separated list
  • exec - executable run in a separate process. Must have command configured, and optionally can have directory which sets the directory in which the command gets executed
  • async - if task should be executed in the background thread. By default false
  • wait - if task should wait for all async tasks started before

Belt icons created by Freepik - Flaticon

About

Maven Plugin for running Maven goals and commands sequentially or in parallel

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages