Skip to content
This repository has been archived by the owner on Aug 5, 2019. It is now read-only.

Maven Cheat Sheet

soundTricker edited this page Apr 2, 2012 · 10 revisions

Maven Cheat Sheet

Overview

This wiki page is maven command cheat sheet for gwt-bootstrap project.

Wrote for the who?

For Contributers or clone this projcet user's.

What we will can do.

Right now,If you read this wiki,You will can do

  • Setup project for eclipse.
  • Build jars core.jar,sources.jar,javadocs.jar.
  • Generate Javadocs to local.
  • Generate maven sites to local.
  • Deploy maven sites to our remote git repository. (Only Contributers)
  • Upload jars to github download pages.(Only Contributers)
  • Deploy jars to maven repository on Github.(Only Contributers)
  • Deploy Showcase to http://gwtbootstrap.github.com

Let's read this wiki!!!
If you need search abount above things,you can search by same as above strings,
This wiki is wrote same chapter name.

[1]: Setting maven`s setting.xml before run goals.

*note* this chapter is for contributers.

In gwt-bootstrap project,some maven goals need Github authentication.
If you don't need add options in always run maven goals about it,
You have to write some settings to your ~/.m2/settings.xml file.

Example.

<settings>
  <profiles>
    <profile>
      <id>github-plugin</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
        <github.global.userName>your-name</github.global.userName>
        <github.global.password>your-password</github.global.password>
      </properties>
    </profile>
    ......
  </profiles>
  ......
</settings>

Setup project for eclipse.

Command

mvn clean eclipse:clean eclipse:eclipse

If you need showcase, Run
mvn -Pshowcase clean eclipse:clean eclipse:eclipse

When should I run it?

When you clone this project, or update pom.xml about dependencies.
You should run this command.

Build jars core.jar,sources.jar,javadocs.jar.

Command

mvn packages

When should I run it?

When you need build jars.

Generate Javadocs to local.

Command

mvn clean javadoc:javadoc

When should I run it?

When you need generate javadocs to local.

Generate maven sites to local.

Command

mvn clean site -Dgithub.site.dryRun=true

When should I run it?

When you need generate maven sites to local.

Deploy maven sites to our remote git repository. (Only Contributers)

Command

mvn clean site -Dgithub.global.userName={username on github} -Dgithub.global.password={password on github}

If you set up setting.xml,you can run this,
mvn clean site

When should I run it?

When you need deploy maven site and javadocs to our project github pages.

Upload jars to github download pages.

Command

mvn clean install ghDownloads:upload -Dgithub.global.userName={username on github} -Dgithub.global.password={password on github}

If you set up setting.xml,you can run this,
mvn clean install ghDownloads:upload

When should I run it?

When you need upload jars to gwt-bootstrap github download pages

Deploy jars to maven repository on Github.(Only Contributers)

Right now,Given 2 phase.

Ready

Please clone gwtbootstrap/maven.

git clone [email protected]:gwtbootstrap/maven

Command

  1. Run mvn -PforGithubDeploy clean deploy in gwt-bootstrap local repository.
  • Deploy maven jars to local directory maven/release or maven/snapshots
  1. Copy directory maven to gwtbootstrap/maven git local repository.
  2. Git Add,Commit,Push

When should I run it?

When you need deploy jars to remote maven repository.

Deploy Showcase to http://gwtbootstrap.github.com

Right now,Given 3 phase.

Ready

Please clone gwtbootstrap/gwtbootstrap.github.com.

git clone [email protected]:gwtbootstrap/gwtbootstrap.github.com.git

Command

  1. mvn -Pshowcase compile gwt:compile
  2. Copy generated directory (src/showcase/webapp/showcase and src/showcase/webapp/customcss.showcase) to gwtbootstrap/gwtbootstrap.github.com local git directory.
  3. Git Add,Commit,Push.

When should I run it?

When you need deploy showcase to http://gwtbootstrap.github.com.

Clone this wiki locally