odlguice.git
6 years agoMigrate to odlparent 2.0.2
Stephen Kitt [Fri, 21 Jul 2017 08:43:27 +0000 (10:43 +0200)]
Migrate to odlparent 2.0.2

Change-Id: If612c5fbfaafd11714632a27e8be1c2feab94108
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoUpgrade to odlparent 2.0.0 & handle its impacts
Michael Vorburger [Tue, 20 Jun 2017 12:55:50 +0000 (14:55 +0200)]
Upgrade to odlparent 2.0.0 & handle its impacts

Change-Id: Ie492292379a3f7b8927a1f1c0b5f0a32f9255058
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoMigrate to odlparent 1.9.0
Thanh Ha [Tue, 13 Jun 2017 18:42:57 +0000 (14:42 -0400)]
Migrate to odlparent 1.9.0

Change-Id: Icfdf12404682a4ec8a2c372568fcae49da14f573
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoAdd bind2ToInstance to AbstractGuiceJsr250Module
Michael Vorburger [Thu, 1 Jun 2017 05:01:02 +0000 (07:01 +0200)]
Add bind2ToInstance to AbstractGuiceJsr250Module

This is already used in ElanServiceTestModule, and also needed in
FibManagerTestModule, so instead of copy/pasting it, being move up
refactored here.

Change-Id: I3b5e11236c1e756ba98fbe9ee10b1dcfe9dd6f98
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoMigrate to odlparent 1.8.0-Carbon
Thanh Ha [Tue, 6 Jun 2017 20:33:28 +0000 (16:33 -0400)]
Migrate to odlparent 1.8.0-Carbon

Per request of odlparent project we are downgrading all Nitrogen
projects to use the released odlparent 1.8.0-Carbon to allow for the
odlparent project to start performing semver style releases.

Jira: RELENG-159
RT: 41406
Change-Id: Ie31fdf84ae45b2f0e1865394726178f14376b6c3
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoBug 8438: New integration test utilities (itestutils)
Michael Vorburger [Fri, 12 May 2017 04:11:55 +0000 (06:11 +0200)]
Bug 8438: New integration test utilities (itestutils)

see Bugzilla description for more background re. what this is all about

Change-Id: I1d2524c874a371a7c7d63ebd8cbb9dfb0678bc44
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoinject.guice.testutils javax.inject <optional>false
Michael Vorburger [Tue, 9 May 2017 13:44:37 +0000 (15:44 +0200)]
inject.guice.testutils javax.inject <optional>false

see https://git.opendaylight.org/gerrit/#/c/56723/

Change-Id: I9433fb7c314edcc672973fc3b989731097ce87e6
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoBump versions by x.(y+1).z for next dev cycle
Anil Belur [Tue, 11 Apr 2017 01:45:37 +0000 (11:45 +1000)]
Bump versions by x.(y+1).z for next dev cycle

Change-Id: I14dd4017ca7c8c80b81d2fc1b0b50b35d9c15447
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
7 years agoAdd missing <name> fields for pom.xml files
Thanh Ha [Fri, 3 Mar 2017 01:51:41 +0000 (20:51 -0500)]
Add missing <name> fields for pom.xml files

This is used by autorelease scripts to automatically parse which project
is failing a build and report to the mailing list automatically. We need
names in the format:

    ODL :: <groupId> :: <artifactId>

This patch formats in the same format as found in the startup archetypes
patch found here: https://git.opendaylight.org/gerrit/52522

Change-Id: Ie80fe4341e0e52ef93a560a56d2553e3f40ddfbb
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoAbstractGuiceJsr250Module configureBindings() throws Exception
Michael Vorburger [Thu, 24 Nov 2016 23:59:19 +0000 (00:59 +0100)]
AbstractGuiceJsr250Module configureBindings() throws Exception

Change-Id: I9e18b423d2dcf6230536cab04abf62e3d31a79c0
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoFix broken build of inject-guice-testutils
Michael Vorburger [Thu, 17 Nov 2016 16:12:48 +0000 (17:12 +0100)]
Fix broken build of inject-guice-testutils

see https://git.opendaylight.org/gerrit/#/c/48442/ for full background.

Change-Id: I2d5527366795c0ad2e9de8d6dd17143537777088
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoFix broken GuiceModule, and rename it to AbstractGuiceJsr250Module
Michael Vorburger [Mon, 10 Oct 2016 11:40:01 +0000 (13:40 +0200)]
Fix broken GuiceModule, and rename it to AbstractGuiceJsr250Module

Bug: final configure() forgot to call the abstract configureBindings()

The self test has also been improved to actually detect this problem.
(Before it was too simplistic; without an interface, there was actually
no need at all for a binding, so the problem went undetected.)

Change-Id: I25ff3ccfb84d4179e50befd898e4e911d854f795
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoAdd missing copyright headers in pom.xml as req. by Alexis
Michael Vorburger [Fri, 7 Oct 2016 13:40:50 +0000 (15:40 +0200)]
Add missing copyright headers in pom.xml as req. by Alexis

I had actually done this but forgot to git push it to
https://git.opendaylight.org/gerrit/#/c/46041/ before the merge..

Change-Id: I9c1c13556b7fea9b6553a76586131295d189324b
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoIntroducing new @Rule GuiceRule guice = new GuiceRule(*Module.class)
Michael Vorburger [Thu, 22 Sep 2016 10:57:43 +0000 (12:57 +0200)]
Introducing new @Rule GuiceRule guice = new GuiceRule(*Module.class)

This simplifies & standardizes setting up Guice for tests with a JUnit
rule. -- For an existing example, please consult the AclServiceTest in
netvirt/vpnservice/aclservice/impl; the TODO there will get replaced
with a @Rule based on the GuiceRule introduced here.

Change-Id: I931037e859c76ad06525cbd359056a7639179afe
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoRemove SingletonWithLifecycle, because @Singleton is not inherited
Michael Vorburger [Tue, 6 Sep 2016 15:20:06 +0000 (17:20 +0200)]
Remove SingletonWithLifecycle, because @Singleton is not inherited

and move @PostConstruct & @PreDestroy from interface Lifecycle to class
AbstractLifecycle, because method annotations are only inherited from
classes, not interfaces

See
http://stackoverflow.com/questions/7761513/is-there-something-like-annotation-inheritance-in-java,
http://stackoverflow.com/questions/5536583/the-mystery-of-java-ee-6-annotations-inheritance,
http://stackoverflow.com/questions/13015831/can-guices-singleton-annotation-be-inherited,
http://stackoverflow.com/questions/10596744/is-it-possible-for-class-to-inherit-the-annotaions-of-the-super-class,
http://stackoverflow.com/questions/4745798/why-java-classes-do-not-inherit-annotations-from-implemented-interfaces,
http://stackoverflow.com/questions/23973107/how-to-use-inherited-annotation-in-java,
http://stackoverflow.com/questions/10082619/how-do-java-method-annotations-work-in-conjunction-with-method-overriding

Note that none of the annotations in question here have an @Inherited
annotation themselves.  For @PostConstruct & @PreDestroy it works anyway
with the blueprint-maven-plugin (I've now fully tested this end-to-end
in the netvirt aclservice-impl), and should be the same with Guice +
Mycila from what I can tell looking at that implementation.

Unrelated to above, this also fixes up the features.xml which I
originally forgot.

Change-Id: I1848838fa3123cd5fd7892445d26c89cc07a476c
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years ago@Inject convenience helper (org.opendaylight.infrautils.inject)
Michael Vorburger [Tue, 23 Aug 2016 13:59:43 +0000 (15:59 +0200)]
@Inject convenience helper (org.opendaylight.infrautils.inject)

Introduces the Lifecycle interrface with the LifecycleSupport and
SingletonWithLifecycle convenience base classes, with a
ModuleSetupRuntimeException, to standardize the use of @Inject (in
@Singleton) in the ODL code base for projects using the
blueprint-maven-plugin to generate wiring XML from these Java
annotations instead of hand writing it.

Change-Id: I88313940370e6cbef30bd471b2cda8238be5beb8
Signed-off-by: Michael Vorburger <vorburger@redhat.com>