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

Cover how to use Maven to build and package from CLI? #889

Open
yeekangc opened this issue Jun 30, 2021 · 1 comment
Open

Cover how to use Maven to build and package from CLI? #889

yeekangc opened this issue Jun 30, 2021 · 1 comment

Comments

@yeekangc
Copy link
Member

The current version of the guide doesn't cover how to use Maven from CLI to build and package an application.

Should consider including these beyond the use of liberty:run and liberty:dev. Or, provide pointers to Getting Started guide where appropriate.

@NK-debug
Copy link

mvn liberty:help

[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< io.openliberty.guides:ServletSample >-----------------
[INFO] Building ServletSample 1.0-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- liberty-maven-plugin:3.5.1:help (default-cli) @ ServletSample ---
[INFO] liberty-maven-plugin 3.5.1
  Liberty Maven Plugin : Install, Start/Stop, Package, Create Server,
  Deploy/Undeploy applications

This plugin has 24 goals:

liberty:clean
  Clean the logs, workarea, dropins and apps directories.

liberty:compile-jsp
  Compile the JSPs in the src/main/webapp folder.

liberty:configure-arquillian

liberty:create
  Create a liberty server

liberty:debug
  Start a liberty server in debug mode

liberty:deploy
  Copy applications to the specified directory of the Liberty server. The
  ResolutionScope.COMPILE_PLUS_RUNTIME includes compile + system + provided +
  runtime dependencies. The copyDependencies functionality will include
  dependencies with all those scopes, and transitive dependencies with scope
  compile + system + runtime. Provided scope transitive dependencies are not
  included by default (built-in maven behavior).

liberty:dev
  Start a liberty server in dev mode import to set ResolutionScope for TEST as
  it helps build full transitive dependency classpath

liberty:devc
  Start dev mode for containers

liberty:display-url
  Display an application URL in the default browser.

liberty:dump
  Dump diagnostic information from the server into an archive.

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

liberty:install-feature
  This mojo installs a feature packaged as a Subsystem Archive (esa) to the
  runtime.

liberty:install-server
  Install a liberty server

liberty:java-dump
  Dump diagnostic information from the server JVM.

liberty:package
  Package a liberty server

liberty:prepare-feature
  This mojo generates JSON files so user features can be installed from a
  specified BOM

liberty:run
  Start a liberty server

liberty:start
  Start a liberty server

liberty:status
  Check a liberty server status

liberty:stop
  Stop a liberty server

liberty:test-start
  Start a liberty server if tests are not skipped

liberty:test-stop
  Quickly bypass stopping server if server isn't started

liberty:undeploy
  Undeploy application from liberty server. If no parameters have been defined
  the mojo will undeploy all applications from the server.

liberty:uninstall-feature
  This mojo uninstalls a feature packaged as a Subsystem Archive (esa) from the
  runtime.

@gkwan-ibm gkwan-ibm transferred this issue from OpenLiberty/guide-maven-intro Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants