forked from e-ucm/eadventure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
maven-recipes.txt
80 lines (58 loc) · 2.92 KB
/
maven-recipes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
-------------------------------------------------------------------------------
Maven Recipes
-------------------------------------------------------------------------------
* Build the eclipse projects
mvn eclipse:eclipse
* Format file headers
mvn com.mycila.maven-license-plugin:maven-license-plugin:format
* Format code (invoked automatically on compile)
mvn com.googlecode.maven-java-formatter-plugin:maven-java-formatter-plugin:format
* Profiles
mvn <options> -P <profile1>[,<profile2>[,<profileN>]]
the following profiles are available:
release : generates self-contained, executable jars for editor and desktop-engine
-- and also wraps these jars in windows executables using launch4j
no-gwt : avoids GWT compilation, and only validates GWT sources
editor : only builds the editor
engine-desktop : only builds the desktop engine
engine-android : only builds the desktop engine
* Make a clean build of everything
mvn clean install -Dandroid.sdk.path=<path-to-android-sdk>
takes 4:00 minutes on a quad-core
mvn clean install -P no-gwt -Dandroid.sdk.path=<path-to-android-sdk>
takes 2:50 minutes on a quad-core
NOTES: "javac" must be accesible;
release versions of editor and desktop engine are not created
unless the release profile is enabled (see above)
* Make a clean build of a single module
mvn clean install -pl ead:engine-desktop
NOTE: you can use -pl A,B,C to specify multiple modules;
for a single module, you can "cd" to that module's directory and not use -pl
* Find the dependencies for a given module
mvn depencency:tree -pl ead:engine-desktop
* Mavenize a jar (only when not mavenized online; this example uses jbox2d)
mvn install:install-file -Dfile=jbox2d-library-2.1.2.jar \
-DgroupId=org.jbox2d -DartifactId=jbox2d-library -Dversion=2.1.2 \
-Dpackaging=jar -DlocalRepositoryPath=etc/repository
NOTE: you will not be able to use it until you commit & push your changes
online; *before* you do that, change
<url>https://github.com/e-ucm/eadventure/raw/master/etc/repository/</url>
in the main pom.xml to
<url>file://local-project-root/etc/repository</url>
to make sure everything works; it is very easy to get the install-file wrong.
* Force re-download of a single artifact
delete the artifact from your .m2 local repository; it will be re-downloaded
OR
use the -U flag (refreshes all plugins)
* Launch cobertura (check unit-test coverage) on a module
mvn -pl ead:engine-desktop cobertura:check
* Launch findbugs on a module
mvn -pl ead:engine-desktop findbugs:findbugs findbugs:gui
* Launch pmd on a module
mvn -pl ead:engine-desktop pmd:pmd pmd:cpd
NOTE: results are generated in the corresponding target/pmd.xml and target/cpd.xml
* Build all project reports
mvn site -Dandroid.sdk.path=<path-to-android-sdk>
NOTE: this currently performs a *lot* of duplicate work, and
does not even build subproject pages (it lumps everything together);
takes around 10 minutes on a quad-core...