\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{ericwyles} \pdfinfo{ /Title (maven-lifecycles.pdf) /Creator (Cheatography) /Author (ericwyles) /Subject (Maven Lifecycles Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{751B04} \definecolor{LightBackground}{HTML}{FAF7F7} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Maven Lifecycles Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{ericwyles} via \textcolor{DarkBackground}{\uline{cheatography.com/54695/cs/14612/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}ericwyles \\ \uline{cheatography.com/ericwyles} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 6th February, 2018.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{tabularx}{17.67cm}{x{5.7358 cm} x{4.3862 cm} x{6.748 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{Default Lifecycle}} \tn % Row 0 \SetRowColor{LightBackground} \{\{bb\}\}{\bf{Phase}} & \{\{bb\}\}{\bf{Default Binding}} & \{\{bb\}\}{\bf{Default Binding}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} validate & & validate the project is correct and all necessary information is available. \tn % Row Count 8 (+ 5) % Row 2 \SetRowColor{LightBackground} initialize & & initialize build state, e.g. set properties or create directories. \tn % Row Count 13 (+ 5) % Row 3 \SetRowColor{white} \seqsplit{generate-sources} & & generate any source code for inclusion in compilation. \tn % Row Count 17 (+ 4) % Row 4 \SetRowColor{LightBackground} \seqsplit{process-sources} & & process the source code, for example to filter any values. \tn % Row Count 21 (+ 4) % Row 5 \SetRowColor{white} \seqsplit{generate-resources} & & generate resources for inclusion in the package. \tn % Row Count 24 (+ 3) % Row 6 \SetRowColor{LightBackground} {\bf{process-resources}} & {\bf{resources:resources}} & copy and process the resources into the destination directory, ready for packaging. \tn % Row Count 30 (+ 6) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.7358 cm} x{4.3862 cm} x{6.748 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{Default Lifecycle (cont)}} \tn % Row 7 \SetRowColor{LightBackground} {\bf{compile}} & {\bf{compiler:compile}} & compile the source code of the project. \tn % Row Count 3 (+ 3) % Row 8 \SetRowColor{white} \seqsplit{process-classes} & & post-process the generated files from compilation \tn % Row Count 7 (+ 4) % Row 9 \SetRowColor{LightBackground} \seqsplit{generate-test-sources} & & generate any test source code for inclusion in compilation. \tn % Row Count 11 (+ 4) % Row 10 \SetRowColor{white} \{\{noshy\}\}process-test-sources & & process the test source code, for example to filter any values. \tn % Row Count 15 (+ 4) % Row 11 \SetRowColor{LightBackground} \{\{noshy\}\}generate-test-resources & & create resources for testing. \tn % Row Count 18 (+ 3) % Row 12 \SetRowColor{white} \{\{noshy\}\}{\bf{process-test-resources}} & {\bf{resources:testResources}} & copy and process the resources into the test destination directory. \tn % Row Count 23 (+ 5) % Row 13 \SetRowColor{LightBackground} {\bf{test-compile}} & {\bf{compiler:testCompile}} & compile the test source code into the test destination directory \tn % Row Count 27 (+ 4) % Row 14 \SetRowColor{white} \seqsplit{process-test-classes} & & post-process the generated files from test compilation \tn % Row Count 31 (+ 4) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.7358 cm} x{4.3862 cm} x{6.748 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{Default Lifecycle (cont)}} \tn % Row 15 \SetRowColor{LightBackground} {\bf{test}} & {\bf{surefire:test}} & run unit tests using a suitable unit testing framework. \tn % Row Count 4 (+ 4) % Row 16 \SetRowColor{white} \seqsplit{prepare-package} & & perform any operations necessary to prepare a package before the actual packaging. \tn % Row Count 10 (+ 6) % Row 17 \SetRowColor{LightBackground} {\bf{package}} & {\bf{jar:jar {\emph{or}} war:war}} & take the compiled code and package it in its distributable format, such as a JAR. \tn % Row Count 16 (+ 6) % Row 18 \SetRowColor{white} \seqsplit{pre-integration-test} & & perform actions required before integration tests are executed. \tn % Row Count 20 (+ 4) % Row 19 \SetRowColor{LightBackground} \seqsplit{integration-test} & & execute integration tests. \tn % Row Count 22 (+ 2) % Row 20 \SetRowColor{white} \seqsplit{post-integration-test} & & perform actions required after integration tests have been executed. \tn % Row Count 27 (+ 5) % Row 21 \SetRowColor{LightBackground} verify & & run any checks on results of integration tests to ensure quality criteria are met \tn % Row Count 33 (+ 6) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.7358 cm} x{4.3862 cm} x{6.748 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{Default Lifecycle (cont)}} \tn % Row 22 \SetRowColor{LightBackground} {\bf{install}} & {\bf{install:install}} & install the package into the local repository, for use as a dependency in other projects locally. \tn % Row Count 7 (+ 7) % Row 23 \SetRowColor{white} {\bf{deploy}} & {\bf{deploy:deploy}} & copies the final package to the remote repository for sharing with other developers and projects. \tn % Row Count 14 (+ 7) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{3.2053 cm} x{5.2297 cm} x{8.435 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{Clean Lifecycle}} \tn % Row 0 \SetRowColor{LightBackground} \{\{bb\}\}{\bf{Phase}} & \{\{bb\}\}{\bf{Default Binding}} & \{\{bb\}\}{\bf{Description}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \seqsplit{pre-clean} & & execute processes needed prior to the actual project cleaning \tn % Row Count 7 (+ 4) % Row 2 \SetRowColor{LightBackground} {\bf{clean}} & {\bf{clean:clean}} & remove all files generated by the previous build \tn % Row Count 10 (+ 3) % Row 3 \SetRowColor{white} \seqsplit{post-clean} & & execute processes needed to finalize the project cleaning \tn % Row Count 13 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{3.8801 cm} x{2.8679 cm} x{10.122 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{Site Lifecycle}} \tn % Row 0 \SetRowColor{LightBackground} pre-site & & execute processes needed prior to the actual project site generation \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} {\bf{site}} & \seqsplit{site:site} & generate the project's site documentation \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{post-site} & & execute processes needed to finalize the site generation, and to prepare for site deployment \tn % Row Count 9 (+ 4) % Row 3 \SetRowColor{white} {\bf{site-deploy}} & \seqsplit{site:deploy} & deploy the generated site documentation to the specified web server \tn % Row Count 12 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \end{document}