0% found this document useful (0 votes)
270 views65 pages

IDempiere Plug-In Development

The document discusses various ways to distribute plug-ins for AEM including: 1) Hosting plug-ins in a centralized repository like the AEM marketplace or a p2 repository. 2) Installing and updating AEM and plug-ins over the internet by hosting AEM and plug-ins in a centralized location. 3) Updating AEM via command line by specifying features, repositories, and installation directories.

Uploaded by

carlcols
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
270 views65 pages

IDempiere Plug-In Development

The document discusses various ways to distribute plug-ins for AEM including: 1) Hosting plug-ins in a centralized repository like the AEM marketplace or a p2 repository. 2) Installing and updating AEM and plug-ins over the internet by hosting AEM and plug-ins in a centralized location. 3) Updating AEM via command line by specifying features, repositories, and installation directories.

Uploaded by

carlcols
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 65

evenos Consulting GmbH

1
Consulting
evenos
Plug-In Development
Jan Thielemann evenos Consulting GmbH
16. Mai 2013
evenos Consulting GmbH
2
Consulting
evenos
Table of contents

Why should use !lug"ins#


$%em!ie&e a!!&oa'h
i%em!ie&e a!!&oa'h
(easons to use !lug"ins

What 'an do )ith !lug"ins#


Common tas*s
+!e'ial tas*s

Ho) do sta&t develo!ing my o)n !lug"ins#


,i&st ste!s
-est !&a'ti'e

Ho) 'an i dist&ibute my !lug"ins#


!2 &e!osito&ies
nstall !lug"ins .&om /a& .iles via $!a'he ,eli0 Web Console

Ti!s and t&i'*s

Con'lusion
evenos Consulting GmbH
3
Consulting
evenos
Why should I use plug-ins?
$%em!ie&e a!!&oa'h1

Che'* out $%em!ie&e and 'on.igu&e you& )o&*s!a'e

C&eate a ne) !&o/e't .o& you& 'ustomi2ations o& modi.y the o&iginal sou&'es

(e"'om!ile the sou&'es and '&eate a 'ustomi2ation./a& )ith the modi.ied .iles

+to! the +e&ve&

(e!la'e e0isting .iles o& install the 'ustomi2ation./a& via setu!3silentsetu!

(un additinal mig&ation s'&!its

+ta&t the +e&ve&


%isadvantages1

n'onvenient .o& ne) develo!e&s

4&&o&"!&one

+e&ve& must be shut do)n

$nt build .iles must be modi.ied to solve additional de!enden'ies

Code .&om )ithin the 'ustomi2ation./a& must be !la'ed in the &ight di&e'to&y st&u'tu&e to )o&*

5o !ossibility to 6ui'*ly enable3disable modi.i'ations


evenos Consulting GmbH
7
Consulting
evenos
Why should I use plug-ins?
i%em!ie&e a!!&oa'h1

Che'* out i%em!ie&e and 'on.igu&e you& )o&*s!a'e

C&eate a ne) 89lug"in 9&o/e't:

;se e0tension !oints o& 'om!onent de.initions to !&ovide .un'tionality

40!o&t the !lug"in

nstall and sta&t the !lug"in du&ing &untime


$dvantages1

Modula& a&'hite'tu&e

Convenient and easie& to unde&stand .o& ne) develo!e&s

+e&ve& must not be shut do)n to install3a'tivate3dea'tivate3&emove !lug"ins

5o need to modi.y the 'o&e

%e!enden'y management

-ette&3easie& e0tensibility

4asily u!date the 'o&e )ithout losing you& 'ustomi2ations


%isadvantages1

Modi.i'ation o. 'o&e .iles is not !ossible

Today not eve&ything 'an be done )ith !lug"ins " but )e a&e )o&*ing on it
evenos Consulting GmbH
<
Consulting
evenos
Why should I use plug-ins?
(easons to use !lug"ins1

=ou develo! .un'tionality .o& you& !e&sonal use> but you still )ant to su!!o&t the 'ommunity )ith bug .i0es

=ou )ant to ma*e some 6ui'* and di&ty tests and may )ant to &ollba'* you& 'hanges )ithout heada'he

=ou have seve&al 'ustome&s .o& )ho you develo! but some o. the .un'tionality is only .o& some o. the
'ustome&s and should not be available .o& eve&yone

=ou &egula&y u!date i%em!ie&e to the latest available ve&sion

=ou develo! .un'tionality on you& lo'al system and )ant an easy )ay to e0!o&t you& 'hanges to you&
!&odu'tive system

=ou a&e ne) to i%em!ie&e develo!ment and have no unde&standing o. the 'o&e yet

=ou develo!ed a g&eat .eatu&e )hi'h you )ant to sell )ithout 'a&ing about the 'ustome&s base system
evenos Consulting GmbH
6
Consulting
evenos
What can I do with plug-ins?
+!e'ial tas*s1

9ayment 9&o'esso&

+hi!ment 9&o'esso&

$tta'hements

9a'* n3?ut

99? 4lement Handle&s

Tabs

Menus
Common tas*s1

Model

Modelvalidato&

9&o'esses

Callout

%o'ument

,o&m

4dito&

n.o)indo)

@oo*u!
evenos Consulting GmbH
A
Consulting
evenos
How do I start developing my own plug-ins?

Che'* out the i%em!ie&e sou&'e 'ode and 'on.igu&e you& )o&*s!a'e
$ good tuto&ial 'an be .ound at htt!133))).global6ss.'om3)i*i3inde0.!h!3%em!ie&e

(ead the !lug"in develo!ment tuto&ials in the idem!ie&e )i*i


htt!133)i*i.idem!ie&e.o&g3en3Catego&y19lug"nB%evelo!ment

(ead the .o&um .&om (edhuan %. ?on " he has some g&eat tuto&ials too
htt!133&ed1.o&g3adem!ie&e3inde0.!h!

Ta*e a loo* at e0isting !lug"ins


The&e a&e a lot o. !lug"ins and many o. them ma*es use o. e0tension !oints and 'om!onent de.initions

(ead the )i*i and use google

Join us on i&' at Cidem!ie&e Di&'..&eenode.netE and a*s .o& hel!


,i&st ste!s1
evenos Consulting GmbH
F
Consulting
evenos
How do I start developing my own plug-ins?
Best practice - create a new plug-in
evenos Consulting GmbH
G
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
10
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
11
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
12
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
13
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
17
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
1<
Consulting
evenos
How do I start developing my own plug-ins?
Best practice - configure the manifest
evenos Consulting GmbH
16
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
1A
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
1F
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
1G
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
20
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
21
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
22
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
23
Consulting
evenos
How do I start developing my own plug-ins?
Best practice - 2Pack
evenos Consulting GmbH
27
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
2<
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
26
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
2A
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
2F
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
2G
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
30
Consulting
evenos
How do I start developing my own plug-ins?
Best practice - RegisterBuddy, Etensions and
!omponents
evenos Consulting GmbH
31
Consulting
evenos
How do I start developing my own plug-ins?
(egiste&-uddy
evenos Consulting GmbH
32
Consulting
evenos
How do I start developing my own plug-ins?
(egiste&-uddy
evenos Consulting GmbH
33
Consulting
evenos
How do I start developing my own plug-ins?
(egiste&-uddy
evenos Consulting GmbH
37
Consulting
evenos
How do I start developing my own plug-ins?
(egiste&-uddy
evenos Consulting GmbH
3<
Consulting
evenos
How do I start developing my own plug-ins?
40tension
evenos Consulting GmbH
36
Consulting
evenos
How do I start developing my own plug-ins?
40tension
evenos Consulting GmbH
3A
Consulting
evenos
How do I start developing my own plug-ins?
Com!onent
evenos Consulting GmbH
3F
Consulting
evenos
How do I start developing my own plug-ins?
Com!onent
evenos Consulting GmbH
3G
Consulting
evenos
How do I start developing my own plug-ins?
Com!onent
evenos Consulting GmbH
70
Consulting
evenos
How do I start developing my own plug-ins?
Com!onent
evenos Consulting GmbH
71
Consulting
evenos
How do I start developing my own plug-ins?
Com!onent
evenos Consulting GmbH
72
Consulting
evenos
How do I start developing my own plug-ins?
Com!onent
evenos Consulting GmbH
73
Consulting
evenos
How do I start developing my own plug-ins?
Com!onent
evenos Consulting GmbH
77
Consulting
evenos
How do I start developing my own plug-ins?
Com!onent
evenos Consulting GmbH
7<
Consulting
evenos
How do I start developing my own plug-ins?
Best practice - compile plug-ins into the client
evenos Consulting GmbH
76
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
7A
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
7F
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
7G
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
<0
Consulting
evenos
How do I start developing my own plug-ins?
Best practice - eport plug-ins as p2 repositories or "ar
evenos Consulting GmbH
<1
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
<2
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
<3
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
<7
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
<<
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
<6
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
<A
Consulting
evenos
How do I start developing my own plug-ins?
evenos Consulting GmbH
<F
Consulting
evenos
How can I distribute my plug-ins?

8The !2 !&o/e't is a sub"!&o/e't o. 46uino0 that .o'uses on !&ovisioning te'hnology .o& ?+Gi"based a!!li'ations. $lthough !2 has
s!e'i.i' su!!o&t .o& installing 4'li!se and 46uino0"based a!!li'ations> it in'ludes a gene&al"!u&!ose !&ovisioning in.&ast&u'tu&e that
'an be used as the basis .o& !&ovisioning solutions .o& a )ide va&iety o. so.t)a&e a!!li'ations.: " htt!133))).e'li!se.o&g3e6uino03!23

+ho&t1 a !o)e&.ul )ay to install and u!date i%em!ie&e and its !lug"ins ove& the inte&net

Host i%em!ie&e and you& !lug"ins in a 'ent&ali2ed &e!osito&y

Host you !lug"ins in the i%em!ie&e ma&*et!la'e D'omming soonE

;!date i%em!ie&e via 'ommand line1


/ava "%osgi.no+hutdo)nH.alse "%osgi.'om!atibility.bootdelegationHt&ue "%osgi.install.a&eaHdi&e'to& "/a&
!lugins3o&g.e'li!se.osgiB3.A.I./a& "a!!li'ation o&g.e'li!se.e6uino0.!2.di&e'to& "'onsole@og "!&o.ile9&o!e&ties
o&g.e'li!se.u!date.install..eatu&esHt&ue "destination J%4+T5$T?5 "&e!osito&y
htt!133do)nloads.sou&'e.o&ge.net3!&o/e't3&ed13!23idem!ie&e"se&ve&3 "u o&g.adem!ie&e.se&ve&.!&odu't
/ava "%osgi.no+hutdo)nH.alse "%osgi.'om!atibility.bootdelegationHt&ue "%osgi.install.a&eaHdi&e'to& "/a&
!lugins3o&g.e'li!se.osgiB3.A.I./a& "a!!li'ation o&g.e'li!se.e6uino0.!2.di&e'to& "'onsole@og "!&o.ile9&o!e&ties
o&g.e'li!se.u!date.install..eatu&esHt&ue "destination J%4+T5$T?5 "&e!osito&y
htt!133do)nloads.sou&'e.o&ge.net3!&o/e't3&ed13!23idem!ie&e"se&ve&3 "i o&g.adem!ie&e.se&ve&.!&odu't
!2 &e!osito&ies1
evenos Consulting GmbH
<G
Consulting
evenos
How can I distribute my plug-ins?

?n the se&ve&> !lug"ins 'an be installed via $!a'he ,eli0 Web Console
htt!133host1F0F03osgi3system3'onsole3bundles

5o need to sto! o& &esta&t the se&ve& .o& installing3u!dating3&emoving !lug"ins

5o 'ommand line

Mostly sel. e0!lanato&y


$!a'he ,eli0 Web Console
evenos Consulting GmbH
60
Consulting
evenos
How can I distribute my plug-ins?
evenos Consulting GmbH
61
Consulting
evenos
How can I distribute my plug-ins?
evenos Consulting GmbH
62
Consulting
evenos
Tips and tricks

40tending3ove&&iding base models


40tend the base model and /ust '&eate a ne) M 'lass instead '&eating > K and M 'lasses
9&ovide you& model via Model,a'to&y
This )ay> 'o&e 'lasses 'an still 'ast you& modi.ied model to

Test !lug"ins in 4'li!se


?!en (un Con.igu&ations and sele't the a!!li'ation you )ant to &un
+)it'h to the 9lug"ins tab and 'he'* the !lug"ins you )ant to sta&t
+ta&t the a!!li'ation
Ty!e 8ss: on the 'onsole to see the state o. ea'h !lugin
+ta&t !lug"ins )ith 8sta&t Ln&M:
+to! !lug"ins )ith 8sto! Ln&M:
(emove !lug"ins )ith 8uninstall Ln&M:

?+Gi 'onsole )hen sta&ting the se&ve& via 'ommand line


o!en idem!ie&e"se&ve&.sh
&emove the numbe&s a.te& 8"'onsole:
&un idem!ie&e"se&ve&.sh
evenos Consulting GmbH
63
Consulting
evenos
Tips and tricks

Whe&e to get hel!#


i%em!ie&e has nea&ly the same 'o&e as $%em!ie&e so .o& getting sta&tet these boo*s a&e still a good sta&ting
!oint to get a bette& unde&standing o. )hat is ha!!ening behind the s'enes1
$%em!ie&e 3.6 Coo*boo* by $/it Numa&
$%em!ie&e 3.7 4(9 +olutions by -ayu Cahya 9amung*as
$%em!ie&e )i*i1 htt!133))).adem!ie&e.'om3$%em!ie&eB4(9
i%em!ie&e )i*i1 htt!133)i*i.idem!ie&e.o&g3)i*i3MainB9age
Google g&ou!1 htt!s133g&ou!s.google.'om3.o&um3#.&omg&ou!sCO.o&um3idem!ie&e
(edhuan %. ?on .o&um1 htt!133&ed1.o&g3adem!ie&e3inde0.!h!
Global Puality +ystem and +olutions )i*i1 htt!133))).global6ss.'om3)i*i3inde0.!h!3%em!ie&e
,&eenode i&'1 Cidem!ie&e

,ound a bug#
Che'* i. the bug is also in the i%em!ei&e demo system1 htt!s133demo.idem!ie&e.'om3
$s* othe&s about the bug in the i&' 'hannel
,ile a bug in the ti'*et system1 htt!133/i&a.idem!ie&e.'om
evenos Consulting GmbH
67
Consulting
evenos
Conclusion

i%em!ie&e ma*es use o. the 46uino0 ?+Gi ,&ame)o&*

i%em!ie&e ma*es it easie& to !&ovide additional .un'tionality via !lug"ins

i%em!ie&e is easie& to maintain

i%em!ie&e ma*es it easy to sha&e data bet)een di..e&ent instan'es

i%em!ie&e is beginne& .&iendly


i%em!ie&e ma*es it !ossible to !&ovide additional .un'tionality )ithout the need to have the 'ustome&s )hole
sou&'e 'ode

i%em!ie&e is easy to lea&n .o& !eo!le )ho a&e al&eady .amilia& )ith $%em!ie&e
evenos Consulting GmbH
6<
Consulting
evenos
#hank you for your attention
,eel .&ee to as* 6uestions. =ou 'an 'onta't me at /an.thielemannQevenos"'onsulting.de

You might also like