Compare commits
725 Commits
maven-plug
...
master
| Author | SHA1 | Date |
|---|---|---|
|
|
7fcab60985 | |
|
|
d682b25820 | |
|
|
a7fc242de5 | |
|
|
8d1ba27e95 | |
|
|
f99796ee68 | |
|
|
a3371bc6fb | |
|
|
e564b8d54d | |
|
|
d38ef497bc | |
|
|
92f5eaaa3d | |
|
|
d484f85160 | |
|
|
04684f0fc3 | |
|
|
e44bb78aff | |
|
|
1f70e4ea47 | |
|
|
3ec7f6f61d | |
|
|
bcf94564ba | |
|
|
6fda7882f1 | |
|
|
e430efe682 | |
|
|
e598cdfd30 | |
|
|
053932347f | |
|
|
81eb53a1c5 | |
|
|
49349dee7a | |
|
|
f50e9ebb58 | |
|
|
117eaf66a5 | |
|
|
365f900755 | |
|
|
d49dbb8b79 | |
|
|
89a82c2963 | |
|
|
f223b01735 | |
|
|
2767d04ccb | |
|
|
5e063a0907 | |
|
|
4bd90ea35f | |
|
|
4ac5b187dc | |
|
|
3aaa8d275c | |
|
|
e0fe0f017f | |
|
|
176760d3f9 | |
|
|
197e306311 | |
|
|
79490bad16 | |
|
|
52c7bcc7c0 | |
|
|
15180d93b0 | |
|
|
c20a5f300b | |
|
|
f0d7f725a4 | |
|
|
629dd38f3d | |
|
|
ec99a5982d | |
|
|
6992f7719b | |
|
|
9963ca473d | |
|
|
dacb6e6b6d | |
|
|
9a7fd1e70d | |
|
|
34920f0a2c | |
|
|
7c58d51900 | |
|
|
372526b052 | |
|
|
22fcf70b89 | |
|
|
a44d4f1719 | |
|
|
7dd7d23ebf | |
|
|
250f72677d | |
|
|
8fd7093a5c | |
|
|
1525c61b93 | |
|
|
51a8d562ad | |
|
|
7b952b87a3 | |
|
|
547e3868c7 | |
|
|
257e61a72e | |
|
|
e982dbf1c6 | |
|
|
6edd624afc | |
|
|
cc006dbd8e | |
|
|
0fec67e0eb | |
|
|
4b16f1d883 | |
|
|
267e446889 | |
|
|
e3b6db6b40 | |
|
|
45a627148b | |
|
|
4eaf2678a2 | |
|
|
8e51a50e0b | |
|
|
bfc52d95df | |
|
|
5ab96a0efb | |
|
|
e8dfae0cbc | |
|
|
b622b0198e | |
|
|
409d56c504 | |
|
|
7fdabadb3c | |
|
|
75987012b1 | |
|
|
7a2ed415cd | |
|
|
732b82b2da | |
|
|
3b54fdbc28 | |
|
|
4167674992 | |
|
|
7500654003 | |
|
|
3394354af1 | |
|
|
7426d551af | |
|
|
35ca9b5a80 | |
|
|
0f464acc12 | |
|
|
fa0a5fc105 | |
|
|
99359ef1b6 | |
|
|
b0fd53aaa7 | |
|
|
d988e0b43c | |
|
|
1089b54c3f | |
|
|
6984e9d27f | |
|
|
5af1f627a8 | |
|
|
de5875e0af | |
|
|
9e1a66d448 | |
|
|
b13ad1288e | |
|
|
bdb03e597c | |
|
|
1f029f5fb1 | |
|
|
5c7faf1b8e | |
|
|
599b468d0d | |
|
|
a1b3723559 | |
|
|
66444b15df | |
|
|
311aa09218 | |
|
|
58a8f57588 | |
|
|
f516f754c5 | |
|
|
f10b51e352 | |
|
|
936f421eab | |
|
|
7bc6873931 | |
|
|
045ab59621 | |
|
|
1190048b92 | |
|
|
f8c4b373e7 | |
|
|
00288684b1 | |
|
|
4dc8598822 | |
|
|
e1fb52356f | |
|
|
2aa4a2c9cd | |
|
|
e0b306c105 | |
|
|
3bb1fbf154 | |
|
|
f36105f19c | |
|
|
a2602cf139 | |
|
|
f0a8bb4b3a | |
|
|
4e00ec6fc3 | |
|
|
f224aa88c6 | |
|
|
bb948bfbc8 | |
|
|
660e74e052 | |
|
|
b0b5558bc0 | |
|
|
ebf0b9465e | |
|
|
11054a8bce | |
|
|
e2504fa821 | |
|
|
e1e487489f | |
|
|
daf8877b3d | |
|
|
63a11167e0 | |
|
|
32a8740e72 | |
|
|
c6e68e8d48 | |
|
|
2bcc4fc6e9 | |
|
|
ca9c92eaab | |
|
|
c0ba1194b1 | |
|
|
37b87d5ef5 | |
|
|
10d0a99bec | |
|
|
a6eab7460b | |
|
|
ba103c598f | |
|
|
5d6415745b | |
|
|
c339131883 | |
|
|
b8b9a466aa | |
|
|
6d936298d3 | |
|
|
62561197e8 | |
|
|
58f5506c59 | |
|
|
f8a946df81 | |
|
|
4db874b18f | |
|
|
df4ae65314 | |
|
|
8f0a5ee56a | |
|
|
4f4c32b9dc | |
|
|
1de6bf4e70 | |
|
|
a28ba3d065 | |
|
|
166e0f7215 | |
|
|
837f681ee8 | |
|
|
52446a83ea | |
|
|
bfcfcaef95 | |
|
|
485b860846 | |
|
|
e020e993df | |
|
|
3e30bae1a5 | |
|
|
191200d6f4 | |
|
|
feedd25653 | |
|
|
6a8cd85aad | |
|
|
0d809ca731 | |
|
|
8c4c09bf1b | |
|
|
266d573247 | |
|
|
abd5f5966a | |
|
|
60184b7dbd | |
|
|
dfd7b1b1ae | |
|
|
c163b34e7e | |
|
|
a9f44394d6 | |
|
|
665f29590a | |
|
|
55423bbe43 | |
|
|
d7e27e6bd0 | |
|
|
9a8f79c110 | |
|
|
3ed2aef1df | |
|
|
c497984b82 | |
|
|
0c5a83e673 | |
|
|
f3e2aa95c4 | |
|
|
264d24fc4d | |
|
|
337b88b68f | |
|
|
9c26ce960d | |
|
|
a1e15b0b7b | |
|
|
d7d64cbe0e | |
|
|
d827052906 | |
|
|
0a4d198a47 | |
|
|
10acc051bf | |
|
|
ef3b5a16ba | |
|
|
9029098178 | |
|
|
425b95b909 | |
|
|
fecb6817e2 | |
|
|
0d3bc50059 | |
|
|
5fe4d7d344 | |
|
|
fcc328fb6e | |
|
|
435fbb1d04 | |
|
|
f67446b914 | |
|
|
3bc4d86dba | |
|
|
411ab0bb48 | |
|
|
40397727da | |
|
|
215037c7e5 | |
|
|
7627ead935 | |
|
|
f4ba12c794 | |
|
|
befacc9f58 | |
|
|
0824ea11e5 | |
|
|
a0666fd96a | |
|
|
4cc340b2d4 | |
|
|
6991661a40 | |
|
|
43755711de | |
|
|
b66095855d | |
|
|
805e0f84a7 | |
|
|
5d366fc36f | |
|
|
a5647ce2c8 | |
|
|
eca08f011f | |
|
|
8bf5e39f23 | |
|
|
c8daa9d43f | |
|
|
7bb944fbd5 | |
|
|
1bf5543db3 | |
|
|
188b792d5b | |
|
|
020cb87d5c | |
|
|
197ce98685 | |
|
|
570bb47130 | |
|
|
1a3ad06e35 | |
|
|
404009701f | |
|
|
866e3c18f0 | |
|
|
96cb878188 | |
|
|
b7120e30cc | |
|
|
1de1779688 | |
|
|
134e412a36 | |
|
|
afe2ca3e3f | |
|
|
db38a1222a | |
|
|
618cd24a12 | |
|
|
43877dc10f | |
|
|
224a654684 | |
|
|
6e6ee108b7 | |
|
|
0435027899 | |
|
|
27581ab1ee | |
|
|
8488b8267d | |
|
|
6ca8252f0a | |
|
|
80aacd51f2 | |
|
|
ed7124add7 | |
|
|
4a1d287e0f | |
|
|
2077b3e8cf | |
|
|
62dca6fbd5 | |
|
|
92df3b3987 | |
|
|
a757bee927 | |
|
|
0ba0555964 | |
|
|
b81e8af383 | |
|
|
b93ab8fca8 | |
|
|
55e9f2dcfb | |
|
|
70439924a9 | |
|
|
0178366f82 | |
|
|
2ead1c9957 | |
|
|
7dc8061119 | |
|
|
2a925264f5 | |
|
|
61834d0374 | |
|
|
74f2a09f0d | |
|
|
51d5a633f6 | |
|
|
b7cd9996e8 | |
|
|
3a046c33e2 | |
|
|
d7eff2bf5d | |
|
|
a2ee6a2ed2 | |
|
|
6a460fe73d | |
|
|
cdf5f235a0 | |
|
|
06dbbb5f7f | |
|
|
0c494380bc | |
|
|
f01f612574 | |
|
|
cdc72acb2d | |
|
|
cc5c0c8c75 | |
|
|
2c651a2544 | |
|
|
185b9b5d3b | |
|
|
11bda581d3 | |
|
|
d3b5a9226c | |
|
|
44ba0e4554 | |
|
|
c312cac3bb | |
|
|
af47cb96c6 | |
|
|
fdcb229aa4 | |
|
|
297b152d05 | |
|
|
d75dfaa768 | |
|
|
2585ccafb2 | |
|
|
dce2541a3e | |
|
|
8abeb549bd | |
|
|
0ac08a36fc | |
|
|
2892e3570d | |
|
|
cacac1179b | |
|
|
dae672097a | |
|
|
c46422fe0d | |
|
|
c1e288aedd | |
|
|
1c9a253347 | |
|
|
2bf4bff377 | |
|
|
71415e98eb | |
|
|
8fa0dc72fb | |
|
|
f4716d081b | |
|
|
16b822ef91 | |
|
|
e7d35fa079 | |
|
|
3e256f7e17 | |
|
|
030713aa69 | |
|
|
017a3d5ca6 | |
|
|
7230ba93e3 | |
|
|
d3bf47a4f3 | |
|
|
81da0e6343 | |
|
|
6a2c0dfce7 | |
|
|
9874a33bc4 | |
|
|
a6adf83696 | |
|
|
267ed41c4c | |
|
|
f6ac9094af | |
|
|
8409babf38 | |
|
|
404aeb03b5 | |
|
|
a99880200b | |
|
|
12f6d3fe88 | |
|
|
6c06f4bcdd | |
|
|
09b55931a9 | |
|
|
fe79314db9 | |
|
|
e37c9d413c | |
|
|
3381348ff3 | |
|
|
0b37bdb7e2 | |
|
|
5652eb99e4 | |
|
|
2ebeedd214 | |
|
|
328f9208db | |
|
|
1e7bbd5bc6 | |
|
|
4229553d33 | |
|
|
dcd8debb6d | |
|
|
df7c13e0b3 | |
|
|
9918243996 | |
|
|
fd2fdff716 | |
|
|
255e64684e | |
|
|
35a27f33fe | |
|
|
41d5e05eb9 | |
|
|
7ddd1f2459 | |
|
|
74a8581cc4 | |
|
|
b8269c2016 | |
|
|
aa60192803 | |
|
|
d6f76bfc90 | |
|
|
6cc24a1747 | |
|
|
93e82e524e | |
|
|
46532f2300 | |
|
|
a50582836c | |
|
|
402137be54 | |
|
|
2e6586509a | |
|
|
6ba729d8af | |
|
|
95b3420c87 | |
|
|
cdd2a24cab | |
|
|
43e7709cf7 | |
|
|
9e57eea052 | |
|
|
60dfe5e861 | |
|
|
fce4579278 | |
|
|
ff7fff513d | |
|
|
5c58ab6d40 | |
|
|
f375619f9c | |
|
|
b3be96af8e | |
|
|
e5f2c4746d | |
|
|
6636839798 | |
|
|
503c946cda | |
|
|
fc02ad2f0d | |
|
|
9655a274f9 | |
|
|
1ef2b2e74e | |
|
|
dd4eadd2d4 | |
|
|
f4b0dfae2a | |
|
|
6391bc314d | |
|
|
1592532f04 | |
|
|
c8b67549cf | |
|
|
aa718c105f | |
|
|
88a6f9df83 | |
|
|
aa929e452f | |
|
|
c519ab14d5 | |
|
|
08a26f371f | |
|
|
995c59127a | |
|
|
da58bced25 | |
|
|
eeb238a4f3 | |
|
|
34b1e5e922 | |
|
|
776632fa7d | |
|
|
f603ef639d | |
|
|
eada36d538 | |
|
|
1b2f9288b2 | |
|
|
2bc4e52ac7 | |
|
|
8569bbeb56 | |
|
|
e647661af9 | |
|
|
745441f7aa | |
|
|
99ff18a545 | |
|
|
f794cc3566 | |
|
|
bf49e7e7b5 | |
|
|
dd36eda12f | |
|
|
02b29353d6 | |
|
|
0a1066ff87 | |
|
|
3a52298a04 | |
|
|
54711e8649 | |
|
|
ec6605ef9a | |
|
|
d2e612f91b | |
|
|
9fb65daacc | |
|
|
3bf23ba831 | |
|
|
092e4267b0 | |
|
|
53dfd41c54 | |
|
|
c63c9e01fb | |
|
|
a2be81a06d | |
|
|
95826b76f8 | |
|
|
34400e4e3c | |
|
|
5a16d68d60 | |
|
|
684e7110b1 | |
|
|
014281f0e5 | |
|
|
005e039cc4 | |
|
|
1deb8df171 | |
|
|
e285450e0f | |
|
|
60c3654f4d | |
|
|
4abefe4080 | |
|
|
b123530814 | |
|
|
180bcb36c9 | |
|
|
be82de952e | |
|
|
1905753a7e | |
|
|
d56e6cba11 | |
|
|
30fe737999 | |
|
|
650437ad74 | |
|
|
dea91901e7 | |
|
|
fb03985d58 | |
|
|
9e9ec6d85b | |
|
|
b01afaf047 | |
|
|
c31075dd21 | |
|
|
dd9b113101 | |
|
|
5dd3ecc698 | |
|
|
a500a70267 | |
|
|
3fbcbd8561 | |
|
|
d57970a552 | |
|
|
68470f909c | |
|
|
aa9ca62315 | |
|
|
a608a24dbe | |
|
|
34c68c011d | |
|
|
44d4e6bec0 | |
|
|
5acafb5f28 | |
|
|
8c8f049dc5 | |
|
|
bec5cbed25 | |
|
|
d485d00095 | |
|
|
1e332e1122 | |
|
|
1176e0624c | |
|
|
51e608af77 | |
|
|
4b0853179f | |
|
|
94b7573eff | |
|
|
ef5a70646b | |
|
|
cbd4578330 | |
|
|
4feea7b268 | |
|
|
0d9832fdd5 | |
|
|
bbe8ee8d63 | |
|
|
945c5ca255 | |
|
|
bed85a8a9e | |
|
|
cb0fda1300 | |
|
|
bac8a5305b | |
|
|
d1998943e5 | |
|
|
a9aca6f75c | |
|
|
e62732ebe9 | |
|
|
169cb9dcc2 | |
|
|
fb6cee3d5c | |
|
|
369596166a | |
|
|
b606a755c8 | |
|
|
218d09253e | |
|
|
da30b6f44f | |
|
|
a0635587e4 | |
|
|
e42b381a7f | |
|
|
b7864f235b | |
|
|
b08d45c9d8 | |
|
|
e5756b0911 | |
|
|
fb1a7dfed3 | |
|
|
d62a360110 | |
|
|
d132fe7590 | |
|
|
c9fb1abe07 | |
|
|
a90bf9c54d | |
|
|
9b628bd0fe | |
|
|
298d385345 | |
|
|
59feab387b | |
|
|
2f1b305901 | |
|
|
b6e4781de6 | |
|
|
ca84ee10df | |
|
|
98cebd50b7 | |
|
|
b7d3437c2a | |
|
|
d660e7540a | |
|
|
5d63f01d12 | |
|
|
b3acbd4df6 | |
|
|
f960418b9c | |
|
|
c95ea5dd89 | |
|
|
360a9d2e8e | |
|
|
c9063cbb83 | |
|
|
1d5f6f7c7d | |
|
|
36f982ee7a | |
|
|
d429187237 | |
|
|
72dada3d21 | |
|
|
eeac216d3f | |
|
|
e77f26d98f | |
|
|
11ffeac723 | |
|
|
acc5979f13 | |
|
|
be9e53279b | |
|
|
3c3ef6d796 | |
|
|
e6b364faf5 | |
|
|
59abfb17dc | |
|
|
eccd10ed12 | |
|
|
aa3154917c | |
|
|
45f4ad6034 | |
|
|
a534b3d2b5 | |
|
|
6b38de8036 | |
|
|
a9bb0f6571 | |
|
|
69afeb1a56 | |
|
|
34ebb1721b | |
|
|
2f6eee2513 | |
|
|
643c8de61c | |
|
|
73885abdbc | |
|
|
2eef7a412b | |
|
|
0aa8ad9c05 | |
|
|
4ec2eaf3a5 | |
|
|
ba66d8def7 | |
|
|
d85b22ec88 | |
|
|
ccc68be0c6 | |
|
|
d1e2e09ba8 | |
|
|
9badbe7f68 | |
|
|
261a3cf86a | |
|
|
3dd6a922a9 | |
|
|
18e8cb4178 | |
|
|
77a87b0236 | |
|
|
2373bae319 | |
|
|
e008c8012c | |
|
|
1a12b44178 | |
|
|
a4ba9593bb | |
|
|
ccc0c36afe | |
|
|
c86e344131 | |
|
|
32975142d5 | |
|
|
28a6f54643 | |
|
|
ddebc219e5 | |
|
|
06470fdc2a | |
|
|
5da55eb1be | |
|
|
5e3bc49bf1 | |
|
|
ceb02db5b8 | |
|
|
581a5da641 | |
|
|
bd7823e539 | |
|
|
193f03e404 | |
|
|
58fd600871 | |
|
|
ef09ac0dcb | |
|
|
e2512e1859 | |
|
|
7575a48961 | |
|
|
dfec22a65e | |
|
|
7e10f5b09f | |
|
|
8c108af423 | |
|
|
8f804a31b5 | |
|
|
f4945e157a | |
|
|
587879842d | |
|
|
991cf2c9be | |
|
|
6a4e7387fc | |
|
|
a396a42d68 | |
|
|
ef7a965551 | |
|
|
3c1c831de4 | |
|
|
0ee73352c3 | |
|
|
c04e1e2ce4 | |
|
|
e3c0d1e684 | |
|
|
4060aabd27 | |
|
|
871516003f | |
|
|
da4f1a1bf7 | |
|
|
ec993bc2de | |
|
|
c5d1e65728 | |
|
|
fb2232b54f | |
|
|
14fa7efb74 | |
|
|
d39092e447 | |
|
|
f1d00798bf | |
|
|
c61b94ee17 | |
|
|
3d4c51b6d9 | |
|
|
154592cb9a | |
|
|
c32d7e7b5c | |
|
|
2f5568284f | |
|
|
9f2696c98a | |
|
|
f9bf892e25 | |
|
|
ce29792f53 | |
|
|
b68bc62da0 | |
|
|
28f55707bc | |
|
|
0c9db91e7f | |
|
|
63d5fea846 | |
|
|
6daae712b5 | |
|
|
f8006b44b7 | |
|
|
022ac5922a | |
|
|
e4747a5ccf | |
|
|
0de9ffa666 | |
|
|
e05c32d462 | |
|
|
9d5fe284c6 | |
|
|
eee0b9c069 | |
|
|
b4717f0c9a | |
|
|
9adfa004ec | |
|
|
98556bd4e8 | |
|
|
efca52a3ea | |
|
|
1b4cf03cea | |
|
|
e0ae576de1 | |
|
|
93cc7a1052 | |
|
|
20c5286c7c | |
|
|
8a41324bbd | |
|
|
89be0cfb89 | |
|
|
2a9baa7354 | |
|
|
a1f9697b64 | |
|
|
7e5d5325bf | |
|
|
03e3a1d4c3 | |
|
|
f8e21c5bf7 | |
|
|
a07e6b6adc | |
|
|
f188051c3a | |
|
|
595cc6897c | |
|
|
bf39ba1803 | |
|
|
ebe3373c73 | |
|
|
065a85cc28 | |
|
|
6c63ab9110 | |
|
|
723c6c03bf | |
|
|
f88a58cecb | |
|
|
3a0081e45b | |
|
|
3c5911b8a9 | |
|
|
0cd203af4e | |
|
|
4b7fd20413 | |
|
|
d9f85927fd | |
|
|
cc3dde3174 | |
|
|
ce8ec2ee7e | |
|
|
f60b137608 | |
|
|
8605ba634c | |
|
|
7f32cbc96f | |
|
|
4e5f561c73 | |
|
|
6f9281c25b | |
|
|
b42791542d | |
|
|
3f754b9ef6 | |
|
|
269ca6f328 | |
|
|
a30e8eabbd | |
|
|
9ea26413d9 | |
|
|
629ed1299a | |
|
|
87c21dc717 | |
|
|
5fa8be28e3 | |
|
|
36580431d3 | |
|
|
443248d28e | |
|
|
b121baede4 | |
|
|
9844091074 | |
|
|
10fe5e9de1 | |
|
|
e869ef7b62 | |
|
|
a54c0dca73 | |
|
|
8f3fb7e4e2 | |
|
|
94f941a1e5 | |
|
|
65bc9e27f2 | |
|
|
420accac73 | |
|
|
ba67980170 | |
|
|
b8a9bbe373 | |
|
|
3da36fb45d | |
|
|
414cf00f4f | |
|
|
ee79e019e3 | |
|
|
5b1e090544 | |
|
|
437b52372d | |
|
|
4b2570debc | |
|
|
1dc296a1b4 | |
|
|
f0fc40bb1d | |
|
|
dba47ff264 | |
|
|
fba95a7f95 | |
|
|
367d7e1adf | |
|
|
4ccdd97698 | |
|
|
9ab0f55cb5 | |
|
|
cc22497ec4 | |
|
|
d11dfa4223 | |
|
|
6cb48fbe1e | |
|
|
0556d6182d | |
|
|
63cd33c8c4 | |
|
|
274c8f6bba | |
|
|
78153ef33d | |
|
|
8f3547b1a8 | |
|
|
3c2bde6892 | |
|
|
65063ace8d | |
|
|
b708f3a2b0 | |
|
|
6899312e11 | |
|
|
08da1932fd | |
|
|
11c9b57a72 | |
|
|
a6b3580c3e | |
|
|
074cf5ba40 | |
|
|
c8a4f2eef2 | |
|
|
2f81783965 | |
|
|
6dd3ca4230 | |
|
|
9ebabd646f | |
|
|
43d32fdfea | |
|
|
421e3f622c | |
|
|
4ccbdfa20a | |
|
|
7f49d49717 | |
|
|
5f9cec0836 | |
|
|
1ef2a82af8 | |
|
|
23b1cd791f | |
|
|
a2ded7300c | |
|
|
5c42776c50 | |
|
|
b38d62494f | |
|
|
d488f9c649 | |
|
|
03ed8882f2 | |
|
|
0e1c3d6155 | |
|
|
9f303ca83c | |
|
|
0f407357e3 | |
|
|
aee74af5a0 | |
|
|
1b3bc47cc5 | |
|
|
9d329bb771 | |
|
|
9cc4386b3a | |
|
|
9aa7d6212d | |
|
|
f3458ce478 | |
|
|
c2b40e8397 | |
|
|
a0d8efe152 | |
|
|
166929ac4c | |
|
|
e458ef9898 | |
|
|
c061da352d | |
|
|
8e70adc89b | |
|
|
bb97cde734 | |
|
|
ab8736ed17 | |
|
|
ef52310e90 | |
|
|
916118cb05 | |
|
|
3abda526a2 | |
|
|
e1a52fcdad | |
|
|
c551c6a63c | |
|
|
4ae636f4d2 | |
|
|
ef64da32a6 | |
|
|
0989ec1c08 | |
|
|
2ec42912fd | |
|
|
74c384ebe5 | |
|
|
e4a1c9311d | |
|
|
e14d6818b1 | |
|
|
5639cdc491 | |
|
|
aa820b38dc | |
|
|
27414b458d | |
|
|
a8b07dbe42 | |
|
|
8bbc1941e8 | |
|
|
f7e09860e3 | |
|
|
578e36362e | |
|
|
7e65cf62ad | |
|
|
969c5cb752 | |
|
|
f3922a425d | |
|
|
69f5bd3eb2 | |
|
|
b85de01ba8 | |
|
|
b66e09de0e | |
|
|
be433596c1 | |
|
|
89e60a34bf | |
|
|
a0a01e4807 | |
|
|
e5c4c3c563 | |
|
|
f178cd48a8 | |
|
|
da57cba2a1 | |
|
|
4ae217c887 |
|
|
@ -0,0 +1,15 @@
|
||||||
|
target
|
||||||
|
|
||||||
|
#idea
|
||||||
|
*.iml
|
||||||
|
.idea
|
||||||
|
out/
|
||||||
|
|
||||||
|
#eclipse
|
||||||
|
.classpath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
.java-version
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
asfMavenStdBuild(javaVersions:['8','7'])
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
mvn -Preporting site site:stage $@
|
||||||
|
mvn scm-publish:publish-scm $@
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<!--
|
||||||
|
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
~ or more contributor license agreements. See the NOTICE file
|
||||||
|
~ distributed with this work for additional information
|
||||||
|
~ regarding copyright ownership. The ASF licenses this file
|
||||||
|
~ to you under the Apache License, Version 2.0 (the
|
||||||
|
~ "License"); you may not use this file except in compliance
|
||||||
|
~ with the License. You may obtain a copy of the License at
|
||||||
|
~
|
||||||
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
~
|
||||||
|
~ Unless required by applicable law or agreed to in writing,
|
||||||
|
~ software distributed under the License is distributed on an
|
||||||
|
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
~ KIND, either express or implied. See the License for the
|
||||||
|
~ specific language governing permissions and limitations
|
||||||
|
~ under the License.
|
||||||
|
-->
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<artifactId>maven-plugin-tools</artifactId>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<version>3.5.1-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>maven-plugin-annotations</artifactId>
|
||||||
|
|
||||||
|
<name>Maven Plugin Tools Java 5 Annotations</name>
|
||||||
|
<description>Java 5 annotations to use in Mojos</description>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>maven-artifact</artifactId>
|
||||||
|
<version>3.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
package org.apache.maven.plugins.annotations;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import java.lang.annotation.Documented;
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Inherited;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to configure injection of Plexus components by
|
||||||
|
* <a href="/ref/current/maven-core/apidocs/org/apache/maven/plugin/MavenPluginManager.html">
|
||||||
|
* <code>MavenPluginManager.getConfiguredMojo(...)</code></a>.
|
||||||
|
*
|
||||||
|
* @author Olivier Lamy
|
||||||
|
* @since 3.0
|
||||||
|
*/
|
||||||
|
@Documented
|
||||||
|
@Retention( RetentionPolicy.CLASS )
|
||||||
|
@Target( { ElementType.FIELD } )
|
||||||
|
@Inherited
|
||||||
|
public @interface Component
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* role of the component to inject.
|
||||||
|
* @return the role
|
||||||
|
*/
|
||||||
|
Class<?> role() default Object.class;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hint of the component to inject.
|
||||||
|
* @return the hint
|
||||||
|
*/
|
||||||
|
String hint() default "";
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
package org.apache.maven.plugins.annotations;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import java.lang.annotation.Documented;
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Inherited;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used if your Mojo needs to fork a <a href="/ref/3.0.4/maven-core/lifecycles.html">lifecycle</a>.
|
||||||
|
*
|
||||||
|
* @author Olivier Lamy
|
||||||
|
* @since 3.0
|
||||||
|
*/
|
||||||
|
@Documented
|
||||||
|
@Retention( RetentionPolicy.CLASS )
|
||||||
|
@Target( ElementType.TYPE )
|
||||||
|
@Inherited
|
||||||
|
public @interface Execute
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* lifecycle phase to fork. Note that specifying a phase overrides specifying a goal.
|
||||||
|
* @return the phase
|
||||||
|
*/
|
||||||
|
LifecyclePhase phase() default LifecyclePhase.NONE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* goal to fork. Note that specifying a phase overrides specifying a goal.
|
||||||
|
* @return the goal
|
||||||
|
*/
|
||||||
|
String goal() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lifecycle id to fork.
|
||||||
|
* @return the lifecycle id
|
||||||
|
*/
|
||||||
|
String lifecycle() default "";
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
package org.apache.maven.plugins.annotations;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Component instantiation strategy.
|
||||||
|
*
|
||||||
|
* @author Hervé Boutemy
|
||||||
|
* @since 3.0
|
||||||
|
*/
|
||||||
|
public enum InstantiationStrategy
|
||||||
|
{
|
||||||
|
PER_LOOKUP( "per-lookup" ),
|
||||||
|
SINGLETON( "singleton" ),
|
||||||
|
KEEP_ALIVE( "keep-alive" ),
|
||||||
|
POOLABLE( "poolable" );
|
||||||
|
|
||||||
|
private final String id;
|
||||||
|
|
||||||
|
InstantiationStrategy( String id )
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String id()
|
||||||
|
{
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,77 @@
|
||||||
|
package org.apache.maven.plugins.annotations;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <a href="/ref/3.0.4/maven-core/lifecycles.html">Lifecycle phases</a>.
|
||||||
|
* @author Olivier Lamy
|
||||||
|
* @since 3.0
|
||||||
|
*/
|
||||||
|
public enum LifecyclePhase
|
||||||
|
{
|
||||||
|
|
||||||
|
VALIDATE( "validate" ),
|
||||||
|
INITIALIZE( "initialize" ),
|
||||||
|
GENERATE_SOURCES( "generate-sources" ),
|
||||||
|
PROCESS_SOURCES( "process-sources" ),
|
||||||
|
GENERATE_RESOURCES( "generate-resources" ),
|
||||||
|
PROCESS_RESOURCES( "process-resources" ),
|
||||||
|
COMPILE( "compile" ),
|
||||||
|
PROCESS_CLASSES( "process-classes" ),
|
||||||
|
GENERATE_TEST_SOURCES( "generate-test-sources" ),
|
||||||
|
PROCESS_TEST_SOURCES( "process-test-sources" ),
|
||||||
|
GENERATE_TEST_RESOURCES( "generate-test-resources" ),
|
||||||
|
PROCESS_TEST_RESOURCES( "process-test-resources" ),
|
||||||
|
TEST_COMPILE( "test-compile" ),
|
||||||
|
PROCESS_TEST_CLASSES( "process-test-classes" ),
|
||||||
|
TEST( "test" ),
|
||||||
|
PREPARE_PACKAGE( "prepare-package" ),
|
||||||
|
PACKAGE( "package" ),
|
||||||
|
PRE_INTEGRATION_TEST( "pre-integration-test" ),
|
||||||
|
INTEGRATION_TEST( "integration-test" ),
|
||||||
|
POST_INTEGRATION_TEST( "post-integration-test" ),
|
||||||
|
VERIFY( "verify" ),
|
||||||
|
INSTALL( "install" ),
|
||||||
|
DEPLOY( "deploy" ),
|
||||||
|
|
||||||
|
PRE_CLEAN( "pre-clean" ),
|
||||||
|
CLEAN( "clean" ),
|
||||||
|
POST_CLEAN( "post-clean" ),
|
||||||
|
|
||||||
|
PRE_SITE( "pre-site" ),
|
||||||
|
SITE( "site" ),
|
||||||
|
POST_SITE( "post-site" ),
|
||||||
|
SITE_DEPLOY( "site-deploy" ),
|
||||||
|
|
||||||
|
NONE( "" );
|
||||||
|
|
||||||
|
private final String id;
|
||||||
|
|
||||||
|
LifecyclePhase( String id )
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String id()
|
||||||
|
{
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,120 @@
|
||||||
|
package org.apache.maven.plugins.annotations;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import java.lang.annotation.Documented;
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Inherited;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This annotation will mark your class as a Mojo (ie. goal in a Maven plugin).
|
||||||
|
*
|
||||||
|
* @author Olivier Lamy
|
||||||
|
* @since 3.0
|
||||||
|
*/
|
||||||
|
@Documented
|
||||||
|
@Retention( RetentionPolicy.CLASS )
|
||||||
|
@Target( ElementType.TYPE )
|
||||||
|
@Inherited
|
||||||
|
public @interface Mojo
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* goal name (required).
|
||||||
|
* @return the goal name
|
||||||
|
*/
|
||||||
|
String name();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* default phase to bind your mojo.
|
||||||
|
* @return the default phase
|
||||||
|
*/
|
||||||
|
LifecyclePhase defaultPhase() default LifecyclePhase.NONE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the required dependency resolution scope.
|
||||||
|
* @return the required dependency resolution scope
|
||||||
|
*/
|
||||||
|
ResolutionScope requiresDependencyResolution() default ResolutionScope.NONE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the required dependency collection scope.
|
||||||
|
* @return the required dependency collection scope
|
||||||
|
*/
|
||||||
|
ResolutionScope requiresDependencyCollection() default ResolutionScope.NONE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* your Mojo instantiation strategy. (Only <code>per-lookup</code> and <code>singleton</code> are supported)
|
||||||
|
* @return the instantiation strategy
|
||||||
|
*/
|
||||||
|
InstantiationStrategy instantiationStrategy() default InstantiationStrategy.PER_LOOKUP;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* execution strategy: <code>once-per-session</code> or <code>always</code>.
|
||||||
|
* @return <code>once-per-session</code> or <code>always</code>
|
||||||
|
*/
|
||||||
|
String executionStrategy() default "once-per-session";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* does your mojo requires a project to be executed?
|
||||||
|
* @return requires a project
|
||||||
|
*/
|
||||||
|
boolean requiresProject() default true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* does your mojo requires a reporting context to be executed?
|
||||||
|
* @return requires a reporting context
|
||||||
|
*/
|
||||||
|
boolean requiresReports() default false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* if the Mojo uses the Maven project and its child modules.
|
||||||
|
* @return uses the Maven project and its child modules
|
||||||
|
*/
|
||||||
|
boolean aggregator() default false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* can this Mojo be invoked directly only?
|
||||||
|
* @return invoked directly only
|
||||||
|
*/
|
||||||
|
boolean requiresDirectInvocation() default false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* does this Mojo need to be online to be executed?
|
||||||
|
* @return need to be online
|
||||||
|
*/
|
||||||
|
boolean requiresOnline() default false;
|
||||||
|
|
||||||
|
boolean inheritByDefault() default true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* own configurator class.
|
||||||
|
* @return own configurator class
|
||||||
|
*/
|
||||||
|
String configurator() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* is your mojo thread safe (since Maven 3.x)?
|
||||||
|
* @return is thread safe
|
||||||
|
*/
|
||||||
|
boolean threadSafe() default false;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,88 @@
|
||||||
|
package org.apache.maven.plugins.annotations;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import java.lang.annotation.Documented;
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Inherited;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to configure your Mojo parameters to be injected by
|
||||||
|
* <a href="/ref/current/maven-core/apidocs/org/apache/maven/plugin/MavenPluginManager.html">
|
||||||
|
* <code>MavenPluginManager.getConfiguredMojo(...)</code></a>.
|
||||||
|
*
|
||||||
|
* @author Olivier Lamy
|
||||||
|
* @since 3.0
|
||||||
|
*/
|
||||||
|
@Documented
|
||||||
|
@Retention( RetentionPolicy.CLASS )
|
||||||
|
@Target( { ElementType.FIELD } )
|
||||||
|
@Inherited
|
||||||
|
public @interface Parameter
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* name of the bean property used to get/set the field: by default, field name is used.
|
||||||
|
* @return the name of the bean property
|
||||||
|
*/
|
||||||
|
String name() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* alias supported to get parameter value.
|
||||||
|
* @return the alias
|
||||||
|
*/
|
||||||
|
String alias() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Property to use to retrieve a value. Can come from <code>-D</code> execution, setting properties or pom
|
||||||
|
* properties.
|
||||||
|
* @return property name
|
||||||
|
*/
|
||||||
|
String property() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* parameter default value, eventually containing <code>${...}</code> expressions which will be interpreted at
|
||||||
|
* inject time: see
|
||||||
|
* <a href="/ref/current/maven-core/apidocs/org/apache/maven/plugin/PluginParameterExpressionEvaluator.html">
|
||||||
|
* PluginParameterExpressionEvaluator</a>.
|
||||||
|
* @return the default value
|
||||||
|
*/
|
||||||
|
String defaultValue() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* is the parameter required?
|
||||||
|
* @return <code>true</code> if the Mojo should fail when the parameter cannot be injected
|
||||||
|
*/
|
||||||
|
boolean required() default false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies that this parameter cannot be configured directly by the user (as in the case of POM-specified
|
||||||
|
* configuration). This is useful when you want to force the user to use common POM elements rather than plugin
|
||||||
|
* configurations, as in the case where you want to use the artifact's final name as a parameter. In this case, you
|
||||||
|
* want the user to modify <code><build><finalName/></build></code> rather than specifying a value
|
||||||
|
* for finalName directly in the plugin configuration section. It is also useful to ensure that - for example - a
|
||||||
|
* List-typed parameter which expects items of type Artifact doesn't get a List full of Strings.
|
||||||
|
*
|
||||||
|
* @return <code>true</code> if the user should not be allowed to configure the parameter directly
|
||||||
|
*/
|
||||||
|
boolean readonly() default false;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
package org.apache.maven.plugins.annotations;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.artifact.Artifact;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dependencies resolution scopes available before
|
||||||
|
* <a href="/ref/current/maven-core/apidocs/org/apache/maven/lifecycle/internal/MojoExecutor.html">mojo execution</a>.
|
||||||
|
*
|
||||||
|
* @author Hervé Boutemy
|
||||||
|
* @since 3.0
|
||||||
|
*/
|
||||||
|
public enum ResolutionScope
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* empty resolution scope
|
||||||
|
*/
|
||||||
|
NONE( null ),
|
||||||
|
/**
|
||||||
|
* <code>compile</code> resolution scope
|
||||||
|
* = <code>compile</code> + <code>system</code> + <code>provided</code> dependencies
|
||||||
|
*/
|
||||||
|
COMPILE( Artifact.SCOPE_COMPILE ),
|
||||||
|
/**
|
||||||
|
* <code>compile+runtime</code> resolution scope (Maven 3 only)
|
||||||
|
* = <code>compile</code> + <code>system</code> + <code>provided</code> + <code>runtime</code> dependencies
|
||||||
|
*/
|
||||||
|
COMPILE_PLUS_RUNTIME( Artifact.SCOPE_COMPILE_PLUS_RUNTIME ),
|
||||||
|
/**
|
||||||
|
* <code>runtime</code> resolution scope
|
||||||
|
* = <code>compile</code> + <code>runtime</code> dependencies
|
||||||
|
*/
|
||||||
|
RUNTIME( Artifact.SCOPE_RUNTIME ),
|
||||||
|
/**
|
||||||
|
* <code>runtime+system</code> resolution scope (Maven 3 only)
|
||||||
|
* = <code>compile</code> + <code>system</code> + <code>runtime</code> dependencies
|
||||||
|
*/
|
||||||
|
RUNTIME_PLUS_SYSTEM( Artifact.SCOPE_RUNTIME_PLUS_SYSTEM ),
|
||||||
|
/**
|
||||||
|
* <code>test</code> resolution scope
|
||||||
|
* = <code>compile</code> + <code>system</code> + <code>provided</code> + <code>runtime</code> + <code>test</code>
|
||||||
|
* dependencies
|
||||||
|
*/
|
||||||
|
TEST( Artifact.SCOPE_TEST );
|
||||||
|
|
||||||
|
private final String id;
|
||||||
|
|
||||||
|
ResolutionScope( String id )
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String id()
|
||||||
|
{
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
------
|
||||||
|
About ${project.name}
|
||||||
|
------
|
||||||
|
Hervé Boutemy
|
||||||
|
------
|
||||||
|
2012-06-03
|
||||||
|
------
|
||||||
|
|
||||||
|
~~ Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
~~ or more contributor license agreements. See the NOTICE file
|
||||||
|
~~ distributed with this work for additional information
|
||||||
|
~~ regarding copyright ownership. The ASF licenses this file
|
||||||
|
~~ to you under the Apache License, Version 2.0 (the
|
||||||
|
~~ "License"); you may not use this file except in compliance
|
||||||
|
~~ with the License. You may obtain a copy of the License at
|
||||||
|
~~
|
||||||
|
~~ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
~~
|
||||||
|
~~ Unless required by applicable law or agreed to in writing,
|
||||||
|
~~ software distributed under the License is distributed on an
|
||||||
|
~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
~~ KIND, either express or implied. See the License for the
|
||||||
|
~~ specific language governing permissions and limitations
|
||||||
|
~~ under the License.
|
||||||
|
|
||||||
|
~~ NOTE: For help with the syntax of this file, see:
|
||||||
|
~~ http://maven.apache.org/doxia/references/apt-format.html
|
||||||
|
|
||||||
|
About ${project.name}
|
||||||
|
|
||||||
|
${project.description}
|
||||||
|
|
||||||
|
* Usage
|
||||||
|
|
||||||
|
To be able to {{{../maven-plugin-tools-annotations/index.html}use Maven Plugin Tools Java 5 Annotations}},
|
||||||
|
some configuration has to be done in <<<pom.xml>>>: see
|
||||||
|
{{{../maven-plugin-plugin/examples/using-annotations.html#POM_configuration} Using Plugin Tools Java5 Annotations}}
|
||||||
|
example in {{{../maven-plugin-plugin} <<<maven-plugin-plugin>>>}} documentation.
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<project xmlns="http://maven.apache.org/DECORATION/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
|
||||||
|
<body>
|
||||||
|
<menu name="Overview">
|
||||||
|
<item name="Introduction" href="index.html"/>
|
||||||
|
<item name="JavaDocs" href="apidocs/index.html"/>
|
||||||
|
<item name="Source Xref" href="xref/index.html"/>
|
||||||
|
<!--item name="FAQ" href="faq.html"/-->
|
||||||
|
</menu>
|
||||||
|
</body>
|
||||||
|
</project>
|
||||||
|
|
@ -17,18 +17,17 @@
|
||||||
~ specific language governing permissions and limitations
|
~ specific language governing permissions and limitations
|
||||||
~ under the License.
|
~ under the License.
|
||||||
-->
|
-->
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<artifactId>maven-plugin-tools</artifactId>
|
||||||
<artifactId>maven-plugins</artifactId>
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
<version>11</version>
|
<version>3.5.1-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-plugin-plugin</artifactId>
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
<version>2.4.3</version>
|
|
||||||
<packaging>maven-plugin</packaging>
|
<packaging>maven-plugin</packaging>
|
||||||
|
|
||||||
<name>Maven Plugin Plugin</name>
|
<name>Maven Plugin Plugin</name>
|
||||||
|
|
@ -38,72 +37,49 @@
|
||||||
plugin registry, the artifact metadata and a generic help goal.
|
plugin registry, the artifact metadata and a generic help goal.
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<scm>
|
|
||||||
<connection>scm:svn:http://svn.apache.org/repos/asf/maven/plugin-tools/tags/maven-plugin-tools-2.4.3/maven-plugin-plugin</connection>
|
|
||||||
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/plugin-tools/tags/maven-plugin-tools-2.4.3/maven-plugin-plugin</developerConnection>
|
|
||||||
<url>http://svn.apache.org/viewvc/maven/plugin-tools/tags/maven-plugin-tools-2.4.3/maven-plugin-plugin</url>
|
|
||||||
</scm>
|
|
||||||
<issueManagement>
|
|
||||||
<system>jira</system>
|
|
||||||
<url>http://jira.codehaus.org/browse/MPLUGIN</url>
|
|
||||||
</issueManagement>
|
|
||||||
<distributionManagement>
|
|
||||||
<site>
|
|
||||||
<id>apache.website</id>
|
|
||||||
<url>scp://people.apache.org/www/maven.apache.org/plugins/maven-plugin-plugin</url>
|
|
||||||
</site>
|
|
||||||
</distributionManagement>
|
|
||||||
|
|
||||||
<prerequisites>
|
<prerequisites>
|
||||||
<maven>2.0.6</maven>
|
<maven>2.2.1</maven>
|
||||||
</prerequisites>
|
</prerequisites>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<doxiaVersion>1.0-alpha-10</doxiaVersion>
|
<doxiaVersion>1.4</doxiaVersion>
|
||||||
<doxia-sitetoolsVersion>1.0-alpha-10</doxia-sitetoolsVersion>
|
<doxia-sitetoolsVersion>1.4</doxia-sitetoolsVersion>
|
||||||
<pluginToolsVersion>2.4.3</pluginToolsVersion>
|
<it.debug>true</it.debug>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- Copy from project up -->
|
|
||||||
<dependencyManagement>
|
|
||||||
<dependencies>
|
|
||||||
<!-- maven -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-api</artifactId>
|
|
||||||
<version>${pluginToolsVersion}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-model</artifactId>
|
|
||||||
<version>${pluginToolsVersion}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-java</artifactId>
|
|
||||||
<version>${pluginToolsVersion}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-beanshell</artifactId>
|
|
||||||
<version>${pluginToolsVersion}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.maven</groupId>
|
|
||||||
<artifactId>maven-plugin-descriptor</artifactId>
|
|
||||||
<version>2.0.6</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- plexus -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.codehaus.plexus</groupId>
|
|
||||||
<artifactId>plexus-utils</artifactId>
|
|
||||||
<version>1.5.6</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</dependencyManagement>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<artifactId>maven-plugin-tools-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<artifactId>maven-plugin-tools-generators</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- runtime extractors used by default by plugin-tools -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<artifactId>maven-plugin-tools-java</artifactId>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<artifactId>maven-plugin-tools-annotations</artifactId>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<!-- for source code annotations of the mojos -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<artifactId>maven-plugin-annotations</artifactId>
|
||||||
|
<!-- from stricter view, should use ${mavenPluginToolsVersion} but this is causing problems with release plugin -->
|
||||||
|
<!--version>${mavenPluginToolsVersion}</version-->
|
||||||
|
<!--
|
||||||
|
Do not use 'provided' scope here. The annotations are a transitive dependency of
|
||||||
|
'maven-plugin-tools-annotations' which fails to load at runtime when not available.
|
||||||
|
-->
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- doxia -->
|
<!-- doxia -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven.doxia</groupId>
|
<groupId>org.apache.maven.doxia</groupId>
|
||||||
|
|
@ -126,72 +102,53 @@
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- maven -->
|
<!-- Maven -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven</groupId>
|
||||||
<artifactId>maven-plugin-api</artifactId>
|
<artifactId>maven-plugin-api</artifactId>
|
||||||
<version>2.0.6</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven</groupId>
|
||||||
<artifactId>maven-model</artifactId>
|
<artifactId>maven-model</artifactId>
|
||||||
<version>2.0.6</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven</groupId>
|
||||||
<artifactId>maven-repository-metadata</artifactId>
|
<artifactId>maven-repository-metadata</artifactId>
|
||||||
<version>2.0.6</version>
|
<version>${mavenVersion}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven</groupId>
|
||||||
<artifactId>maven-project</artifactId>
|
<artifactId>maven-project</artifactId>
|
||||||
<version>2.0.6</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven</groupId>
|
||||||
<artifactId>maven-plugin-descriptor</artifactId>
|
<artifactId>maven-plugin-descriptor</artifactId>
|
||||||
<version>2.0.6</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven</groupId>
|
||||||
<artifactId>maven-plugin-registry</artifactId>
|
<artifactId>maven-plugin-registry</artifactId>
|
||||||
<version>2.0.6</version>
|
<version>${mavenVersion}</version>
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-api</artifactId>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven</groupId>
|
||||||
<artifactId>maven-artifact-manager</artifactId>
|
<artifactId>maven-artifact-manager</artifactId>
|
||||||
<version>2.0.6</version>
|
<version>${mavenVersion}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven</groupId>
|
||||||
<artifactId>maven-artifact</artifactId>
|
<artifactId>maven-artifact</artifactId>
|
||||||
<version>2.0.6</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- shared -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven.reporting</groupId>
|
<groupId>org.apache.maven.reporting</groupId>
|
||||||
<artifactId>maven-reporting-impl</artifactId>
|
<artifactId>maven-reporting-impl</artifactId>
|
||||||
<version>2.0.4.1</version>
|
<version>2.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven.reporting</groupId>
|
<groupId>org.apache.maven.reporting</groupId>
|
||||||
<artifactId>maven-reporting-api</artifactId>
|
<artifactId>maven-reporting-api</artifactId>
|
||||||
<version>2.0.4</version>
|
<version>3.0</version>
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- Maven runtime -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-java</artifactId>
|
|
||||||
<scope>runtime</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-beanshell</artifactId>
|
|
||||||
<scope>runtime</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- plexus -->
|
<!-- plexus -->
|
||||||
|
|
@ -199,41 +156,74 @@
|
||||||
<groupId>org.codehaus.plexus</groupId>
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
<artifactId>plexus-utils</artifactId>
|
<artifactId>plexus-utils</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-velocity</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>velocity</groupId>
|
||||||
|
<artifactId>velocity</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.surefire</groupId>
|
||||||
|
<artifactId>maven-surefire-common</artifactId>
|
||||||
|
<version>2.19.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- other -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.velocity</groupId>
|
||||||
|
<artifactId>velocity</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- needed for it tests -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<artifactId>maven-script-beanshell</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<artifactId>maven-script-ant</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
</resource>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/filtered-resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
<!-- pin to a previous version so it doesn't get reloaded during build -->
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.rat</groupId>
|
||||||
<artifactId>maven-plugin-plugin</artifactId>
|
<artifactId>apache-rat-plugin</artifactId>
|
||||||
<version>2.4.2</version>
|
<configuration>
|
||||||
</plugin>
|
<excludes combine.children="append">
|
||||||
<plugin>
|
<!-- This file should exactly match the output of this project -->
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<exclude>src/it/help-basic/expected-help.txt</exclude>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
</excludes>
|
||||||
<version>2.4</version>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-plugin-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>generated-helpmojo</id>
|
|
||||||
<goals>
|
|
||||||
<goal>helpmojo</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.modello</groupId>
|
<groupId>org.codehaus.modello</groupId>
|
||||||
<artifactId>modello-maven-plugin</artifactId>
|
<artifactId>modello-maven-plugin</artifactId>
|
||||||
<version>1.0-alpha-18</version>
|
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
|
|
@ -248,14 +238,71 @@
|
||||||
</models>
|
</models>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-enforcer-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>enforce</goal>
|
||||||
|
</goals>
|
||||||
|
<id>ensure-no-container-api</id>
|
||||||
|
<configuration>
|
||||||
|
<rules>
|
||||||
|
<bannedDependencies>
|
||||||
|
<excludes>
|
||||||
|
<exclude>org.codehaus.plexus:plexus-component-api</exclude>
|
||||||
|
</excludes>
|
||||||
|
<message>The new containers are not supported. You probably added a dependency that is missing the exclusions.</message>
|
||||||
|
</bannedDependencies>
|
||||||
|
</rules>
|
||||||
|
<fail>true</fail>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<version>3.5</version>
|
||||||
|
<!-- will use previous maven-plugin-plugin release to build current maven-plugin-plugin as configured in parent -->
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default-descriptor</id>
|
||||||
|
<phase>process-classes</phase>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>generated-helpmojo</id>
|
||||||
|
<goals>
|
||||||
|
<goal>helpmojo</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<reporting>
|
<reporting>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<version>2.1</version>
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<version>3.3</version><!-- cannot use ${mavenPluginToolsVersion} property because release plugin would try to update -->
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>report</report>
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-invoker-plugin</artifactId>
|
||||||
|
<version>${mavenInvokerPluginVersion}</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</reporting>
|
</reporting>
|
||||||
|
|
@ -265,28 +312,34 @@
|
||||||
<id>reporting</id>
|
<id>reporting</id>
|
||||||
<reporting>
|
<reporting>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-invoker-plugin</artifactId>
|
||||||
|
<version>${mavenInvokerPluginVersion}</version>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>l10n-maven-plugin</artifactId>
|
<artifactId>l10n-maven-plugin</artifactId>
|
||||||
<version>1.0-alpha-1</version>
|
<version>1.0-alpha-2</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<locales>
|
<locales>
|
||||||
<locale>de</locale>
|
<locale>de</locale>
|
||||||
<locale>fr</locale>
|
<locale>fr</locale>
|
||||||
|
<locale>sv</locale>
|
||||||
</locales>
|
</locales>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-changes-plugin</artifactId>
|
<artifactId>maven-changes-plugin</artifactId>
|
||||||
<version>2.0</version>
|
<version>2.5</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<!-- For JIRA-report -->
|
<!-- For JIRA-report -->
|
||||||
<columnNames>Type,Key,Summary,Assignee,Status,Resolution,Fix Version</columnNames>
|
<columnNames>Type,Key,Summary,Assignee,Status,Resolution,Fix Version</columnNames>
|
||||||
|
<maxEntries>200</maxEntries>
|
||||||
<onlyCurrentVersion>true</onlyCurrentVersion>
|
<onlyCurrentVersion>true</onlyCurrentVersion>
|
||||||
<resolutionIds>Closed</resolutionIds>
|
<resolutionIds>Closed</resolutionIds>
|
||||||
<sortColumnNames>Type,Key</sortColumnNames>
|
<sortColumnNames>Type,Key</sortColumnNames>
|
||||||
<component>13021</component>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
<reportSets>
|
<reportSets>
|
||||||
<reportSet>
|
<reportSet>
|
||||||
|
|
@ -296,183 +349,75 @@
|
||||||
</reportSet>
|
</reportSet>
|
||||||
</reportSets>
|
</reportSets>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-plugin-plugin</artifactId>
|
|
||||||
<version>2.4.2</version>
|
|
||||||
</plugin>
|
|
||||||
<!-- TODO: remove when maven-plugins parent pom 12 is released -->
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<taglets>
|
|
||||||
<taglet>
|
|
||||||
<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet</tagletClass>
|
|
||||||
<tagletArtifact>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-javadoc</artifactId>
|
|
||||||
<version>2.4.2</version>
|
|
||||||
</tagletArtifact>
|
|
||||||
</taglet>
|
|
||||||
<taglet>
|
|
||||||
<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet</tagletClass>
|
|
||||||
<tagletArtifact>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-javadoc</artifactId>
|
|
||||||
<version>2.4.2</version>
|
|
||||||
</tagletArtifact>
|
|
||||||
</taglet>
|
|
||||||
<taglet>
|
|
||||||
<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet</tagletClass>
|
|
||||||
<tagletArtifact>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-javadoc</artifactId>
|
|
||||||
<version>2.4.2</version>
|
|
||||||
</tagletArtifact>
|
|
||||||
</taglet>
|
|
||||||
<taglet>
|
|
||||||
<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoExecuteTypeTaglet</tagletClass>
|
|
||||||
<tagletArtifact>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-javadoc</artifactId>
|
|
||||||
<version>2.4.2</version>
|
|
||||||
</tagletArtifact>
|
|
||||||
</taglet>
|
|
||||||
<taglet>
|
|
||||||
<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet</tagletClass>
|
|
||||||
<tagletArtifact>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-javadoc</artifactId>
|
|
||||||
<version>2.4.2</version>
|
|
||||||
</tagletArtifact>
|
|
||||||
</taglet>
|
|
||||||
<taglet>
|
|
||||||
<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoGoalTypeTaglet</tagletClass>
|
|
||||||
<tagletArtifact>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-javadoc</artifactId>
|
|
||||||
<version>2.4.2</version>
|
|
||||||
</tagletArtifact>
|
|
||||||
</taglet>
|
|
||||||
<taglet>
|
|
||||||
<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet</tagletClass>
|
|
||||||
<tagletArtifact>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-javadoc</artifactId>
|
|
||||||
<version>2.4.2</version>
|
|
||||||
</tagletArtifact>
|
|
||||||
</taglet>
|
|
||||||
<taglet>
|
|
||||||
<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet</tagletClass>
|
|
||||||
<tagletArtifact>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-javadoc</artifactId>
|
|
||||||
<version>2.4.2</version>
|
|
||||||
</tagletArtifact>
|
|
||||||
</taglet>
|
|
||||||
<taglet>
|
|
||||||
<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet</tagletClass>
|
|
||||||
<tagletArtifact>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-javadoc</artifactId>
|
|
||||||
<version>2.4.2</version>
|
|
||||||
</tagletArtifact>
|
|
||||||
</taglet>
|
|
||||||
<taglet>
|
|
||||||
<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoPhaseTypeTaglet</tagletClass>
|
|
||||||
<tagletArtifact>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-javadoc</artifactId>
|
|
||||||
<version>2.4.2</version>
|
|
||||||
</tagletArtifact>
|
|
||||||
</taglet>
|
|
||||||
<taglet>
|
|
||||||
<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoReadOnlyFieldTaglet</tagletClass>
|
|
||||||
<tagletArtifact>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-javadoc</artifactId>
|
|
||||||
<version>2.4.2</version>
|
|
||||||
</tagletArtifact>
|
|
||||||
</taglet>
|
|
||||||
<taglet>
|
|
||||||
<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiredFieldTaglet</tagletClass>
|
|
||||||
<tagletArtifact>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-javadoc</artifactId>
|
|
||||||
<version>2.4.2</version>
|
|
||||||
</tagletArtifact>
|
|
||||||
</taglet>
|
|
||||||
<taglet>
|
|
||||||
<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresDependencyResolutionTypeTaglet</tagletClass>
|
|
||||||
<tagletArtifact>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-javadoc</artifactId>
|
|
||||||
<version>2.4.2</version>
|
|
||||||
</tagletArtifact>
|
|
||||||
</taglet>
|
|
||||||
<taglet>
|
|
||||||
<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresDirectInvocationTypeTaglet</tagletClass>
|
|
||||||
<tagletArtifact>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-javadoc</artifactId>
|
|
||||||
<version>2.4.2</version>
|
|
||||||
</tagletArtifact>
|
|
||||||
</taglet>
|
|
||||||
<taglet>
|
|
||||||
<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet</tagletClass>
|
|
||||||
<tagletArtifact>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-javadoc</artifactId>
|
|
||||||
<version>2.4.2</version>
|
|
||||||
</tagletArtifact>
|
|
||||||
</taglet>
|
|
||||||
<taglet>
|
|
||||||
<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet</tagletClass>
|
|
||||||
<tagletArtifact>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-javadoc</artifactId>
|
|
||||||
<version>2.4.2</version>
|
|
||||||
</tagletArtifact>
|
|
||||||
</taglet>
|
|
||||||
<taglet>
|
|
||||||
<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet</tagletClass>
|
|
||||||
<tagletArtifact>
|
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
|
||||||
<artifactId>maven-plugin-tools-javadoc</artifactId>
|
|
||||||
<version>2.4.2</version>
|
|
||||||
</tagletArtifact>
|
|
||||||
</taglet>
|
|
||||||
|
|
||||||
<taglet>
|
|
||||||
<tagletClass>org.codehaus.plexus.javadoc.PlexusComponentTaglet</tagletClass>
|
|
||||||
<tagletArtifact>
|
|
||||||
<groupId>org.codehaus.plexus</groupId>
|
|
||||||
<artifactId>plexus-javadoc</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</tagletArtifact>
|
|
||||||
</taglet>
|
|
||||||
<taglet>
|
|
||||||
<tagletClass>org.codehaus.plexus.javadoc.PlexusConfigurationTaglet</tagletClass>
|
|
||||||
<tagletArtifact>
|
|
||||||
<groupId>org.codehaus.plexus</groupId>
|
|
||||||
<artifactId>plexus-javadoc</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</tagletArtifact>
|
|
||||||
</taglet>
|
|
||||||
<taglet>
|
|
||||||
<tagletClass>org.codehaus.plexus.javadoc.PlexusRequirementTaglet</tagletClass>
|
|
||||||
<tagletArtifact>
|
|
||||||
<groupId>org.codehaus.plexus</groupId>
|
|
||||||
<artifactId>plexus-javadoc</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</tagletArtifact>
|
|
||||||
</taglet>
|
|
||||||
</taglets>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</reporting>
|
</reporting>
|
||||||
</profile>
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>run-its</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-invoker-plugin</artifactId>
|
||||||
|
<version>${mavenInvokerPluginVersion}</version>
|
||||||
|
<configuration>
|
||||||
|
<debug>${it.debug}</debug>
|
||||||
|
<projectsDirectory>src/it</projectsDirectory>
|
||||||
|
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
|
||||||
|
<preBuildHookScript>setup</preBuildHookScript>
|
||||||
|
<postBuildHookScript>verify</postBuildHookScript>
|
||||||
|
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
|
||||||
|
<settingsFile>src/it/settings.xml</settingsFile>
|
||||||
|
<filterProperties>
|
||||||
|
<sitePluginVersion>3.3</sitePluginVersion>
|
||||||
|
<antVersion>${antVersion}</antVersion>
|
||||||
|
</filterProperties>
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>${maven.compiler.source}</maven.compiler.source>
|
||||||
|
<maven.compiler.target>${maven.compiler.target}</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>integration-test</id>
|
||||||
|
<goals>
|
||||||
|
<goal>install</goal>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>maven-2</id>
|
||||||
|
<activation>
|
||||||
|
<file>
|
||||||
|
<!-- This employs that the basedir expression is only recognized by Maven 3.x (see MNG-2363) -->
|
||||||
|
<missing>${basedir}</missing>
|
||||||
|
</file>
|
||||||
|
</activation>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<!-- see https://issues.apache.org/jira/browse/MNG-5346 -->
|
||||||
|
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>mojo-descriptor</id>
|
||||||
|
<goals>
|
||||||
|
<goal>descriptor</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
invoker.goals.1 = install
|
||||||
|
invoker.goals.2 = org.apache.maven.its.annotation-with-inheritance-from-deps:annotation-with-inheritance-from-deps:1.0-SNAPSHOT:first
|
||||||
|
invoker.goals.3 = org.apache.maven.its.annotation-with-inheritance-from-deps:annotation-with-inheritance-from-deps:1.0-SNAPSHOT:help
|
||||||
|
|
@ -0,0 +1,136 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>org.apache.maven.its.annotation-with-inheritance-from-deps</groupId>
|
||||||
|
<artifactId>annotation-with-inheritance-from-deps</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>maven-plugin</packaging>
|
||||||
|
|
||||||
|
<name>Maven Integration Test :: annotation-with-inheritance-from-deps</name>
|
||||||
|
<description>
|
||||||
|
Test plugin-plugin, which tests maven-plugin-tools-api and
|
||||||
|
maven-plugin-tools-java. This will generate a plugin descriptor from
|
||||||
|
java-based mojo sources, install the plugin, and then use it.
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<plexusCompilerVersion>1.8.6</plexusCompilerVersion>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>maven-plugin-api</artifactId>
|
||||||
|
<version>2.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>maven-project</artifactId>
|
||||||
|
<version>@mavenVersion@</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<artifactId>maven-plugin-annotations</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<artifactId>maven-plugin-tools-annotations</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
|
<classifier>tests</classifier>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<!-- dependency of org.apache.maven.plugin-tools:maven-plugin-tools-annotations:@project.version@:jar:tests -->
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>3.8.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-compiler-manager</artifactId>
|
||||||
|
<version>${plexusCompilerVersion}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-component-api</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-compiler-javac</artifactId>
|
||||||
|
<version>${plexusCompilerVersion}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-component-api</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-utils</artifactId>
|
||||||
|
<version>3.0.1</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
|
<configuration>
|
||||||
|
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>mojo-descriptor</id>
|
||||||
|
<goals>
|
||||||
|
<goal>descriptor</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>help-goal</id>
|
||||||
|
<goals>
|
||||||
|
<goal>helpmojo</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
package org.apache.maven.plugin.coreit;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
|
import org.apache.maven.plugins.annotations.Component;
|
||||||
|
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||||
|
import org.apache.maven.plugins.annotations.Execute;
|
||||||
|
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||||
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
import org.apache.maven.plugins.annotations.Parameter;
|
||||||
|
import org.apache.maven.tools.plugin.extractor.annotations.FooMojo;
|
||||||
|
import org.apache.maven.project.MavenProjectHelper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Touches a test file.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
|
* @deprecated Don't use!
|
||||||
|
*/
|
||||||
|
@Mojo( name = "first", requiresDependencyResolution = ResolutionScope.TEST, defaultPhase = LifecyclePhase.INTEGRATION_TEST )
|
||||||
|
public class FirstMojo
|
||||||
|
extends FooMojo
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 0.1
|
||||||
|
* @deprecated As of 0.2
|
||||||
|
*/
|
||||||
|
@Parameter( alias = "alias" )
|
||||||
|
private String aliasedParam;
|
||||||
|
|
||||||
|
@Component( role = MavenProjectHelper.class )// , roleHint = "default"
|
||||||
|
private Object projectHelper;
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
throws MojoExecutionException
|
||||||
|
{
|
||||||
|
if ( bar == null )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "bar == null" );
|
||||||
|
}
|
||||||
|
if ( beer == null )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "beer == null" );
|
||||||
|
}
|
||||||
|
if ( projectHelper == null )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "projectHelper == null" );
|
||||||
|
}
|
||||||
|
if ( compilerManager == null )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "compilerManager == null" );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?xml version='1.0'?>
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<lifecycles>
|
||||||
|
<lifecycle>
|
||||||
|
<id>my-lifecycle</id>
|
||||||
|
<phases>
|
||||||
|
<phase>
|
||||||
|
<id>process-classes</id>
|
||||||
|
</phase>
|
||||||
|
<phase>
|
||||||
|
<id>test</id>
|
||||||
|
<configuration>
|
||||||
|
<classesDirectory>${project.build.directory}/generated-classes/cobertura</classesDirectory>
|
||||||
|
<testFailureIgnore>true</testFailureIgnore>
|
||||||
|
</configuration>
|
||||||
|
</phase>
|
||||||
|
</phases>
|
||||||
|
</lifecycle>
|
||||||
|
</lifecycles>
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
File descriptorFile = new File( basedir, "target/classes/META-INF/maven/plugin.xml" );
|
||||||
|
assert descriptorFile.isFile()
|
||||||
|
|
||||||
|
File oldHelpClass = new File( basedir, "target/classes/HelpMojo.class" );
|
||||||
|
assert !oldHelpClass.exists()
|
||||||
|
|
||||||
|
File newHelpClass = new File( basedir, "target/classes/org/apache/maven/plugin/coreit/HelpMojo.class" );
|
||||||
|
assert newHelpClass.exists()
|
||||||
|
|
||||||
|
def pluginDescriptor = new XmlParser().parse( descriptorFile );
|
||||||
|
|
||||||
|
def mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "first"}[0]
|
||||||
|
|
||||||
|
assert mojo.goal.text() == 'first'
|
||||||
|
assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.FirstMojo'
|
||||||
|
assert mojo.language.text() == 'java'
|
||||||
|
assert mojo.description.text() == 'Touches a test file.'
|
||||||
|
assert mojo.deprecated.text() == "Don't use!"
|
||||||
|
assert mojo.requiresDependencyResolution.text() == 'test'
|
||||||
|
assert mojo.requiresDependencyCollection.text() == ''
|
||||||
|
assert mojo.requiresProject.text() == 'true'
|
||||||
|
assert mojo.requiresOnline.text() == 'false'
|
||||||
|
assert mojo.requiresDirectInvocation.text() == 'false'
|
||||||
|
assert mojo.aggregator.text() == 'false'
|
||||||
|
assert mojo.threadSafe.text() == 'false'
|
||||||
|
assert mojo.phase.text() == 'integration-test'
|
||||||
|
assert mojo.executePhase.text() == 'package'
|
||||||
|
assert mojo.executeLifecycle.text() == 'my-lifecycle'
|
||||||
|
|
||||||
|
assert mojo.configuration.bar[0].text() == '${thebar}'
|
||||||
|
assert mojo.configuration.bar[0].'@implementation' == 'java.lang.String'
|
||||||
|
assert mojo.configuration.bar[0].'@default-value' == 'coolbar'
|
||||||
|
|
||||||
|
assert mojo.configuration.beer[0].text() == '${thebeer}'
|
||||||
|
assert mojo.configuration.beer[0].'@implementation' == 'java.lang.String'
|
||||||
|
assert mojo.configuration.beer[0].'@default-value' == 'coolbeer'
|
||||||
|
|
||||||
|
assert mojo.requirements.requirement.size() == 3
|
||||||
|
|
||||||
|
assert mojo.requirements.requirement[1].role.text() == 'org.codehaus.plexus.compiler.manager.CompilerManager'
|
||||||
|
assert mojo.requirements.requirement[1].'role-hint'.text() == ''
|
||||||
|
assert mojo.requirements.requirement[1].'field-name'.text() == 'compilerManager'
|
||||||
|
|
||||||
|
assert mojo.requirements.requirement[2].role.text() == 'org.apache.maven.project.MavenProjectHelper'
|
||||||
|
//assert mojo.requirements.requirement[2].'role-hint'.text() == 'default'
|
||||||
|
assert mojo.requirements.requirement[2].'field-name'.text() == 'projectHelper'
|
||||||
|
|
||||||
|
assert mojo.parameters.parameter.size() == 3
|
||||||
|
|
||||||
|
def parameter = mojo.parameters.parameter.findAll{ it.name.text() == "aliasedParam"}[0]
|
||||||
|
|
||||||
|
assert parameter.name.text() == 'aliasedParam'
|
||||||
|
assert parameter.alias.text() == 'alias'
|
||||||
|
assert parameter.type.text() == 'java.lang.String'
|
||||||
|
assert parameter.deprecated.text() == 'As of 0.2'
|
||||||
|
assert parameter.required.text() == 'false'
|
||||||
|
assert parameter.editable.text() == 'true'
|
||||||
|
assert parameter.description.text() == ''
|
||||||
|
|
||||||
|
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "beer"}[0]
|
||||||
|
|
||||||
|
assert parameter.name.text() == 'beer'
|
||||||
|
assert parameter.alias.isEmpty()
|
||||||
|
assert parameter.type.text() == 'java.lang.String'
|
||||||
|
assert parameter.deprecated.text() == "wine is better"
|
||||||
|
assert parameter.required.text() == 'false'
|
||||||
|
assert parameter.editable.text() == 'true'
|
||||||
|
assert parameter.description.text() == 'beer for non french folks'
|
||||||
|
|
||||||
|
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "bar"}[0]
|
||||||
|
|
||||||
|
assert parameter.name.text() == 'bar'
|
||||||
|
assert parameter.alias.isEmpty()
|
||||||
|
assert parameter.type.text() == 'java.lang.String'
|
||||||
|
assert parameter.deprecated.isEmpty()
|
||||||
|
assert parameter.required.text() == 'true'
|
||||||
|
assert parameter.editable.text() == 'true'
|
||||||
|
assert parameter.description.text() == 'the cool bar to go'
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
invoker.goals.1 = clean install -DskipTests
|
||||||
|
invoker.goals.2 = org.apache.maven.its.annotation-with-inheritance-reactor:module-mojo:1.0-SNAPSHOT:it0014
|
||||||
|
invoker.goals.3 = org.apache.maven.its.annotation-with-inheritance-reactor:module-mojo:1.0-SNAPSHOT:first
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.apache.maven.its.annotation-with-inheritance-reactor</groupId>
|
||||||
|
<artifactId>annotation-with-inheritance-reactor</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>module-abstract-mojo</artifactId>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
package org.apache.maven.plugins;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
|
import org.apache.maven.plugins.annotations.Component;
|
||||||
|
import org.apache.maven.plugins.annotations.Execute;
|
||||||
|
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||||
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
import org.apache.maven.plugins.annotations.Parameter;
|
||||||
|
import org.codehaus.plexus.compiler.manager.CompilerManager;
|
||||||
|
import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Touches a test file.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public abstract class AbstractFirstMojo
|
||||||
|
extends AbstractMojo
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Project directory.
|
||||||
|
*/
|
||||||
|
@Parameter( defaultValue = "${basedir}", readonly = true )
|
||||||
|
protected File basedir;
|
||||||
|
|
||||||
|
@Parameter( property = "first.touchFile", defaultValue = "${project.build.directory}/touch.txt",
|
||||||
|
required = true )
|
||||||
|
protected File touchFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Plexus compiler manager.
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
protected CompilerManager compilerManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Component( role = ArtifactMetadataSource.class, hint = "maven" )
|
||||||
|
protected ArtifactMetadataSource artifactMetadataSource;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.apache.maven.its.annotation-with-inheritance-reactor</groupId>
|
||||||
|
<artifactId>annotation-with-inheritance-reactor</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>module-mojo</artifactId>
|
||||||
|
<packaging>maven-plugin</packaging>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.its.annotation-with-inheritance-reactor</groupId>
|
||||||
|
<artifactId>module-abstract-mojo</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
|
<configuration>
|
||||||
|
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>mojo-descriptor</id>
|
||||||
|
<goals>
|
||||||
|
<goal>descriptor</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
package org.apache.maven.plugin.coreit;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
import org.apache.maven.plugins.annotations.Parameter;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Touches a test file.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Mojo( name = "it0014" )
|
||||||
|
public class CoreIt0014Mojo
|
||||||
|
extends AbstractMojo
|
||||||
|
{
|
||||||
|
|
||||||
|
@Parameter( property = "project.build.directory", required = true )
|
||||||
|
private String outputDirectory;
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
throws MojoExecutionException
|
||||||
|
{
|
||||||
|
getLog().info( "outputDirectory = " + outputDirectory );
|
||||||
|
|
||||||
|
File f = new File( outputDirectory );
|
||||||
|
|
||||||
|
if ( !f.exists() )
|
||||||
|
{
|
||||||
|
f.mkdirs();
|
||||||
|
}
|
||||||
|
|
||||||
|
File touch = new File( f, "touch.txt" );
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
touch.createNewFile();
|
||||||
|
}
|
||||||
|
catch ( IOException e )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "Error writing verification file.", e );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,80 @@
|
||||||
|
package org.apache.maven.plugin.coreit;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
|
import org.apache.maven.plugins.annotations.Component;
|
||||||
|
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||||
|
import org.apache.maven.plugins.annotations.Execute;
|
||||||
|
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||||
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
import org.apache.maven.plugins.annotations.Parameter;
|
||||||
|
import org.apache.maven.plugins.AbstractFirstMojo;
|
||||||
|
import org.apache.maven.project.MavenProjectHelper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Touches a test file.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
|
* @deprecated Don't use!
|
||||||
|
*/
|
||||||
|
@Mojo( name = "first", requiresDependencyResolution = ResolutionScope.TEST, defaultPhase = LifecyclePhase.INTEGRATION_TEST )
|
||||||
|
@Execute( phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura" )
|
||||||
|
public class FirstMojo
|
||||||
|
extends AbstractFirstMojo
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 0.1
|
||||||
|
* @deprecated As of 0.2
|
||||||
|
*/
|
||||||
|
@Parameter( alias = "alias" )
|
||||||
|
private String aliasedParam;
|
||||||
|
|
||||||
|
@Component( role = MavenProjectHelper.class )
|
||||||
|
private Object projectHelper;
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
throws MojoExecutionException
|
||||||
|
{
|
||||||
|
if ( basedir == null )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "basedir == null" );
|
||||||
|
}
|
||||||
|
if ( touchFile == null )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "touchFile == null" );
|
||||||
|
}
|
||||||
|
if ( projectHelper == null )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "projectHelper == null" );
|
||||||
|
}
|
||||||
|
if ( compilerManager == null )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "compilerManager == null" );
|
||||||
|
}
|
||||||
|
if (! ( projectHelper instanceof MavenProjectHelper ))
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "! projectHelper instanceof MavenProjectHelper" );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
package org.apache.maven.plugin.coreit;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
|
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||||
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Does nothing special.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Mojo( name = "second", requiresDependencyCollection = ResolutionScope.COMPILE, threadSafe = true )
|
||||||
|
public class SecondMojo
|
||||||
|
extends AbstractMojo
|
||||||
|
{
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?xml version='1.0'?>
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<lifecycles>
|
||||||
|
<lifecycle>
|
||||||
|
<id>cobertura</id>
|
||||||
|
<phases>
|
||||||
|
<phase>
|
||||||
|
<id>process-classes</id>
|
||||||
|
</phase>
|
||||||
|
<phase>
|
||||||
|
<id>test</id>
|
||||||
|
<configuration>
|
||||||
|
<classesDirectory>${project.build.directory}/generated-classes/cobertura</classesDirectory>
|
||||||
|
<testFailureIgnore>true</testFailureIgnore>
|
||||||
|
</configuration>
|
||||||
|
</phase>
|
||||||
|
</phases>
|
||||||
|
</lifecycle>
|
||||||
|
</lifecycles>
|
||||||
|
|
@ -0,0 +1,107 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>org.apache.maven.its.annotation-with-inheritance-reactor</groupId>
|
||||||
|
<artifactId>annotation-with-inheritance-reactor</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<name>Maven Integration Test :: annotation-with-inheritance</name>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<modules>
|
||||||
|
<module>module-abstract-mojo</module>
|
||||||
|
<module>module-mojo</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<plexusCompilerVersion>1.8.6</plexusCompilerVersion>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>maven-plugin-api</artifactId>
|
||||||
|
<version>2.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<artifactId>maven-plugin-tools-annotations</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
|
<classifier>tests</classifier>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<!-- dependency of org.apache.maven.plugin-tools:maven-plugin-tools-annotations:@project.version@:jar:tests -->
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>3.8.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>maven-project</artifactId>
|
||||||
|
<version>@mavenVersion@</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<artifactId>maven-plugin-annotations</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-compiler-manager</artifactId>
|
||||||
|
<version>${plexusCompilerVersion}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-component-api</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-compiler-javac</artifactId>
|
||||||
|
<version>${plexusCompilerVersion}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-component-api</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
File touchFile = new File( basedir, "module-mojo/target/touch.txt" )
|
||||||
|
assert touchFile.isFile()
|
||||||
|
|
||||||
|
File descriptorFile = new File( basedir, "module-mojo/target/classes/META-INF/maven/plugin.xml" );
|
||||||
|
assert descriptorFile.isFile()
|
||||||
|
|
||||||
|
def pluginDescriptor = new XmlParser().parse( descriptorFile );
|
||||||
|
|
||||||
|
assert pluginDescriptor.mojos.mojo.size() == 3
|
||||||
|
|
||||||
|
def mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "first"}[0]
|
||||||
|
|
||||||
|
assert mojo.goal.text() == 'first'
|
||||||
|
assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.FirstMojo'
|
||||||
|
assert mojo.language.text() == 'java'
|
||||||
|
assert mojo.description.text() == 'Touches a test file.'
|
||||||
|
assert mojo.deprecated.text() == "Don't use!"
|
||||||
|
assert mojo.requiresDependencyResolution.text() == 'test'
|
||||||
|
assert mojo.requiresDependencyCollection.text() == ''
|
||||||
|
assert mojo.requiresProject.text() == 'true'
|
||||||
|
assert mojo.requiresOnline.text() == 'false'
|
||||||
|
assert mojo.requiresDirectInvocation.text() == 'false'
|
||||||
|
assert mojo.aggregator.text() == 'false'
|
||||||
|
assert mojo.threadSafe.text() == 'false'
|
||||||
|
assert mojo.phase.text() == 'integration-test'
|
||||||
|
assert mojo.executePhase.text() == 'generate-sources'
|
||||||
|
assert mojo.executeLifecycle.text() == 'cobertura'
|
||||||
|
|
||||||
|
assert mojo.configuration.basedir[0].text() == ''
|
||||||
|
assert mojo.configuration.basedir[0].'@implementation' == 'java.io.File'
|
||||||
|
assert mojo.configuration.basedir[0].'@default-value' == '${basedir}'
|
||||||
|
|
||||||
|
assert mojo.configuration.touchFile[0].text() == '${first.touchFile}'
|
||||||
|
assert mojo.configuration.touchFile[0].'@implementation' == 'java.io.File'
|
||||||
|
assert mojo.configuration.touchFile[0].'@default-value' == '${project.build.directory}/touch.txt'
|
||||||
|
|
||||||
|
assert mojo.requirements.requirement.size() == 3
|
||||||
|
|
||||||
|
assert mojo.requirements.requirement[2].role.text() == 'org.apache.maven.project.MavenProjectHelper'
|
||||||
|
//assert mojo.requirements.requirement[2].'role-hint'.text() == 'default'
|
||||||
|
assert mojo.requirements.requirement[2].'field-name'.text() == 'projectHelper'
|
||||||
|
|
||||||
|
assert mojo.parameters.parameter.size() == 3
|
||||||
|
|
||||||
|
def parameter = mojo.parameters.parameter.findAll{ it.name.text() == "aliasedParam"}[0]
|
||||||
|
|
||||||
|
assert parameter.name.text() == 'aliasedParam'
|
||||||
|
assert parameter.alias.text() == 'alias'
|
||||||
|
assert parameter.type.text() == 'java.lang.String'
|
||||||
|
assert parameter.deprecated.text() == 'As of 0.2'
|
||||||
|
assert parameter.required.text() == 'false'
|
||||||
|
assert parameter.editable.text() == 'true'
|
||||||
|
assert parameter.description.text() == ''
|
||||||
|
|
||||||
|
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "touchFile"}[0]
|
||||||
|
|
||||||
|
assert parameter.name.text() == 'touchFile'
|
||||||
|
assert parameter.alias.isEmpty()
|
||||||
|
assert parameter.type.text() == 'java.io.File'
|
||||||
|
assert parameter.deprecated.isEmpty()
|
||||||
|
assert parameter.required.text() == 'true'
|
||||||
|
assert parameter.editable.text() == 'true'
|
||||||
|
assert parameter.description.text() == ''
|
||||||
|
|
||||||
|
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "basedir"}[0]
|
||||||
|
|
||||||
|
assert parameter.name.text() == 'basedir'
|
||||||
|
assert parameter.alias.isEmpty()
|
||||||
|
assert parameter.type.text() == 'java.io.File'
|
||||||
|
assert parameter.deprecated.isEmpty()
|
||||||
|
assert parameter.required.text() == 'false'
|
||||||
|
assert parameter.editable.text() == 'false'
|
||||||
|
assert parameter.description.text() == 'Project directory.'
|
||||||
|
|
||||||
|
mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "second"}[0]
|
||||||
|
|
||||||
|
assert mojo.requiresDependencyCollection.text() == 'compile'
|
||||||
|
assert mojo.threadSafe.text() == 'true'
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
invoker.goals.1 = clean install -DskipTests
|
||||||
|
invoker.goals.2 = org.apache.maven.its.annotation-with-inheritance:annotation-with-inheritance:1.0-SNAPSHOT:it0014
|
||||||
|
invoker.goals.3 = org.apache.maven.its.annotation-with-inheritance:annotation-with-inheritance:1.0-SNAPSHOT:first
|
||||||
|
invoker.goals.4 = org.apache.maven.its.annotation-with-inheritance:annotation-with-inheritance:1.0-SNAPSHOT:help
|
||||||
|
invoker.goals.5 = org.apache.maven.its.annotation-with-inheritance:annotation-with-inheritance:1.0-SNAPSHOT:third
|
||||||
|
|
@ -0,0 +1,134 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>org.apache.maven.its.annotation-with-inheritance</groupId>
|
||||||
|
<artifactId>annotation-with-inheritance</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>maven-plugin</packaging>
|
||||||
|
|
||||||
|
<name>Maven Integration Test :: annotation-with-inheritance</name>
|
||||||
|
<description>
|
||||||
|
Test plugin-plugin, which tests maven-plugin-tools-api and
|
||||||
|
maven-plugin-tools-java. This will generate a plugin descriptor from
|
||||||
|
java-based mojo sources, install the plugin, and then use it.
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<plexusCompilerVersion>1.8.6</plexusCompilerVersion>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>maven-plugin-api</artifactId>
|
||||||
|
<version>2.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>maven-artifact</artifactId>
|
||||||
|
<version>2.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>maven-project</artifactId>
|
||||||
|
<version>@mavenVersion@</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<artifactId>maven-plugin-annotations</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-compiler-manager</artifactId>
|
||||||
|
<version>${plexusCompilerVersion}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-component-api</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-compiler-javac</artifactId>
|
||||||
|
<version>${plexusCompilerVersion}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-component-api</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-utils</artifactId>
|
||||||
|
<version>3.0.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-exec</artifactId>
|
||||||
|
<version>1.1</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
|
<configuration>
|
||||||
|
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>mojo-descriptor</id>
|
||||||
|
<goals>
|
||||||
|
<goal>descriptor</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>help-goal</id>
|
||||||
|
<goals>
|
||||||
|
<goal>helpmojo</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
package org.apache.maven.plugin.coreit;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
|
import org.apache.maven.plugins.annotations.Component;
|
||||||
|
import org.apache.maven.plugins.annotations.Execute;
|
||||||
|
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||||
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
import org.apache.maven.plugins.annotations.Parameter;
|
||||||
|
import org.codehaus.plexus.compiler.manager.CompilerManager;
|
||||||
|
import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public abstract class AbstractFirstMojo
|
||||||
|
extends AbstractMojo
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Project directory.
|
||||||
|
*/
|
||||||
|
@Parameter( defaultValue = "${basedir}", readonly = true )
|
||||||
|
protected File basedir;
|
||||||
|
|
||||||
|
@Parameter( property = "first.touchFile", defaultValue = "${project.build.directory}/touch.txt",
|
||||||
|
required = true )
|
||||||
|
protected File touchFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Plexus compiler manager.
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
protected CompilerManager compilerManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Component( role = ArtifactMetadataSource.class, hint = "maven" )
|
||||||
|
protected ArtifactMetadataSource artifactMetadataSource;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
package org.apache.maven.plugin.coreit;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
|
import org.apache.maven.plugins.annotations.Component;
|
||||||
|
import org.apache.maven.plugins.annotations.Execute;
|
||||||
|
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||||
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
import org.apache.maven.plugins.annotations.Parameter;
|
||||||
|
import org.codehaus.plexus.compiler.manager.CompilerManager;
|
||||||
|
import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public abstract class AbstractFooMojo
|
||||||
|
extends AbstractFirstMojo
|
||||||
|
{
|
||||||
|
|
||||||
|
// MPLUGIN-206
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
package org.apache.maven.plugin.coreit;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
import org.apache.maven.plugins.annotations.Parameter;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Touches a test file.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Mojo( name = "it0014" )
|
||||||
|
public class CoreIt0014Mojo
|
||||||
|
extends AbstractMojo
|
||||||
|
{
|
||||||
|
|
||||||
|
@Parameter( property = "project.build.directory", required = true )
|
||||||
|
private String outputDirectory;
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
throws MojoExecutionException
|
||||||
|
{
|
||||||
|
getLog().info( "outputDirectory = " + outputDirectory );
|
||||||
|
|
||||||
|
File f = new File( outputDirectory );
|
||||||
|
|
||||||
|
if ( !f.exists() )
|
||||||
|
{
|
||||||
|
f.mkdirs();
|
||||||
|
}
|
||||||
|
|
||||||
|
File touch = new File( f, "touch.txt" );
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
touch.createNewFile();
|
||||||
|
}
|
||||||
|
catch ( IOException e )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "Error writing verification file.", e );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
package org.apache.maven.plugin.coreit;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.artifact.Artifact;
|
||||||
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
|
import org.apache.maven.plugins.annotations.Component;
|
||||||
|
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||||
|
import org.apache.maven.plugins.annotations.Execute;
|
||||||
|
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||||
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
import org.apache.maven.plugins.annotations.Parameter;
|
||||||
|
import org.apache.maven.project.MavenProjectHelper;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Touches a test file.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
|
* @deprecated Don't use!
|
||||||
|
*/
|
||||||
|
@Mojo( name = "first", requiresDependencyResolution = ResolutionScope.COMPILE,
|
||||||
|
defaultPhase = LifecyclePhase.INTEGRATION_TEST )
|
||||||
|
@Execute( phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura" )
|
||||||
|
public class FirstMojo
|
||||||
|
extends AbstractFirstMojo
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 0.1
|
||||||
|
* @deprecated As of 0.2
|
||||||
|
*/
|
||||||
|
@Parameter( alias = "alias" )
|
||||||
|
private String aliasedParam;
|
||||||
|
|
||||||
|
@Component( role = MavenProjectHelper.class )//, roleHint = "default"
|
||||||
|
private Object projectHelper;
|
||||||
|
|
||||||
|
@Parameter( defaultValue = "${project.artifacts}", required = true, readonly = true )
|
||||||
|
private Set<Artifact> dependencies;
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
throws MojoExecutionException
|
||||||
|
{
|
||||||
|
if ( basedir == null )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "basedir == null" );
|
||||||
|
}
|
||||||
|
if ( touchFile == null )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "touchFile == null" );
|
||||||
|
}
|
||||||
|
if ( projectHelper == null )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "projectHelper == null" );
|
||||||
|
}
|
||||||
|
if ( compilerManager == null )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "compilerManager == null" );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( dependencies.isEmpty() )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "dependencies.isEmpty()" );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
package org.apache.maven.plugin.coreit;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
|
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||||
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Does nothing special.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Mojo( name = "second", requiresDependencyCollection = ResolutionScope.COMPILE, threadSafe = true )
|
||||||
|
public class SecondMojo
|
||||||
|
extends AbstractMojo
|
||||||
|
{
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
package org.apache.maven.plugin.coreit;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.artifact.Artifact;
|
||||||
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
|
import org.apache.maven.plugins.annotations.Component;
|
||||||
|
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||||
|
import org.apache.maven.plugins.annotations.Execute;
|
||||||
|
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||||
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
import org.apache.maven.plugins.annotations.Parameter;
|
||||||
|
import org.apache.maven.project.MavenProjectHelper;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Touches a test file.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
|
* @deprecated Don't use!
|
||||||
|
*/
|
||||||
|
@Mojo( name = "third", requiresDependencyResolution = ResolutionScope.COMPILE,
|
||||||
|
defaultPhase = LifecyclePhase.INTEGRATION_TEST )
|
||||||
|
@Execute( phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura" )
|
||||||
|
public class ThirdMojo
|
||||||
|
extends AbstractFooMojo
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 0.1
|
||||||
|
* @deprecated As of 0.2
|
||||||
|
*/
|
||||||
|
@Parameter( alias = "alias" )
|
||||||
|
private String aliasedParam;
|
||||||
|
|
||||||
|
@Component( role = MavenProjectHelper.class )//, roleHint = "default"
|
||||||
|
private Object projectHelper;
|
||||||
|
|
||||||
|
@Parameter( defaultValue = "${project.artifacts}", required = true, readonly = true )
|
||||||
|
private Set<Artifact> dependencies;
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
throws MojoExecutionException
|
||||||
|
{
|
||||||
|
if ( basedir == null )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "basedir == null" );
|
||||||
|
}
|
||||||
|
if ( touchFile == null )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "touchFile == null" );
|
||||||
|
}
|
||||||
|
if ( projectHelper == null )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "projectHelper == null" );
|
||||||
|
}
|
||||||
|
if ( compilerManager == null )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "compilerManager == null" );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( dependencies.isEmpty() )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "dependencies.isEmpty()" );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?xml version='1.0'?>
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<lifecycles>
|
||||||
|
<lifecycle>
|
||||||
|
<id>cobertura</id>
|
||||||
|
<phases>
|
||||||
|
<phase>
|
||||||
|
<id>process-classes</id>
|
||||||
|
</phase>
|
||||||
|
<phase>
|
||||||
|
<id>test</id>
|
||||||
|
<configuration>
|
||||||
|
<classesDirectory>${project.build.directory}/generated-classes/cobertura</classesDirectory>
|
||||||
|
<testFailureIgnore>true</testFailureIgnore>
|
||||||
|
</configuration>
|
||||||
|
</phase>
|
||||||
|
</phases>
|
||||||
|
</lifecycle>
|
||||||
|
</lifecycles>
|
||||||
|
|
@ -0,0 +1,103 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
File touchFile = new File( basedir, "target/touch.txt" )
|
||||||
|
assert touchFile.isFile()
|
||||||
|
|
||||||
|
File descriptorFile = new File( basedir, "target/classes/META-INF/maven/plugin.xml" );
|
||||||
|
assert descriptorFile.isFile()
|
||||||
|
|
||||||
|
File oldHelpClass = new File( basedir, "target/classes/HelpMojo.class" );
|
||||||
|
assert !oldHelpClass.exists()
|
||||||
|
|
||||||
|
File newHelpClass = new File( basedir, "target/classes/org/apache/maven/plugin/coreit/HelpMojo.class" );
|
||||||
|
assert newHelpClass.exists()
|
||||||
|
|
||||||
|
def pluginDescriptor = new XmlParser().parse( descriptorFile );
|
||||||
|
|
||||||
|
def mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "first" }[0]
|
||||||
|
|
||||||
|
assert mojo.goal.text() == 'first'
|
||||||
|
assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.FirstMojo'
|
||||||
|
assert mojo.language.text() == 'java'
|
||||||
|
assert mojo.description.text() == 'Touches a test file.'
|
||||||
|
assert mojo.deprecated.text() == "Don't use!"
|
||||||
|
assert mojo.requiresDependencyResolution.text() == 'compile'
|
||||||
|
assert mojo.requiresDependencyCollection.text() == ''
|
||||||
|
assert mojo.requiresProject.text() == 'true'
|
||||||
|
assert mojo.requiresOnline.text() == 'false'
|
||||||
|
assert mojo.requiresDirectInvocation.text() == 'false'
|
||||||
|
assert mojo.aggregator.text() == 'false'
|
||||||
|
assert mojo.threadSafe.text() == 'false'
|
||||||
|
assert mojo.phase.text() == 'integration-test'
|
||||||
|
assert mojo.executePhase.text() == 'generate-sources'
|
||||||
|
assert mojo.executeLifecycle.text() == 'cobertura'
|
||||||
|
|
||||||
|
assert mojo.configuration.basedir[0].text() == ''
|
||||||
|
assert mojo.configuration.basedir[0].'@implementation' == 'java.io.File'
|
||||||
|
assert mojo.configuration.basedir[0].'@default-value' == '${basedir}'
|
||||||
|
|
||||||
|
assert mojo.configuration.touchFile[0].text() == '${first.touchFile}'
|
||||||
|
assert mojo.configuration.touchFile[0].'@implementation' == 'java.io.File'
|
||||||
|
assert mojo.configuration.touchFile[0].'@default-value' == '${project.build.directory}/touch.txt'
|
||||||
|
|
||||||
|
assert mojo.requirements.requirement.size() == 3
|
||||||
|
|
||||||
|
assert mojo.requirements.requirement[2].role.text() == 'org.apache.maven.project.MavenProjectHelper'
|
||||||
|
//assert mojo.requirements.requirement[2].'role-hint'.text() == 'default'
|
||||||
|
assert mojo.requirements.requirement[2].'field-name'.text() == 'projectHelper'
|
||||||
|
|
||||||
|
assert mojo.parameters.parameter.size() == 4
|
||||||
|
|
||||||
|
def parameter = mojo.parameters.parameter.findAll{ it.name.text() == "aliasedParam"}[0]
|
||||||
|
|
||||||
|
assert parameter.name.text() == 'aliasedParam'
|
||||||
|
assert parameter.alias.text() == 'alias'
|
||||||
|
assert parameter.type.text() == 'java.lang.String'
|
||||||
|
assert parameter.deprecated.text() == 'As of 0.2'
|
||||||
|
assert parameter.required.text() == 'false'
|
||||||
|
assert parameter.editable.text() == 'true'
|
||||||
|
assert parameter.description.text() == ''
|
||||||
|
|
||||||
|
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "touchFile"}[0]
|
||||||
|
|
||||||
|
assert parameter.name.text() == 'touchFile'
|
||||||
|
assert parameter.alias.isEmpty()
|
||||||
|
assert parameter.type.text() == 'java.io.File'
|
||||||
|
assert parameter.deprecated.isEmpty()
|
||||||
|
assert parameter.required.text() == 'true'
|
||||||
|
assert parameter.editable.text() == 'true'
|
||||||
|
assert parameter.description.text() == ''
|
||||||
|
|
||||||
|
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "basedir"}[0]
|
||||||
|
|
||||||
|
assert parameter.name.text() == 'basedir'
|
||||||
|
assert parameter.alias.isEmpty()
|
||||||
|
assert parameter.type.text() == 'java.io.File'
|
||||||
|
assert parameter.deprecated.isEmpty()
|
||||||
|
assert parameter.required.text() == 'false'
|
||||||
|
assert parameter.editable.text() == 'false'
|
||||||
|
assert parameter.description.text() == 'Project directory.'
|
||||||
|
|
||||||
|
mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "second"}[0]
|
||||||
|
|
||||||
|
assert mojo.requiresDependencyCollection.text() == 'compile'
|
||||||
|
assert mojo.threadSafe.text() == 'true'
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
invoker.goals.1 = clean install -DskipTests
|
||||||
|
invoker.goals.2 = org.apache.maven.ant.it:maven-ant-it-basic:1.0-SNAPSHOT:touch -Dname=touch.txt
|
||||||
|
|
||||||
|
|
@ -19,35 +19,48 @@
|
||||||
~ under the License.
|
~ under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 ../../../../maven-site/target/site/maven-v4_0_0.xsd ">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>org.apache.maven.ant.it</groupId>
|
<groupId>org.apache.maven.ant.it</groupId>
|
||||||
<artifactId>maven-ant-it-basic</artifactId>
|
<artifactId>maven-ant-it-basic</artifactId>
|
||||||
<name>Basic Ant-Mojo Integration Test</name>
|
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<packaging>maven-plugin</packaging>
|
<packaging>maven-plugin</packaging>
|
||||||
|
|
||||||
|
<name>Basic Ant-Mojo Integration Test</name>
|
||||||
<description>Tests the simplest case of using an Ant script to drive a mojo.</description>
|
<description>Tests the simplest case of using an Ant script to drive a mojo.</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<pluginPluginVersion>@project.version@</pluginPluginVersion>
|
||||||
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ant</groupId>
|
<groupId>org.apache.ant</groupId>
|
||||||
<artifactId>ant</artifactId>
|
<artifactId>ant</artifactId>
|
||||||
<version>1.6.5</version>
|
<version>@antVersion@</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<artifactId>maven-script-ant</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-plugin-plugin</artifactId>
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<version>${pluginPluginVersion}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<prefix>antBasic</prefix>
|
<prefix>antBasic</prefix>
|
||||||
</configuration>
|
</configuration>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
<artifactId>maven-plugin-tools-ant</artifactId>
|
<artifactId>maven-plugin-tools-ant</artifactId>
|
||||||
<version>2.0.1</version>
|
<version>${pluginPluginVersion}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
@ -18,9 +18,10 @@
|
||||||
~ specific language governing permissions and limitations
|
~ specific language governing permissions and limitations
|
||||||
~ under the License.
|
~ under the License.
|
||||||
-->
|
-->
|
||||||
|
<!-- START SNIPPET: ant-build -->
|
||||||
<project>
|
<project>
|
||||||
<target name="test">
|
<target name="touch-file">
|
||||||
<echo>Hello, ${name}!</echo>
|
<touch mkdirs="true" file="target/${name}"/>
|
||||||
</target>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
<!-- END SNIPPET: ant-build -->
|
||||||
|
|
@ -18,12 +18,17 @@
|
||||||
~ specific language governing permissions and limitations
|
~ specific language governing permissions and limitations
|
||||||
~ under the License.
|
~ under the License.
|
||||||
-->
|
-->
|
||||||
|
<!-- START SNIPPET: ant-mojo -->
|
||||||
<pluginMetadata xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 ../../../../../../maven-plugin-tools-model/target/generated-site/xsd/plugin-metadata-1.0.0.xsd ">
|
<pluginMetadata
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns="http://maven.apache.org/PLUGIN-METADATA/1.1.0"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/PLUGIN-METADATA/1.1.0 http://maven.apache.org/xsd/plugin-metadata-1.1.0.xsd">
|
||||||
<mojos>
|
<mojos>
|
||||||
<mojo>
|
<mojo>
|
||||||
<call>test</call>
|
<!-- target name to call in ant script -->
|
||||||
<goal>test</goal>
|
<call>touch-file</call>
|
||||||
|
<!-- mojo goal name -->
|
||||||
|
<goal>touch</goal>
|
||||||
<parameters>
|
<parameters>
|
||||||
<parameter>
|
<parameter>
|
||||||
<name>name</name>
|
<name>name</name>
|
||||||
|
|
@ -36,3 +41,4 @@
|
||||||
</mojo>
|
</mojo>
|
||||||
</mojos>
|
</mojos>
|
||||||
</pluginMetadata>
|
</pluginMetadata>
|
||||||
|
<!-- END SNIPPET: ant-mojo -->
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
File touchFile = new File( basedir, "target/touch.txt" )
|
||||||
|
assert touchFile.isFile()
|
||||||
|
|
||||||
|
File descriptorFile = new File( basedir, "target/classes/META-INF/maven/plugin.xml" );
|
||||||
|
assert descriptorFile.isFile()
|
||||||
|
|
||||||
|
File oldHelpClass = new File( basedir, "target/classes/HelpMojo.class" );
|
||||||
|
assert !oldHelpClass.exists()
|
||||||
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
invoker.goals.1 = clean install -DskipTests
|
||||||
|
invoker.goals.2 = org.apache.maven.ant.it:maven-ant-it-referenceParameter:1.0-SNAPSHOT:test
|
||||||
|
|
||||||
|
|
@ -19,40 +19,44 @@
|
||||||
~ under the License.
|
~ under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 ../../../../maven-site/target/site/maven-v4_0_0.xsd ">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
|
<groupId>org.apache.maven.ant.it</groupId>
|
||||||
<artifactId>maven-ant-it-referenceParameter</artifactId>
|
<artifactId>maven-ant-it-referenceParameter</artifactId>
|
||||||
<name>Ant-Mojo Integration Test with non-String parameter</name>
|
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<packaging>maven-plugin</packaging>
|
<packaging>maven-plugin</packaging>
|
||||||
|
|
||||||
|
<name>Ant-Mojo Integration Test with non-String parameter</name>
|
||||||
<description>Tests using an Ant script to drive a mojo where a parameter is not a String type.</description>
|
<description>Tests using an Ant script to drive a mojo where a parameter is not a String type.</description>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.ant</groupId>
|
||||||
<artifactId>maven-script-ant</artifactId>
|
<artifactId>ant</artifactId>
|
||||||
<version>2.0.2</version>
|
<version>@antVersion@</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ant</groupId>
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
<artifactId>ant</artifactId>
|
<artifactId>maven-script-ant</artifactId>
|
||||||
<version>1.6.5</version>
|
<version>@project.version@</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-plugin-plugin</artifactId>
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<goalPrefix>antWithRefs</goalPrefix>
|
<goalPrefix>antWithRefs</goalPrefix>
|
||||||
</configuration>
|
</configuration>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
<artifactId>maven-plugin-tools-ant</artifactId>
|
<artifactId>maven-plugin-tools-ant</artifactId>
|
||||||
<version>2.0.2</version>
|
<version>@project.version@</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
@ -18,8 +18,10 @@
|
||||||
~ specific language governing permissions and limitations
|
~ specific language governing permissions and limitations
|
||||||
~ under the License.
|
~ under the License.
|
||||||
-->
|
-->
|
||||||
|
<pluginMetadata
|
||||||
<pluginMetadata xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 ../../../../../../maven-plugin-tools-model/target/generated-site/xsd/plugin-metadata-1.0.0.xsd ">
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns="http://maven.apache.org/PLUGIN-METADATA/1.0.0"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/PLUGIN-METADATA/1.0.0 http://maven.apache.org/xsd/plugin-metadata-1.0.0.xsd">
|
||||||
<mojos>
|
<mojos>
|
||||||
<mojo>
|
<mojo>
|
||||||
<call>test</call>
|
<call>test</call>
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
invoker.goals.1 = clean install -DskipTests
|
||||||
|
#invoker.goals.2 = org.apache.maven.ant.it:maven-ant-it-referenceParameter:1.0-SNAPSHOT:test
|
||||||
|
|
||||||
|
|
@ -30,33 +30,37 @@
|
||||||
<name>Simple Ant-Mojo</name>
|
<name>Simple Ant-Mojo</name>
|
||||||
<packaging>maven-plugin</packaging>
|
<packaging>maven-plugin</packaging>
|
||||||
<description>Tests the simplest case of using an Ant script to drive a mojo.</description>
|
<description>Tests the simplest case of using an Ant script to drive a mojo.</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<pluginPluginVersion>@project.version@</pluginPluginVersion><!-- -->
|
||||||
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ant</groupId>
|
<groupId>org.apache.ant</groupId>
|
||||||
<artifactId>ant</artifactId>
|
<artifactId>ant</artifactId>
|
||||||
<version>1.6.5</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
<artifactId>maven-script-ant</artifactId>
|
<artifactId>maven-script-ant</artifactId>
|
||||||
<version>2.0.1</version>
|
<version>@project.version@</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-plugin-plugin</artifactId>
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<version>${pluginPluginVersion}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<prefix>antSimpleUsage</prefix>
|
<prefix>antSimpleUsage</prefix>
|
||||||
</configuration>
|
</configuration>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
<artifactId>maven-plugin-tools-ant</artifactId>
|
<artifactId>maven-plugin-tools-ant</artifactId>
|
||||||
<version>2.0.1</version>
|
<version>@project.version@</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
@ -18,8 +18,10 @@
|
||||||
~ specific language governing permissions and limitations
|
~ specific language governing permissions and limitations
|
||||||
~ under the License.
|
~ under the License.
|
||||||
-->
|
-->
|
||||||
|
<pluginMetadata
|
||||||
<pluginMetadata xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 ../../../../../../maven-plugin-tools-model/target/generated-site/xsd/plugin-metadata-1.0.0.xsd ">
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns="http://maven.apache.org/PLUGIN-METADATA/1.0.0"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/PLUGIN-METADATA/1.0.0 http://maven.apache.org/xsd/plugin-metadata-1.0.0.xsd">
|
||||||
<mojos>
|
<mojos>
|
||||||
<mojo>
|
<mojo>
|
||||||
<call>test</call>
|
<call>test</call>
|
||||||
|
|
@ -19,23 +19,27 @@
|
||||||
~ under the License.
|
~ under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 ../../../../maven-site/target/site/maven-v4_0_0.xsd ">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>org.apache.maven.ant.it</groupId>
|
<groupId>org.apache.maven.ant.it</groupId>
|
||||||
<artifactId>simpleUsage-root</artifactId>
|
<artifactId>simpleUsage-root</artifactId>
|
||||||
<name>Simple-Usage Ant-Mojo Integration Test - Root</name>
|
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<name>Simple-Usage Ant-Mojo Integration Test - Root</name>
|
||||||
<description>Tests the simplest case of using an Ant script to drive a mojo.</description>
|
<description>Tests the simplest case of using an Ant script to drive a mojo.</description>
|
||||||
|
|
||||||
<dependencies>
|
<dependencyManagement>
|
||||||
<dependency>
|
<dependencies>
|
||||||
<groupId>ant</groupId>
|
<dependency>
|
||||||
<artifactId>ant</artifactId>
|
<groupId>org.apache.ant</groupId>
|
||||||
<version>1.6.5</version>
|
<artifactId>ant</artifactId>
|
||||||
</dependency>
|
<version>@antVersion@</version>
|
||||||
</dependencies>
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>plugin</module>
|
<module>plugin</module>
|
||||||
<module>usage</module>
|
<module>usage</module>
|
||||||
|
|
@ -29,28 +29,20 @@
|
||||||
<artifactId>simpleUsage-usage</artifactId>
|
<artifactId>simpleUsage-usage</artifactId>
|
||||||
<name>Simple Ant-Mojo Usage Case</name>
|
<name>Simple Ant-Mojo Usage Case</name>
|
||||||
<description>Tests the simplest case of using an Ant script to drive a mojo.</description>
|
<description>Tests the simplest case of using an Ant script to drive a mojo.</description>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ant</groupId>
|
<groupId>org.apache.ant</groupId>
|
||||||
<artifactId>ant</artifactId>
|
<artifactId>ant</artifactId>
|
||||||
<version>1.6.5</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.ant.it</groupId>
|
<groupId>org.apache.maven.ant.it</groupId>
|
||||||
<artifactId>simpleUsage-plugin</artifactId>
|
<artifactId>simpleUsage-plugin</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.codehaus.plexus</groupId>
|
|
||||||
<artifactId>plexus-ant-factory</artifactId>
|
|
||||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<name>Hani</name>
|
<name>Hani</name>
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<!--
|
||||||
|
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
~ or more contributor license agreements. See the NOTICE file
|
||||||
|
~ distributed with this work for additional information
|
||||||
|
~ regarding copyright ownership. The ASF licenses this file
|
||||||
|
~ to you under the Apache License, Version 2.0 (the
|
||||||
|
~ "License"); you may not use this file except in compliance
|
||||||
|
~ with the License. You may obtain a copy of the License at
|
||||||
|
~
|
||||||
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
~
|
||||||
|
~ Unless required by applicable law or agreed to in writing,
|
||||||
|
~ software distributed under the License is distributed on an
|
||||||
|
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
~ KIND, either express or implied. See the License for the
|
||||||
|
~ specific language governing permissions and limitations
|
||||||
|
~ under the License.
|
||||||
|
-->
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>test</groupId>
|
||||||
|
<artifactId>trivial-maven-plugin</artifactId>
|
||||||
|
<packaging>maven-plugin</packaging>
|
||||||
|
<version>1.0</version>
|
||||||
|
<name>trivial-maven-plugin</name>
|
||||||
|
<description>Just a test project</description>
|
||||||
|
<url>http://nowere.test</url>
|
||||||
|
<inceptionYear>2012</inceptionYear>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<artifactId>maven-plugin-tools-ant</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<!--
|
||||||
|
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
~ or more contributor license agreements. See the NOTICE file
|
||||||
|
~ distributed with this work for additional information
|
||||||
|
~ regarding copyright ownership. The ASF licenses this file
|
||||||
|
~ to you under the Apache License, Version 2.0 (the
|
||||||
|
~ "License"); you may not use this file except in compliance
|
||||||
|
~ with the License. You may obtain a copy of the License at
|
||||||
|
~
|
||||||
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
~
|
||||||
|
~ Unless required by applicable law or agreed to in writing,
|
||||||
|
~ software distributed under the License is distributed on an
|
||||||
|
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
~ KIND, either express or implied. See the License for the
|
||||||
|
~ specific language governing permissions and limitations
|
||||||
|
~ under the License.
|
||||||
|
-->
|
||||||
|
<project name="ant-tasks">
|
||||||
|
<!-- +++++++++++++++++++++++++++++++++++++++++++ -->
|
||||||
|
<!-- Global Properties -->
|
||||||
|
<!-- +++++++++++++++++++++++++++++++++++++++++++ -->
|
||||||
|
|
||||||
|
<!-- taskdef resource="net/sf/antcontrib/antcontrib.properties"/-->
|
||||||
|
|
||||||
|
<!-- +++++++++++++++++++++++++++++++++++++++++++ -->
|
||||||
|
<!-- Main task -->
|
||||||
|
<!-- +++++++++++++++++++++++++++++++++++++++++++ -->
|
||||||
|
<target name="sample-task">
|
||||||
|
|
||||||
|
<echo message="${message}."/>
|
||||||
|
|
||||||
|
</target>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<!--
|
||||||
|
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
~ or more contributor license agreements. See the NOTICE file
|
||||||
|
~ distributed with this work for additional information
|
||||||
|
~ regarding copyright ownership. The ASF licenses this file
|
||||||
|
~ to you under the Apache License, Version 2.0 (the
|
||||||
|
~ "License"); you may not use this file except in compliance
|
||||||
|
~ with the License. You may obtain a copy of the License at
|
||||||
|
~
|
||||||
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
~
|
||||||
|
~ Unless required by applicable law or agreed to in writing,
|
||||||
|
~ software distributed under the License is distributed on an
|
||||||
|
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
~ KIND, either express or implied. See the License for the
|
||||||
|
~ specific language governing permissions and limitations
|
||||||
|
~ under the License.
|
||||||
|
-->
|
||||||
|
<pluginMetadata
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns="http://maven.apache.org/PLUGIN-METADATA/1.1.0"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/PLUGIN-METADATA/1.1.0 http://maven.apache.org/xsd/plugin-metadata-1.1.0.xsd">
|
||||||
|
<mojos>
|
||||||
|
<mojo>
|
||||||
|
<goal>sample</goal>
|
||||||
|
<call>sample-task</call>
|
||||||
|
<description>Just a test</description>
|
||||||
|
<requiresDirectInvocation>false</requiresDirectInvocation>
|
||||||
|
<requiresProject>false</requiresProject>
|
||||||
|
<since>1.0</since>
|
||||||
|
<parameters>
|
||||||
|
|
||||||
|
<parameter>
|
||||||
|
<name>message</name>
|
||||||
|
<type>java.lang.String</type>
|
||||||
|
<required>true</required>
|
||||||
|
<readonly>true</readonly>
|
||||||
|
<since>1.0</since>
|
||||||
|
<description>Test param</description>
|
||||||
|
</parameter>
|
||||||
|
|
||||||
|
</parameters>
|
||||||
|
</mojo>
|
||||||
|
</mojos>
|
||||||
|
</pluginMetadata>
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
invoker.goals.1 = clean install -DskipTests
|
||||||
|
invoker.goals.2 = org.apache.maven.beanshell.it:maven-beanshell-it-basic:1.0-SNAPSHOT:touch -Dname=touch.txt
|
||||||
|
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
~ or more contributor license agreements. See the NOTICE file
|
||||||
|
~ distributed with this work for additional information
|
||||||
|
~ regarding copyright ownership. The ASF licenses this file
|
||||||
|
~ to you under the Apache License, Version 2.0 (the
|
||||||
|
~ "License"); you may not use this file except in compliance
|
||||||
|
~ with the License. You may obtain a copy of the License at
|
||||||
|
~
|
||||||
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
~
|
||||||
|
~ Unless required by applicable law or agreed to in writing,
|
||||||
|
~ software distributed under the License is distributed on an
|
||||||
|
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
~ KIND, either express or implied. See the License for the
|
||||||
|
~ specific language governing permissions and limitations
|
||||||
|
~ under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>org.apache.maven.beanshell.it</groupId>
|
||||||
|
<artifactId>maven-beanshell-it-basic</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>maven-plugin</packaging>
|
||||||
|
|
||||||
|
<name>Basic Beanshell-Mojo Integration Test</name>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<pluginPluginVersion>@project.version@</pluginPluginVersion><!-- -->
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>bsh</groupId>
|
||||||
|
<artifactId>bsh</artifactId>
|
||||||
|
<version>1.3.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<artifactId>maven-script-beanshell</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<version>${pluginPluginVersion}</version>
|
||||||
|
<configuration>
|
||||||
|
<prefix>beanshellBasic</prefix>
|
||||||
|
</configuration>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<artifactId>maven-plugin-tools-beanshell</artifactId>
|
||||||
|
<version>${pluginPluginVersion}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// START SNIPPET: beanshell-mojo
|
||||||
|
/**
|
||||||
|
* Touches a test file.
|
||||||
|
*
|
||||||
|
* @goal touch
|
||||||
|
* @requiresDependencyResolution=test
|
||||||
|
* @deprecated Don't use!
|
||||||
|
* @since 1.2
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.plugin.Mojo;
|
||||||
|
import org.apache.maven.script.beanshell.BeanshellMojoAdapter;
|
||||||
|
import org.codehaus.plexus.util.FileUtils;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
execute()
|
||||||
|
{
|
||||||
|
logger.info( "Executing beanshell mojo..." );
|
||||||
|
FileUtils.fileWrite( outDir + "/" + name, "This is a Beanshell test" );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Output directory for files.
|
||||||
|
*
|
||||||
|
* @parameter expression="${project.build.directory}"
|
||||||
|
* @required
|
||||||
|
*/
|
||||||
|
setOutDir( file )
|
||||||
|
{
|
||||||
|
outDir = file;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @parameter expression="${name}"
|
||||||
|
* @required
|
||||||
|
*/
|
||||||
|
setName( name )
|
||||||
|
{
|
||||||
|
name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new BeanshellMojoAdapter( (Mojo) this, this.interpreter );
|
||||||
|
// END SNIPPET: beanshell-mojo
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
File touchFile = new File( basedir, "target/touch.txt" )
|
||||||
|
assert touchFile.exists()
|
||||||
|
assert touchFile.isFile()
|
||||||
|
content = touchFile.text
|
||||||
|
assert content.contains('This is a Beanshell test');
|
||||||
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
@ -0,0 +1,77 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
~ or more contributor license agreements. See the NOTICE file
|
||||||
|
~ distributed with this work for additional information
|
||||||
|
~ regarding copyright ownership. The ASF licenses this file
|
||||||
|
~ to you under the Apache License, Version 2.0 (the
|
||||||
|
~ "License"); you may not use this file except in compliance
|
||||||
|
~ with the License. You may obtain a copy of the License at
|
||||||
|
~
|
||||||
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
~
|
||||||
|
~ Unless required by applicable law or agreed to in writing,
|
||||||
|
~ software distributed under the License is distributed on an
|
||||||
|
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
~ KIND, either express or implied. See the License for the
|
||||||
|
~ specific language governing permissions and limitations
|
||||||
|
~ under the License.
|
||||||
|
-->
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>test</groupId>
|
||||||
|
<artifactId>maven-since-3.x</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>test</groupId>
|
||||||
|
<artifactId>antsample-maven-plugin</artifactId>
|
||||||
|
<packaging>maven-plugin</packaging>
|
||||||
|
<name>ANT Sample</name>
|
||||||
|
<description>Just a test project</description>
|
||||||
|
<url>http://nowere.test</url>
|
||||||
|
<inceptionYear>2012</inceptionYear>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>maven-plugin-api</artifactId>
|
||||||
|
<version>2.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<artifactId>maven-plugin-tools-ant</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<reporting>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
~ or more contributor license agreements. See the NOTICE file
|
||||||
|
~ distributed with this work for additional information
|
||||||
|
~ regarding copyright ownership. The ASF licenses this file
|
||||||
|
~ to you under the Apache License, Version 2.0 (the
|
||||||
|
~ "License"); you may not use this file except in compliance
|
||||||
|
~ with the License. You may obtain a copy of the License at
|
||||||
|
~
|
||||||
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
~
|
||||||
|
~ Unless required by applicable law or agreed to in writing,
|
||||||
|
~ software distributed under the License is distributed on an
|
||||||
|
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
~ KIND, either express or implied. See the License for the
|
||||||
|
~ specific language governing permissions and limitations
|
||||||
|
~ under the License.
|
||||||
|
-->
|
||||||
|
<project name="ant-tasks">
|
||||||
|
<!-- +++++++++++++++++++++++++++++++++++++++++++ -->
|
||||||
|
<!-- Global Properties -->
|
||||||
|
<!-- +++++++++++++++++++++++++++++++++++++++++++ -->
|
||||||
|
|
||||||
|
<!-- taskdef resource="net/sf/antcontrib/antcontrib.properties"/-->
|
||||||
|
|
||||||
|
<!-- +++++++++++++++++++++++++++++++++++++++++++ -->
|
||||||
|
<!-- Main task -->
|
||||||
|
<!-- +++++++++++++++++++++++++++++++++++++++++++ -->
|
||||||
|
<target name="sample-task">
|
||||||
|
|
||||||
|
<echo message="${message}."/>
|
||||||
|
|
||||||
|
</target>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
~ or more contributor license agreements. See the NOTICE file
|
||||||
|
~ distributed with this work for additional information
|
||||||
|
~ regarding copyright ownership. The ASF licenses this file
|
||||||
|
~ to you under the Apache License, Version 2.0 (the
|
||||||
|
~ "License"); you may not use this file except in compliance
|
||||||
|
~ with the License. You may obtain a copy of the License at
|
||||||
|
~
|
||||||
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
~
|
||||||
|
~ Unless required by applicable law or agreed to in writing,
|
||||||
|
~ software distributed under the License is distributed on an
|
||||||
|
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
~ KIND, either express or implied. See the License for the
|
||||||
|
~ specific language governing permissions and limitations
|
||||||
|
~ under the License.
|
||||||
|
-->
|
||||||
|
<pluginMetadata
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns="http://maven.apache.org/PLUGIN-METADATA/1.1.0"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/PLUGIN-METADATA/1.1.0 http://maven.apache.org/xsd/plugin-metadata-1.1.0.xsd">
|
||||||
|
<mojos>
|
||||||
|
<mojo>
|
||||||
|
<goal>sample</goal>
|
||||||
|
<call>sample-task</call>
|
||||||
|
<description>Just a test</description>
|
||||||
|
<requiresDirectInvocation>false</requiresDirectInvocation>
|
||||||
|
<requiresProject>false</requiresProject>
|
||||||
|
<since>1.0</since>
|
||||||
|
<parameters>
|
||||||
|
|
||||||
|
<parameter>
|
||||||
|
<name>message</name>
|
||||||
|
<type>java.lang.String</type>
|
||||||
|
<required>true</required>
|
||||||
|
<readonly>false</readonly>
|
||||||
|
<since>0.9</since>
|
||||||
|
<description>Test param</description>
|
||||||
|
</parameter>
|
||||||
|
|
||||||
|
</parameters>
|
||||||
|
</mojo>
|
||||||
|
</mojos>
|
||||||
|
</pluginMetadata>
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
~ or more contributor license agreements. See the NOTICE file
|
||||||
|
~ distributed with this work for additional information
|
||||||
|
~ regarding copyright ownership. The ASF licenses this file
|
||||||
|
~ to you under the Apache License, Version 2.0 (the
|
||||||
|
~ "License"); you may not use this file except in compliance
|
||||||
|
~ with the License. You may obtain a copy of the License at
|
||||||
|
~
|
||||||
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
~
|
||||||
|
~ Unless required by applicable law or agreed to in writing,
|
||||||
|
~ software distributed under the License is distributed on an
|
||||||
|
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
~ KIND, either express or implied. See the License for the
|
||||||
|
~ specific language governing permissions and limitations
|
||||||
|
~ under the License.
|
||||||
|
-->
|
||||||
|
<project name="${artifactId}">
|
||||||
|
<publishDate position="right" format="dd/MM/yyyy, HH:mm" />
|
||||||
|
<version position="right"/>
|
||||||
|
<poweredBy>
|
||||||
|
<logo name="Maven" href="http://maven.apache.org/"
|
||||||
|
img="${project.url}/images/maven-feather.png" />
|
||||||
|
</poweredBy>
|
||||||
|
<body>
|
||||||
|
<menu name="Overview">
|
||||||
|
<item name="Introduction" href="index.html"/>
|
||||||
|
<item name="Goals" href="plugin-info.html"/>
|
||||||
|
<item name="Usage" href="usage.html"/>
|
||||||
|
<item name="FAQ" href="faq.html"/>
|
||||||
|
</menu>
|
||||||
|
${reports}
|
||||||
|
</body>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
invoker.goals.1 = clean install site
|
||||||
|
invoker.maven.version = 3.0+
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
~ or more contributor license agreements. See the NOTICE file
|
||||||
|
~ distributed with this work for additional information
|
||||||
|
~ regarding copyright ownership. The ASF licenses this file
|
||||||
|
~ to you under the Apache License, Version 2.0 (the
|
||||||
|
~ "License"); you may not use this file except in compliance
|
||||||
|
~ with the License. You may obtain a copy of the License at
|
||||||
|
~
|
||||||
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
~
|
||||||
|
~ Unless required by applicable law or agreed to in writing,
|
||||||
|
~ software distributed under the License is distributed on an
|
||||||
|
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
~ KIND, either express or implied. See the License for the
|
||||||
|
~ specific language governing permissions and limitations
|
||||||
|
~ under the License.
|
||||||
|
-->
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>test</groupId>
|
||||||
|
<artifactId>maven-since-3.x</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>test</groupId>
|
||||||
|
<artifactId>javasample-maven-plugin</artifactId>
|
||||||
|
<packaging>maven-plugin</packaging>
|
||||||
|
|
||||||
|
<name>Java Sample</name>
|
||||||
|
<description>Java Maven Mojo.</description>
|
||||||
|
<url>http://maven.apache.org</url>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>maven-plugin-api</artifactId>
|
||||||
|
<version>2.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
package test;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright 2001-2005 The Apache Software Foundation.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileWriter;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Goal which touches a timestamp file.
|
||||||
|
*
|
||||||
|
* @goal touch
|
||||||
|
* @since 1.0
|
||||||
|
*
|
||||||
|
* @phase process-sources
|
||||||
|
*/
|
||||||
|
public class MyMojo
|
||||||
|
extends AbstractMojo
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Location of the file.
|
||||||
|
* @parameter property="project.build.directory"
|
||||||
|
* @required
|
||||||
|
*/
|
||||||
|
private File outputDirectory;
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
throws MojoExecutionException
|
||||||
|
{
|
||||||
|
File f = outputDirectory;
|
||||||
|
|
||||||
|
if ( !f.exists() )
|
||||||
|
{
|
||||||
|
f.mkdirs();
|
||||||
|
}
|
||||||
|
|
||||||
|
File touch = new File( f, "touch.txt" );
|
||||||
|
|
||||||
|
FileWriter w = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
w = new FileWriter( touch );
|
||||||
|
|
||||||
|
w.write( "touch.txt" );
|
||||||
|
}
|
||||||
|
catch ( IOException e )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "Error creating file " + touch, e );
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
if ( w != null )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
w.close();
|
||||||
|
}
|
||||||
|
catch ( IOException e )
|
||||||
|
{
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
~ or more contributor license agreements. See the NOTICE file
|
||||||
|
~ distributed with this work for additional information
|
||||||
|
~ regarding copyright ownership. The ASF licenses this file
|
||||||
|
~ to you under the Apache License, Version 2.0 (the
|
||||||
|
~ "License"); you may not use this file except in compliance
|
||||||
|
~ with the License. You may obtain a copy of the License at
|
||||||
|
~
|
||||||
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
~
|
||||||
|
~ Unless required by applicable law or agreed to in writing,
|
||||||
|
~ software distributed under the License is distributed on an
|
||||||
|
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
~ KIND, either express or implied. See the License for the
|
||||||
|
~ specific language governing permissions and limitations
|
||||||
|
~ under the License.
|
||||||
|
-->
|
||||||
|
<project name="${artifactId}">
|
||||||
|
<publishDate position="right" format="dd/MM/yyyy, HH:mm" />
|
||||||
|
<version position="right"/>
|
||||||
|
<poweredBy>
|
||||||
|
<logo name="Maven" href="http://maven.apache.org/"
|
||||||
|
img="${project.url}/images/maven-feather.png" />
|
||||||
|
</poweredBy>
|
||||||
|
<body>
|
||||||
|
<menu name="Overview">
|
||||||
|
<item name="Introduction" href="index.html"/>
|
||||||
|
<item name="Goals" href="plugin-info.html"/>
|
||||||
|
<item name="Usage" href="usage.html"/>
|
||||||
|
<item name="FAQ" href="faq.html"/>
|
||||||
|
</menu>
|
||||||
|
${reports}
|
||||||
|
</body>
|
||||||
|
</project>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,94 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
~ or more contributor license agreements. See the NOTICE file
|
||||||
|
~ distributed with this work for additional information
|
||||||
|
~ regarding copyright ownership. The ASF licenses this file
|
||||||
|
~ to you under the Apache License, Version 2.0 (the
|
||||||
|
~ "License"); you may not use this file except in compliance
|
||||||
|
~ with the License. You may obtain a copy of the License at
|
||||||
|
~
|
||||||
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
~
|
||||||
|
~ Unless required by applicable law or agreed to in writing,
|
||||||
|
~ software distributed under the License is distributed on an
|
||||||
|
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
~ KIND, either express or implied. See the License for the
|
||||||
|
~ specific language governing permissions and limitations
|
||||||
|
~ under the License.
|
||||||
|
-->
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>test</groupId>
|
||||||
|
<artifactId>maven-since-3.x</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<name>Samples</name>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<description>Just a test project</description>
|
||||||
|
<url>http://nowere.test</url>
|
||||||
|
<inceptionYear>2012</inceptionYear>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>antsample-maven-plugin</module>
|
||||||
|
<module>javasample-maven-plugin</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-utils</artifactId>
|
||||||
|
<version>3.0.2</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>generated-helpmojo</id>
|
||||||
|
<goals>
|
||||||
|
<goal>helpmojo</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<artifactId>maven-plugin-tools-ant</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-site-plugin</artifactId>
|
||||||
|
<version>@sitePluginVersion@</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-help-plugin</artifactId>
|
||||||
|
<version>2.1.1</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<reporting>
|
||||||
|
<excludeDefaults>true</excludeDefaults>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
File touchFile = new File( basedir, "antsample-maven-plugin/target/site/sample-mojo.html" )
|
||||||
|
assert touchFile.exists()
|
||||||
|
assert touchFile.isFile()
|
||||||
|
content = touchFile.text
|
||||||
|
assert content.contains('Since');
|
||||||
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
[INFO] help 1.0-SNAPSHOT
|
||||||
|
Tests generation and compilation of the help mojo.
|
||||||
|
|
||||||
|
help:test
|
||||||
|
Deprecated. As of 1.0, use the "quoted" goal instead.
|
||||||
|
|
||||||
|
MOJO-DESCRIPTION. Some 'quotation' marks and backslashes '\\', some important
|
||||||
|
javadoc
|
||||||
|
and an inline link to AnotherMojo.
|
||||||
|
|
||||||
|
Available parameters:
|
||||||
|
|
||||||
|
defaultParam (Default: escape\backslash)
|
||||||
|
This parameter uses 'quotation' marks and backslashes '\\' in its
|
||||||
|
description. Those characters must be escaped in Java string literals.
|
||||||
|
|
||||||
|
deprecatedParam
|
||||||
|
Deprecated. As of version 1.0, use the {@link #defaultParam} instead.
|
||||||
|
|
||||||
|
This parameter is deprecated.
|
||||||
|
|
||||||
|
undocumentedParam
|
||||||
|
|
||||||
|
Required: Yes
|
||||||
|
User property: test.undocumented
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
invoker.maven.version = 3.0+
|
||||||
|
invoker.goals.1 = clean install -DskipTests
|
||||||
|
invoker.goals.2 = org.apache.maven.its.plugin:help:1.0-SNAPSHOT:help
|
||||||
|
invoker.goals.3 = --log-file help.log org.apache.maven.its.plugin:help:1.0-SNAPSHOT:help
|
||||||
|
# --log-file option is only supported by Maven 3
|
||||||
|
invoker.maven.version = 3.0+
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>org.apache.maven.its.plugin</groupId>
|
||||||
|
<artifactId>help</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>maven-plugin</packaging>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
Tests generation and compilation of the help mojo.
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>maven-plugin-api</artifactId>
|
||||||
|
<version>2.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-utils</artifactId>
|
||||||
|
<version>3.0.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<artifactId>maven-plugin-annotations</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default-descriptor</id>
|
||||||
|
<phase>process-classes</phase>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>help-goal</id>
|
||||||
|
<goals>
|
||||||
|
<goal>helpmojo</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
package test;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
import org.apache.maven.plugins.annotations.Parameter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MOJO-DESCRIPTION. Some "quotation" marks and backslashes '\\', some <strong>important</strong> javadoc<br> and an
|
||||||
|
* inline link to {@link test.AnotherMojo}.
|
||||||
|
*
|
||||||
|
* @deprecated As of 1.0, use the "quoted" goal instead.
|
||||||
|
* @since 2.1
|
||||||
|
*/
|
||||||
|
@Mojo( name= "test" )
|
||||||
|
public class MyMojo
|
||||||
|
extends AbstractMojo
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This parameter uses "quotation" marks and backslashes '\\' in its description. Those characters <em>must</em> be
|
||||||
|
* escaped in Java string literals.
|
||||||
|
*
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
|
@Parameter( defaultValue = "escape\\backslash" )
|
||||||
|
private String defaultParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This parameter is deprecated.
|
||||||
|
*
|
||||||
|
* @deprecated As of version 1.0, use the {@link #defaultParam} instead.
|
||||||
|
*/
|
||||||
|
@Parameter
|
||||||
|
private String deprecatedParam;
|
||||||
|
|
||||||
|
@Parameter( property = "test.undocumented", required = true )
|
||||||
|
private String undocumentedParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Readonly parameter: should not be proposed for configuration.
|
||||||
|
*/
|
||||||
|
@Parameter( defaultValue = "not for configuration", readonly = true )
|
||||||
|
private String readonly;
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
detail = true
|
||||||
|
goal = test
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
expected = new File( basedir, "expected-help.txt" ).text.trim().replace( "\r", "" );
|
||||||
|
|
||||||
|
log = new File( basedir, "help.log" ).text.replace( "\r", "" );
|
||||||
|
log = log.substring( log.indexOf( "[INFO] help 1.0-SNAPSHOT" ) );
|
||||||
|
log = log.substring( 0, log.indexOf( "[INFO]", 5 ) ).trim();
|
||||||
|
|
||||||
|
assert log == expected;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
invoker.goals = clean compile
|
||||||
|
|
@ -0,0 +1,80 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>org.apache.maven.its.plugin</groupId>
|
||||||
|
<artifactId>help-package</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>maven-plugin</packaging>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
Tests generation of the help mojo in a user-specified package (MPLUGIN-168).
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>maven-plugin-api</artifactId>
|
||||||
|
<version>2.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-utils</artifactId>
|
||||||
|
<version>3.0.1</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
|
<configuration>
|
||||||
|
<helpPackageName>test.help</helpPackageName>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>help-goal</id>
|
||||||
|
<goals>
|
||||||
|
<goal>helpmojo</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
package test;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MOJO-DESCRIPTION.
|
||||||
|
*
|
||||||
|
* @goal test
|
||||||
|
*/
|
||||||
|
public class MyMojo
|
||||||
|
extends AbstractMojo
|
||||||
|
{
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import java.io.*;
|
||||||
|
|
||||||
|
File helpMojo = new File( basedir, "target/classes/test/help/HelpMojo.class" );
|
||||||
|
if ( !helpMojo.isFile() )
|
||||||
|
{
|
||||||
|
throw new FileNotFoundException( "Missing/misplaced: " + helpMojo );
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.apache.maven.its.plugin</groupId>
|
||||||
|
<artifactId>ipcr</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>ipcr-dep-a</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<name>Dependency A</name>
|
||||||
|
<description>
|
||||||
|
Test that the component used to scan sources for annotations does not analyze classes from the plugin's own class
|
||||||
|
realm while traversing the class hierarchy (see QDOX-148). This module provides a simple dependency to build up
|
||||||
|
the class realm of interest.
|
||||||
|
</description>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package test;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ClassA
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.apache.maven.its.plugin</groupId>
|
||||||
|
<artifactId>ipcr</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>ipcr-dep-b</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<name>Dependency B</name>
|
||||||
|
<description>
|
||||||
|
Test that the component used to scan sources for annotations does not analyze classes from the plugin's own class
|
||||||
|
realm while traversing the class hierarchy (see QDOX-148). This module provides a simple dependency to build up
|
||||||
|
the class realm of interest.
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.its.plugin</groupId>
|
||||||
|
<artifactId>ipcr-dep-a</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package test;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ClassB
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For the test we want to trigger a linkage error when resolving ClassA. However, we want this error to occur when
|
||||||
|
* analyzing ClassB and not when loading ClassB itself.
|
||||||
|
*/
|
||||||
|
public void triggerLazyLinkageError(ClassA param)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
invoker.goals.1 = clean install -DskipTests
|
||||||
|
invoker.profiles.1 = setup
|
||||||
|
|
||||||
|
invoker.goals.2 = clean process-classes
|
||||||
|
invoker.profiles.2 = test
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>org.apache.maven.its.plugin</groupId>
|
||||||
|
<artifactId>ipcr</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<name>Aggregator</name>
|
||||||
|
<description>
|
||||||
|
Test that the component used to scan sources for annotations does not analyze classes from the plugin's own class
|
||||||
|
realm while traversing the class hierarchy (see QDOX-148).
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<!-- builds the dependencies requires to exhibit the problem -->
|
||||||
|
<id>setup</id>
|
||||||
|
<modules>
|
||||||
|
<module>dep-a</module>
|
||||||
|
<module>dep-b</module>
|
||||||
|
</modules>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<!-- runs the test -->
|
||||||
|
<id>test</id>
|
||||||
|
<modules>
|
||||||
|
<module>test</module>
|
||||||
|
</modules>
|
||||||
|
<build>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.apache.maven.its.plugin</groupId>
|
||||||
|
<artifactId>ipcr</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>ipcr-plugin</artifactId>
|
||||||
|
<packaging>maven-plugin</packaging>
|
||||||
|
|
||||||
|
<name>Test Plugin</name>
|
||||||
|
<description>
|
||||||
|
Test that the component used to scan sources for annotations does not analyze classes from the plugin's own class
|
||||||
|
realm while traversing the class hierarchy (see QDOX-148). This module provides the plugin sources to scan.
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!--
|
||||||
|
This project depends on both ipcr-dep-b and (indirectly) ipcr-dep-a. However, the plugin realm only contains
|
||||||
|
ipcr-dep-b, causing a linkage error when erroneously traversing the class hierarchy.
|
||||||
|
-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.its.plugin</groupId>
|
||||||
|
<artifactId>ipcr-dep-b</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.its.plugin</groupId>
|
||||||
|
<artifactId>ipcr-dep-b</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.apache.maven.its.plugin</groupId>
|
||||||
|
<artifactId>ipcr-dep-a</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
package test;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is the source class to be scanned for annotations. While scanning, QDox must not try to resolve references to
|
||||||
|
* other types like the super class from the plugin class realm. The plugin class realm has no relation at all to
|
||||||
|
* the project class path. In particular, the plugin class realm could (by incident) contain different versions of those
|
||||||
|
* types or could be incomplete (due to exclusions). The later case leads to NoClassDefFoundErrors, crashing the scan.
|
||||||
|
*
|
||||||
|
* @goal test
|
||||||
|
*/
|
||||||
|
public class SomeMojo
|
||||||
|
extends ClassB
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
invoker.java.version = 1.8+
|
||||||
|
invoker.goals.1 = clean install -DskipTests
|
||||||
|
invoker.goals.2 = org.apache.maven.its.basic-java-annotations:maven-it-basic-java-annotations:1.0-SNAPSHOT:it0014
|
||||||
|
invoker.goals.3 = org.apache.maven.its.basic-java-annotations:maven-it-basic-java-annotations:1.0-SNAPSHOT:help
|
||||||
|
|
@ -0,0 +1,108 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>org.apache.maven.its.basic-java-annotations</groupId>
|
||||||
|
<artifactId>maven-it-basic-java-annotations</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>maven-plugin</packaging>
|
||||||
|
|
||||||
|
<name>Maven Integration Test :: basic-java-annotations-jdk8</name>
|
||||||
|
<description>
|
||||||
|
Test plugin-plugin, which tests maven-plugin-tools-api and
|
||||||
|
maven-plugin-tools-java. This will generate a plugin descriptor from
|
||||||
|
java-based mojo sources, install the plugin, and then use it.
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<!-- pom properties values not taken into account since invoker defines properties -->
|
||||||
|
<!-- that override what's defined in pom -->
|
||||||
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>maven-plugin-api</artifactId>
|
||||||
|
<version>2.2.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>maven-core</artifactId>
|
||||||
|
<version>2.2.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-utils</artifactId>
|
||||||
|
<version>3.0.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
|
<artifactId>maven-plugin-annotations</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source><!-- avoid ${maven.compiler.source} since value is not as expected -->
|
||||||
|
<target>1.8</target><!-- avoid ${maven.compiler.target} since value is not as expected -->
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
|
<version>@project.version@</version>
|
||||||
|
<configuration>
|
||||||
|
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>mojo-descriptor</id>
|
||||||
|
<goals>
|
||||||
|
<goal>descriptor</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>help-goal</id>
|
||||||
|
<goals>
|
||||||
|
<goal>helpmojo</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
package org.apache.maven.plugin.coreit;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
import org.apache.maven.plugins.annotations.Parameter;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Touches a test file.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Mojo( name = "it0014" )
|
||||||
|
public class CoreIt0014Mojo
|
||||||
|
extends AbstractMojo
|
||||||
|
{
|
||||||
|
|
||||||
|
@Parameter( property = "project.build.directory", required = true )
|
||||||
|
private String outputDirectory;
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
throws MojoExecutionException
|
||||||
|
{
|
||||||
|
getLog().info( "outputDirectory = " + outputDirectory );
|
||||||
|
|
||||||
|
File f = new File( outputDirectory );
|
||||||
|
|
||||||
|
if ( !f.exists() )
|
||||||
|
{
|
||||||
|
f.mkdirs();
|
||||||
|
}
|
||||||
|
|
||||||
|
File touch = new File( f, "touch.txt" );
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
touch.createNewFile();
|
||||||
|
}
|
||||||
|
catch ( IOException e )
|
||||||
|
{
|
||||||
|
throw new MojoExecutionException( "Error writing verification file.", e );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,91 @@
|
||||||
|
package org.apache.maven.plugin.coreit;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.execution.MavenSession;
|
||||||
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
|
import org.apache.maven.plugin.MojoExecution;
|
||||||
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
|
import org.apache.maven.plugin.descriptor.PluginDescriptor;
|
||||||
|
import org.apache.maven.plugins.annotations.Component;
|
||||||
|
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||||
|
import org.apache.maven.plugins.annotations.Execute;
|
||||||
|
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||||
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
import org.apache.maven.plugins.annotations.Parameter;
|
||||||
|
import org.apache.maven.project.MavenProject;
|
||||||
|
import org.apache.maven.project.MavenProjectHelper;
|
||||||
|
import org.apache.maven.settings.Settings;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Touches a test file.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
|
* @deprecated Don't use!
|
||||||
|
*/
|
||||||
|
@Mojo( name = "first", requiresDependencyResolution = ResolutionScope.TEST, defaultPhase = LifecyclePhase.INTEGRATION_TEST )
|
||||||
|
@Execute( phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura" )
|
||||||
|
public class FirstMojo
|
||||||
|
extends AbstractMojo
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Project directory.
|
||||||
|
*/
|
||||||
|
@Parameter( defaultValue = "${basedir}", readonly = true )
|
||||||
|
private File basedir;
|
||||||
|
|
||||||
|
@Parameter( property = "first.touchFile", defaultValue = "${project.build.directory}/touch.txt",
|
||||||
|
required = true )
|
||||||
|
private File touchFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 0.1
|
||||||
|
* @deprecated As of 0.2
|
||||||
|
*/
|
||||||
|
@Parameter( name = "namedParam", alias = "alias" )
|
||||||
|
private String aliasedParam;
|
||||||
|
|
||||||
|
@Component( role = MavenProjectHelper.class, hint = "test" )
|
||||||
|
private Object projectHelper;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
private MavenSession session;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
private MavenProject project;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
private MojoExecution mojo;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
private PluginDescriptor plugin;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
private Settings settings;
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
throws MojoExecutionException
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
package org.apache.maven.plugin.coreit;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
import org.apache.maven.plugins.annotations.Parameter;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Could not use regex in @Parameter(defaultValue)
|
||||||
|
*/
|
||||||
|
@Mojo( name = "mplugin-220" )
|
||||||
|
public class MPlugin220Mojo
|
||||||
|
extends AbstractMojo
|
||||||
|
{
|
||||||
|
|
||||||
|
@Parameter( defaultValue = "[a-zA-Z]{2,}-\\\\d+" )
|
||||||
|
private String regex;
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
throws MojoExecutionException
|
||||||
|
{
|
||||||
|
getLog().info( "regex = " + regex );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,76 @@
|
||||||
|
package org.apache.maven.plugin.coreit;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
|
import org.apache.maven.plugins.annotations.Component;
|
||||||
|
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||||
|
import org.apache.maven.plugins.annotations.Execute;
|
||||||
|
import org.apache.maven.plugins.annotations.InstantiationStrategy;
|
||||||
|
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||||
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
import org.apache.maven.plugins.annotations.Parameter;
|
||||||
|
import org.apache.maven.project.MavenProjectHelper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks maximum annotations with non-default values.
|
||||||
|
*
|
||||||
|
* @since since-text
|
||||||
|
* @deprecated deprecated-text
|
||||||
|
*/
|
||||||
|
@Mojo( name = "maximal",
|
||||||
|
aggregator = true,
|
||||||
|
configurator = "configurator-hint",
|
||||||
|
requiresDependencyResolution = ResolutionScope.COMPILE,
|
||||||
|
requiresDependencyCollection = ResolutionScope.TEST,
|
||||||
|
defaultPhase = LifecyclePhase.PACKAGE,
|
||||||
|
executionStrategy = "always",
|
||||||
|
instantiationStrategy = InstantiationStrategy.SINGLETON,
|
||||||
|
inheritByDefault = false,
|
||||||
|
requiresDirectInvocation = true,
|
||||||
|
requiresOnline = true,
|
||||||
|
requiresProject = false,
|
||||||
|
requiresReports = true,
|
||||||
|
threadSafe = true )
|
||||||
|
@Execute( phase = LifecyclePhase.COMPILE )
|
||||||
|
public class Maximal
|
||||||
|
extends AbstractMojo
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Parameter description.
|
||||||
|
*
|
||||||
|
* @since since-text
|
||||||
|
* @deprecated deprecated-text
|
||||||
|
*/
|
||||||
|
@Parameter( alias = "myAlias",
|
||||||
|
property = "aProperty",
|
||||||
|
defaultValue = "${anExpression}",
|
||||||
|
readonly = true,
|
||||||
|
required = true )
|
||||||
|
private String param;
|
||||||
|
|
||||||
|
@Component( role = MavenProjectHelper.class, hint = "test" )
|
||||||
|
private Object projectHelper;
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
package org.apache.maven.plugin.coreit;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
|
import org.apache.maven.plugins.annotations.Component;
|
||||||
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
import org.apache.maven.plugins.annotations.Parameter;
|
||||||
|
import org.apache.maven.project.MavenProjectHelper;
|
||||||
|
|
||||||
|
// minimum annotations => default values
|
||||||
|
@Mojo( name = "minimal" )
|
||||||
|
public class Minimal
|
||||||
|
extends AbstractMojo
|
||||||
|
{
|
||||||
|
@Parameter
|
||||||
|
private String param;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
private MavenProjectHelper projectHelper;
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
package fr.ca;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public interface TestInterface {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Java 8 required to support such default method implementation
|
||||||
|
*/
|
||||||
|
public default void foo(){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,231 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
File touchFile = new File( basedir, "target/touch.txt" )
|
||||||
|
assert touchFile.isFile()
|
||||||
|
|
||||||
|
File descriptorFile = new File( basedir, "target/classes/META-INF/maven/plugin.xml" );
|
||||||
|
assert descriptorFile.isFile()
|
||||||
|
|
||||||
|
def pluginDescriptor = new XmlParser().parse( descriptorFile );
|
||||||
|
|
||||||
|
def mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "first" }[0]
|
||||||
|
|
||||||
|
assert mojo.goal.text() == 'first'
|
||||||
|
assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.FirstMojo'
|
||||||
|
assert mojo.language.text() == 'java'
|
||||||
|
assert mojo.description.text() == 'Touches a test file.'
|
||||||
|
assert mojo.deprecated.text() == "Don't use!"
|
||||||
|
assert mojo.requiresDependencyResolution.text() == 'test'
|
||||||
|
assert mojo.requiresDependencyCollection.text() == ''
|
||||||
|
assert mojo.requiresProject.text() == 'true'
|
||||||
|
assert mojo.requiresOnline.text() == 'false'
|
||||||
|
assert mojo.requiresDirectInvocation.text() == 'false'
|
||||||
|
assert mojo.aggregator.text() == 'false'
|
||||||
|
assert mojo.threadSafe.text() == 'false'
|
||||||
|
assert mojo.phase.text() == 'integration-test'
|
||||||
|
assert mojo.executePhase.text() == 'generate-sources'
|
||||||
|
assert mojo.executeLifecycle.text() == 'cobertura'
|
||||||
|
|
||||||
|
assert mojo.configuration.basedir[0].text() == ''
|
||||||
|
assert mojo.configuration.basedir[0].'@implementation' == 'java.io.File'
|
||||||
|
assert mojo.configuration.basedir[0].'@default-value' == '${basedir}'
|
||||||
|
|
||||||
|
assert mojo.configuration.touchFile[0].text() == '${first.touchFile}'
|
||||||
|
assert mojo.configuration.touchFile[0].'@implementation' == 'java.io.File'
|
||||||
|
assert mojo.configuration.touchFile[0].'@default-value' == '${project.build.directory}/touch.txt'
|
||||||
|
|
||||||
|
assert mojo.configuration.session[0].text() == ''
|
||||||
|
assert mojo.configuration.session[0].'@implementation' == 'org.apache.maven.execution.MavenSession'
|
||||||
|
assert mojo.configuration.session[0].'@default-value' == '${session}'
|
||||||
|
|
||||||
|
assert mojo.configuration.project[0].text() == ''
|
||||||
|
assert mojo.configuration.project[0].'@implementation' == 'org.apache.maven.project.MavenProject'
|
||||||
|
assert mojo.configuration.project[0].'@default-value' == '${project}'
|
||||||
|
|
||||||
|
assert mojo.configuration.mojo[0].text() == ''
|
||||||
|
assert mojo.configuration.mojo[0].'@implementation' == 'org.apache.maven.plugin.MojoExecution'
|
||||||
|
assert mojo.configuration.mojo[0].'@default-value' == '${mojoExecution}'
|
||||||
|
|
||||||
|
assert mojo.configuration.plugin[0].text() == ''
|
||||||
|
assert mojo.configuration.plugin[0].'@implementation' == 'org.apache.maven.plugin.descriptor.PluginDescriptor'
|
||||||
|
assert mojo.configuration.plugin[0].'@default-value' == '${plugin}'
|
||||||
|
|
||||||
|
assert mojo.configuration.settings[0].text() == ''
|
||||||
|
assert mojo.configuration.settings[0].'@implementation' == 'org.apache.maven.settings.Settings'
|
||||||
|
assert mojo.configuration.settings[0].'@default-value' == '${settings}'
|
||||||
|
|
||||||
|
assert mojo.requirements.requirement.size() == 1
|
||||||
|
|
||||||
|
assert mojo.requirements.requirement[0].role.text() == 'org.apache.maven.project.MavenProjectHelper'
|
||||||
|
assert mojo.requirements.requirement[0].'role-hint'.text() == 'test'
|
||||||
|
assert mojo.requirements.requirement[0].'field-name'.text() == 'projectHelper'
|
||||||
|
|
||||||
|
assert mojo.parameters.parameter.size() == 8
|
||||||
|
|
||||||
|
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "namedParam" }[0]
|
||||||
|
assert parameter.name.text() == 'namedParam'
|
||||||
|
assert parameter.alias.text() == 'alias'
|
||||||
|
assert parameter.type.text() == 'java.lang.String'
|
||||||
|
assert parameter.deprecated.text() == 'As of 0.2'
|
||||||
|
assert parameter.required.text() == 'false'
|
||||||
|
assert parameter.editable.text() == 'true'
|
||||||
|
assert parameter.description.text() == ''
|
||||||
|
|
||||||
|
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "basedir" }[0]
|
||||||
|
assert parameter.name.text() == 'basedir'
|
||||||
|
assert parameter.alias.isEmpty()
|
||||||
|
assert parameter.type.text() == 'java.io.File'
|
||||||
|
assert parameter.deprecated.isEmpty()
|
||||||
|
assert parameter.required.text() == 'false'
|
||||||
|
assert parameter.editable.text() == 'false'
|
||||||
|
assert parameter.description.text() == 'Project directory.'
|
||||||
|
|
||||||
|
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "mojo" }[0]
|
||||||
|
assert parameter.name.text() == 'mojo'
|
||||||
|
assert parameter.alias.isEmpty()
|
||||||
|
assert parameter.type.text() == 'org.apache.maven.plugin.MojoExecution'
|
||||||
|
assert parameter.deprecated.isEmpty()
|
||||||
|
assert parameter.required.text() == 'true'
|
||||||
|
assert parameter.editable.text() == 'false'
|
||||||
|
assert parameter.description.text() == ''
|
||||||
|
|
||||||
|
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "plugin" }[0]
|
||||||
|
assert parameter.name.text() == 'plugin'
|
||||||
|
assert parameter.alias.isEmpty()
|
||||||
|
assert parameter.type.text() == 'org.apache.maven.plugin.descriptor.PluginDescriptor'
|
||||||
|
assert parameter.deprecated.isEmpty()
|
||||||
|
assert parameter.required.text() == 'true'
|
||||||
|
assert parameter.editable.text() == 'false'
|
||||||
|
assert parameter.description.text() == ''
|
||||||
|
|
||||||
|
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "project" }[0]
|
||||||
|
assert parameter.name.text() == 'project'
|
||||||
|
assert parameter.alias.isEmpty()
|
||||||
|
assert parameter.type.text() == 'org.apache.maven.project.MavenProject'
|
||||||
|
assert parameter.deprecated.isEmpty()
|
||||||
|
assert parameter.required.text() == 'true'
|
||||||
|
assert parameter.editable.text() == 'false'
|
||||||
|
assert parameter.description.text() == ''
|
||||||
|
|
||||||
|
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "session" }[0]
|
||||||
|
assert parameter.name.text() == 'session'
|
||||||
|
assert parameter.alias.isEmpty()
|
||||||
|
assert parameter.type.text() == 'org.apache.maven.execution.MavenSession'
|
||||||
|
assert parameter.deprecated.isEmpty()
|
||||||
|
assert parameter.required.text() == 'true'
|
||||||
|
assert parameter.editable.text() == 'false'
|
||||||
|
assert parameter.description.text() == ''
|
||||||
|
|
||||||
|
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "settings" }[0]
|
||||||
|
assert parameter.name.text() == 'settings'
|
||||||
|
assert parameter.alias.isEmpty()
|
||||||
|
assert parameter.type.text() == 'org.apache.maven.settings.Settings'
|
||||||
|
assert parameter.deprecated.isEmpty()
|
||||||
|
assert parameter.required.text() == 'true'
|
||||||
|
assert parameter.editable.text() == 'false'
|
||||||
|
assert parameter.description.text() == ''
|
||||||
|
|
||||||
|
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "touchFile" }[0]
|
||||||
|
assert parameter.name.text() == 'touchFile'
|
||||||
|
assert parameter.alias.isEmpty()
|
||||||
|
assert parameter.type.text() == 'java.io.File'
|
||||||
|
assert parameter.deprecated.isEmpty()
|
||||||
|
assert parameter.required.text() == 'true'
|
||||||
|
assert parameter.editable.text() == 'true'
|
||||||
|
assert parameter.description.text() == ''
|
||||||
|
|
||||||
|
// check default values
|
||||||
|
mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "minimal"}[0]
|
||||||
|
|
||||||
|
assert mojo.goal.text() == 'minimal'
|
||||||
|
assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.Minimal'
|
||||||
|
assert mojo.language.text() == 'java'
|
||||||
|
assert mojo.description.text() == ''
|
||||||
|
assert mojo.deprecated.text() == ''
|
||||||
|
assert mojo.requiresDependencyResolution.text() == ''
|
||||||
|
assert mojo.requiresDependencyCollection.text() == ''
|
||||||
|
assert mojo.requiresProject.text() == 'true'
|
||||||
|
assert mojo.requiresOnline.text() == 'false'
|
||||||
|
assert mojo.requiresDirectInvocation.text() == 'false'
|
||||||
|
assert mojo.requiresReports.text() == 'false'
|
||||||
|
assert mojo.aggregator.text() == 'false'
|
||||||
|
assert mojo.threadSafe.text() == 'false'
|
||||||
|
assert mojo.phase.text() == ''
|
||||||
|
assert mojo.executePhase.text() == ''
|
||||||
|
assert mojo.executeLifecycle.text() == ''
|
||||||
|
assert mojo.executionStrategy.text() == 'once-per-session'
|
||||||
|
assert mojo.inheritedByDefault.text() == 'true'
|
||||||
|
assert mojo.instantiationStrategy.text() == 'per-lookup'
|
||||||
|
|
||||||
|
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "param" }[0]
|
||||||
|
assert parameter.name.text() == 'param'
|
||||||
|
assert parameter.alias.text() == ''
|
||||||
|
assert parameter.type.text() == 'java.lang.String'
|
||||||
|
assert parameter.deprecated.text() == ''
|
||||||
|
assert parameter.required.text() == 'false'
|
||||||
|
assert parameter.editable.text() == 'true'
|
||||||
|
assert parameter.description.text() == ''
|
||||||
|
|
||||||
|
def requirement = mojo.requirements.requirement.findAll{ it.'field-name'.text() == "projectHelper" }[0]
|
||||||
|
assert requirement.role.text() == 'org.apache.maven.project.MavenProjectHelper'
|
||||||
|
|
||||||
|
// check values set by every annotation
|
||||||
|
mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "maximal"}[0]
|
||||||
|
|
||||||
|
assert mojo.goal.text() == 'maximal'
|
||||||
|
assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.Maximal'
|
||||||
|
assert mojo.language.text() == 'java'
|
||||||
|
assert mojo.description.text() == 'Checks maximum annotations with non-default values.'
|
||||||
|
assert mojo.deprecated.text() == 'deprecated-text'
|
||||||
|
assert mojo.requiresDependencyResolution.text() == 'compile'
|
||||||
|
assert mojo.requiresDependencyCollection.text() == 'test'
|
||||||
|
assert mojo.requiresProject.text() == 'false'
|
||||||
|
assert mojo.requiresOnline.text() == 'true'
|
||||||
|
assert mojo.requiresDirectInvocation.text() == 'true'
|
||||||
|
assert mojo.requiresReports.text() == 'true'
|
||||||
|
assert mojo.aggregator.text() == 'true'
|
||||||
|
assert mojo.configurator.text() == 'configurator-hint'
|
||||||
|
assert mojo.threadSafe.text() == 'true'
|
||||||
|
assert mojo.phase.text() == 'package'
|
||||||
|
assert mojo.executePhase.text() == 'compile'
|
||||||
|
assert mojo.executeLifecycle.text() == ''
|
||||||
|
assert mojo.executionStrategy.text() == 'always'
|
||||||
|
assert mojo.inheritedByDefault.text() == 'false'
|
||||||
|
assert mojo.instantiationStrategy.text() == 'singleton'
|
||||||
|
|
||||||
|
parameter = mojo.parameters.parameter.findAll{ it.name.text() == "param" }[0]
|
||||||
|
assert parameter.name.text() == 'param'
|
||||||
|
assert parameter.alias.text() == 'myAlias'
|
||||||
|
assert parameter.type.text() == 'java.lang.String'
|
||||||
|
assert parameter.since.text() == 'since-text'
|
||||||
|
assert parameter.deprecated.text() == 'deprecated-text'
|
||||||
|
assert parameter.required.text() == 'true'
|
||||||
|
assert parameter.editable.text() == 'false'
|
||||||
|
assert parameter.description.text() == 'Parameter description.'
|
||||||
|
|
||||||
|
requirement = mojo.requirements.requirement.findAll{ it.'field-name'.text() == "projectHelper" }[0]
|
||||||
|
assert requirement.role.text() == 'org.apache.maven.project.MavenProjectHelper'
|
||||||
|
|
||||||
|
// check help mojo source and class
|
||||||
|
assert new File( basedir, "target/classes/org/apache/maven/plugin/coreit/HelpMojo.class" ).isFile()
|
||||||
|
assert new File( basedir, "target/generated-sources/plugin/org/apache/maven/plugin/coreit/HelpMojo.java" ).isFile()
|
||||||
|
assert !new File( basedir, "target/generated-sources/plugin/HelpMojo.java" ).isFile()
|
||||||
|
|
||||||
|
return true;
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue