Skip to content

artnaseef/kafka-maven-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kafka Maven Plugin

A Maven plugin to start a Kafka broker during integration tests

Usage

Use in conjunction with the failsafe plugin to start the broker before integration tests and tear it down afterwards.

<build>
    <plugins>
       <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.14.1</version>
            <executions>
                <execution>
                    <goals>
                        <goal>integration-test</goal>
                        <goal>verify</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>com.github.charithe</groupId>
            <artifactId>kafka-maven-plugin</artifactId>
            <version>1.0.0</version>
            <configuration>
                <zookeeperPort>52181</zookeeperPort>
                <kafkaPort>59092</kafkaPort>
            </configuration>
            <executions>
                <execution>
                    <id>preintegration</id>
                    <phase>pre-integration-test</phase>
                    <goals>
                        <goal>start-kafka-broker</goal>
                    </goals>
                </execution>
                <execution>
                    <id>postintegration</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>stop-kafka-broker</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

About

Kafka Maven Plugin

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%