@@ -0,0 +1,1977 @@
+package io.jean_eudes.maven;%0A%0Aimport static org.apache.maven.plugins.annotations.LifecyclePhase.POST_INTEGRATION_TEST;%0Aimport java.util.Properties;%0Aimport java.util.concurrent.TimeUnit;%0Aimport org.apache.maven.plugin.AbstractMojo;%0Aimport org.apache.maven.plugin.MojoExecutionException;%0Aimport org.apache.maven.plugin.MojoFailureException;%0Aimport org.apache.maven.plugins.annotations.Mojo;%0Aimport org.apache.maven.plugins.annotations.Parameter;%0Aimport kafka.admin.AdminUtils;%0Aimport kafka.utils.ZkUtils;%0Aimport scala.collection.*;%0Aimport scala.collection.Iterable;%0A%0A@Mojo(name = %22deleteAllTopics%22,%0A      defaultPhase = POST_INTEGRATION_TEST,%0A      threadSafe = true)%0Apublic class KafkaDeleteAllTopicsExecuteMojo extends AbstractMojo %7B%0A%0A    @Parameter(property = %22zookeeper.host%22, defaultValue = %22localhost%22)%0A    private String zookeeperHost;%0A%0A    @Parameter(property = %22zookeeper.port%22, defaultValue = %222181%22)%0A    private int zookeeperPort;%0A%0A    public void execute() throws MojoExecutionException, MojoFailureException %7B%0A        ZkUtils zkUtils = ZkUtils.apply(String.format(%22%25s:%25d%22, zookeeperHost, zookeeperPort), 10000, 10000, false);%0A%0A        Iterator%3CString%3E stringPropertiesMap = AdminUtils.fetchAllTopicConfigs(zkUtils).keysIterator();%0A%0A        while (stringPropertiesMap.hasNext()) %7B%0A            String topic = stringPropertiesMap.next();%0A%0A            AdminUtils.deleteTopic(zkUtils, topic);%0A%0A            long start = System.currentTimeMillis();%0A            long timeout = 10000;%0A%0A            while (AdminUtils.topicExists(zkUtils, topic) && (System.currentTimeMillis() - start) %3C timeout) %7B%0A%0A                try %7B%0A                    TimeUnit.SECONDS.sleep(100);%0A                %7D catch (InterruptedException e) %7B%0A                    getLog().warn(e);%0A                %7D%0A            %7D%0A%0A            if ((System.currentTimeMillis() - start) %3E timeout) %7B%0A                getLog().warn(String.format(%22Topic '%25s' deletion failed%22, topic));%0A            %7D%0A%0A        %7D%0A%0A    %7D%0A%0A%7D%0A

Add maven goal to delete all topics.