Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce -fork versions of mojos #599

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/main/java/io/fabric8/maven/docker/BuildForkMojo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.fabric8.maven.docker;

import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;

/**
* Build Mojo that forks the maven lifecycle
*/
@Mojo(name = "build-fork", defaultPhase = LifecyclePhase.INSTALL)
@Execute(phase = LifecyclePhase.INITIALIZE)
public class BuildForkMojo extends BuildMojo {
}
2 changes: 0 additions & 2 deletions src/main/java/io/fabric8/maven/docker/BuildMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import io.fabric8.maven.docker.config.BuildImageConfiguration;
import io.fabric8.maven.docker.service.ServiceHub;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
Expand All @@ -23,7 +22,6 @@
* @since 28.07.14
*/
@Mojo(name = "build", defaultPhase = LifecyclePhase.INSTALL)
@Execute(phase = LifecyclePhase.INITIALIZE)
public class BuildMojo extends AbstractBuildSupportMojo {

@Parameter(property = "docker.skip.tag", defaultValue = "false")
Expand Down
13 changes: 13 additions & 0 deletions src/main/java/io/fabric8/maven/docker/LogsForkMojo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.fabric8.maven.docker;

import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;

/**
* Logs Mojo that forks the maven lifecycle
*/
@Mojo(name = "logs-fork")
@Execute(phase = LifecyclePhase.INITIALIZE)
public class LogsForkMojo extends LogsMojo {
}
2 changes: 0 additions & 2 deletions src/main/java/io/fabric8/maven/docker/LogsMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import io.fabric8.maven.docker.model.Container;
import io.fabric8.maven.docker.service.ServiceHub;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
Expand All @@ -29,7 +28,6 @@
*
*/
@Mojo(name = "logs")
@Execute(phase = LifecyclePhase.INITIALIZE)
public class LogsMojo extends AbstractDockerMojo {

// Whether to log infinitely or to show only the logs happened until now.
Expand Down
13 changes: 13 additions & 0 deletions src/main/java/io/fabric8/maven/docker/PushForkMojo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.fabric8.maven.docker;

import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;

/**
* Push Mojo that forks the maven lifecycle
*/
@Mojo(name = "push-fork", defaultPhase = LifecyclePhase.DEPLOY)
@Execute(phase = LifecyclePhase.INITIALIZE)
public class PushForkMojo extends PushMojo {
}
2 changes: 0 additions & 2 deletions src/main/java/io/fabric8/maven/docker/PushMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import io.fabric8.maven.docker.util.EnvUtil;
import io.fabric8.maven.docker.util.ImageName;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
Expand All @@ -20,7 +19,6 @@
* @author roland
*/
@Mojo(name = "push", defaultPhase = LifecyclePhase.DEPLOY)
@Execute(phase = LifecyclePhase.INITIALIZE)
public class PushMojo extends AbstractDockerMojo {

// Registry to use for push operations if no registry is specified
Expand Down
13 changes: 13 additions & 0 deletions src/main/java/io/fabric8/maven/docker/RemoveForkMojo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.fabric8.maven.docker;

import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;

/**
* Remove Mojo that forks the maven lifecycle
*/
@Mojo(name = "remove-fork", defaultPhase = LifecyclePhase.POST_INTEGRATION_TEST)
@Execute(phase = LifecyclePhase.INITIALIZE)
public class RemoveForkMojo extends RemoveMojo {
}
2 changes: 0 additions & 2 deletions src/main/java/io/fabric8/maven/docker/RemoveMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import io.fabric8.maven.docker.service.QueryService;
import io.fabric8.maven.docker.service.ServiceHub;

import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
Expand All @@ -40,7 +39,6 @@
*
*/
@Mojo(name = "remove", defaultPhase = LifecyclePhase.POST_INTEGRATION_TEST)
@Execute(phase = LifecyclePhase.INITIALIZE)
public class RemoveMojo extends AbstractDockerMojo {

// Should all configured images should be removed?
Expand Down
13 changes: 13 additions & 0 deletions src/main/java/io/fabric8/maven/docker/RunForkMojo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.fabric8.maven.docker;

import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;

/**
* Run Mojo that forks the maven lifecycle
*/
@Mojo(name = "run-fork", defaultPhase = LifecyclePhase.PRE_INTEGRATION_TEST)
@Execute(phase = LifecyclePhase.INITIALIZE)
public class RunForkMojo extends RunMojo {
}
2 changes: 0 additions & 2 deletions src/main/java/io/fabric8/maven/docker/RunMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* limitations under the License.
*/

import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;

Expand All @@ -26,5 +25,4 @@
* @since 26/04/16
*/
@Mojo(name = "run", defaultPhase = LifecyclePhase.PRE_INTEGRATION_TEST)
@Execute(phase = LifecyclePhase.INITIALIZE)
public class RunMojo extends StartMojo { }
13 changes: 13 additions & 0 deletions src/main/java/io/fabric8/maven/docker/StartForkMojo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.fabric8.maven.docker;

import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;

/**
* Start Mojo that forks the maven lifecycle
*/
@Mojo(name = "start-fork", defaultPhase = LifecyclePhase.PRE_INTEGRATION_TEST)
@Execute(phase = LifecyclePhase.INITIALIZE)
public class StartForkMojo extends StartMojo {
}
1 change: 0 additions & 1 deletion src/main/java/io/fabric8/maven/docker/StartMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
* @author roland
*/
@Mojo(name = "start", defaultPhase = LifecyclePhase.PRE_INTEGRATION_TEST)
@Execute(phase = LifecyclePhase.INITIALIZE)
public class StartMojo extends AbstractDockerMojo {

@Parameter(property = "docker.showLogs")
Expand Down
13 changes: 13 additions & 0 deletions src/main/java/io/fabric8/maven/docker/StopForkMojo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.fabric8.maven.docker;

import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;

/**
* Stop Mojo that forks the maven lifecycle
*/
@Mojo(name = "stop-fork", defaultPhase = LifecyclePhase.POST_INTEGRATION_TEST)
@Execute(phase = LifecyclePhase.INITIALIZE)
public class StopForkMojo extends StopMojo {
}
2 changes: 0 additions & 2 deletions src/main/java/io/fabric8/maven/docker/StopMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import io.fabric8.maven.docker.log.LogDispatcher;
import io.fabric8.maven.docker.model.Container;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
Expand All @@ -36,7 +35,6 @@
*
*/
@Mojo(name = "stop", defaultPhase = LifecyclePhase.POST_INTEGRATION_TEST)
@Execute(phase = LifecyclePhase.INITIALIZE)
public class StopMojo extends AbstractDockerMojo {

@Parameter(property = "docker.keepRunning", defaultValue = "false")
Expand Down
13 changes: 13 additions & 0 deletions src/main/java/io/fabric8/maven/docker/WatchForkMojo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.fabric8.maven.docker;

import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;

/**
* Watch Mojo that forks the maven lifecycle
*/
@Mojo(name = "watch-fork")
@Execute(phase = LifecyclePhase.INITIALIZE)
public class WatchForkMojo extends WatchMojo {
}
2 changes: 0 additions & 2 deletions src/main/java/io/fabric8/maven/docker/WatchMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import io.fabric8.maven.docker.util.StartOrderResolver;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
Expand All @@ -56,7 +55,6 @@
* @since 16/06/15
*/
@Mojo(name = "watch")
@Execute(phase = LifecyclePhase.INITIALIZE)
public class WatchMojo extends AbstractBuildSupportMojo {

/**
Expand Down