logo Fabric8 Maven :: Plugin

This project is being migrated to https://github.com/eclipse/jkube

homepage: github.com/fabric8io/fabric8-maven-plugin
fresh index:
last release: 2 years ago, first release: 7 years ago
packaging: maven-plugin
get this artifact from: central
see this artifact on: search.maven.org


Display vulnerabilities (snyk): Vulnerability check

This chart shows how much is this artifact used as a dependency in other Maven artifacts in Central repository and GitHub:


select version:

Add this snippet into pom.xml inside tag <project><build><plugins>:




Switch to artifact.
goals:
fabric8:apply (phase: install)

Base class for goals which deploy the generated artifacts into the Kubernetes cluster

fabric8:build (phase: pre-integration-test)

Builds the docker images configured for this project via a Docker or S2I binary build.

fabric8:debug (phase: package)

Ensures that the current app has debug enabled, then opens the debug port so that you can debug the latest pod from your IDE

fabric8:deploy (phase: validate)

This goal forks the install goal then applies the generated kubernetes resources to the current cluster. Note that the goals fabric8:resource and fabric8:build must be bound to the proper execution phases.

fabric8:helm (phase: pre-integration-test)

Generates a Helm chart for the kubernetes resources

fabric8:help

Display help information on fabric8-maven-plugin. Call mvn fabric8:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.

fabric8:log (phase: validate)

This goal tails the log of the most recent pod for the app that was deployed via fabric8:deploy To terminate the log hit Ctrl+C

fabric8:push (phase: install)

Uploads the built Docker images to a Docker registry

fabric8:resource (phase: process-resources)

Generates or copies the Kubernetes JSON file and attaches it to the build so its installed and released to maven repositories like other build artifacts.

fabric8:resource-apply (phase: validate)

This goal forks the compile goal then applies the generated kubernetes resources to the current cluster. Note that the fabric8:resource goal must be bound to the proper execution phases.

fabric8:undeploy (phase: install)

Undeploys (deletes) the kubernetes resources generated by the current project. This goal is the opposite to the fabric8:run or fabric8:deploy goals.

fabric8:watch (phase: package)

Used to automatically rebuild Docker images and restart containers in case of updates.

Often used code snippets:

<plugin>
  <groupId>io.fabric8</groupId>
  <artifactId>fabric8-maven-plugin</artifactId>
  <version>${fabric8.maven.plugin.version}</version>
  <executions>
    <execution>
      <goals>
        <goal>resource</goal>
        <goal>build</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>io.fabric8</groupId>
  <artifactId>fabric8-maven-plugin</artifactId>
  <version>${fabric8.version}</version>
  <executions>
    <execution>
      <id>json</id>
      <phase>generate-resources</phase>
      <goals>
        <goal>json</goal>
      </goals>
    </execution>
    <execution>
      <id>attach</id>
      <phase>package</phase>
      <goals>
        <goal>attach</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>io.fabric8</groupId>
  <artifactId>fabric8-maven-plugin</artifactId>
  <version>${fabric8.maven.plugin.version}</version>
  <executions>
    <execution>
      <goals>
        <goal>resource</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <generator>
      <includes>
        <include>wildfly-swarm</include>
      </includes>
    </generator>
  </configuration>
</plugin>
<plugin>
  <groupId>io.fabric8</groupId>
  <artifactId>fabric8-maven-plugin</artifactId>
  <version>${fabric8.maven.plugin.version}</version>
  <executions>
    <execution/>
  </executions>
</plugin>
<plugin>
  <groupId>io.fabric8</groupId>
  <artifactId>fabric8-maven-plugin</artifactId>
  <version>${fabric8.maven.plugin.version}</version>
  <executions>
    <execution>
      <id>fmp</id>
      <goals>
        <goal>resource</goal>
        <goal>helm</goal>
      </goals>
    </execution>
  </executions>
</plugin>

© Jiri Pinkas 2015 - 2022. All rights reserved! Admin login To submit bugs / feature requests please use this github page
related: JavaVids | Top Java Blogs | Java školení
Apache and Apache Maven are trademarks of the Apache Software Foundation. The Central Repository is a service mark of Sonatype, Inc.