Hi Martin,
thanks for your input!
Please see answers inline.
On 27/01/14 00:24, Martin Skurla wrote:
> Hi Tyrus devs,
>
> during last few days I went through the codebase of Tyrus and I would
> like to ask a few questions related to the build infrastructure:
>
> 1. No longer used protocol module
> * The protocol module is not defined in the super pom.xml (and
> thus also not compiled and tested), but it is still in the git
> repository.
> * What was the purpose of that module and could we remove it
> completely?
>
removed.
> 1. Tyrus source and binary compatibility
> * The documentation notes that the JDK 7 is required for the
> Tyrus project.
> o However the super pom.xml defines JDK 1.6 as both source
> an target versions.
> o tyrus-archetype-echo module will generate project using
> JDK 1.7.
> o tyrus-bundles module is defining 2 JDK7 specific modules.
> * Why is it so?
>
you missed one module - tyrus-container-servlet. We try to keep Tyrus
compatible with 1.6, but servlet 3.1 API is compiled with 1.7, so we
have to force 1.7 whenever we use Servlet 3.1 APIs.
> 1. Missing dependencies in <dependencyManagement> in super pom.xml
> * This is a very minor issue, but it looks like just a subset of
> container modules is defined in the <dependencyManagement>
> block in super pom.xml. The following ones are missing:
> o tyrus-container-glassfish-ejb
> o tyrus-container-inmemory
>
fixed.
> 1. Unnecessary versioning of dependencies
> * There are multiple cases where versioning of dependencies is
> unnecessary as the version is already defined in the
> <dependencyManagement> section, e.g. explicitly specifying the
> version of javax.websocket.api.
>
fixed.
> 1. jar vs bundle packaging
> * maven-bundle-plugin declares that packaging has to be bundle
> in order to work correctly.
> * In reality most of the modules have defined jar packaging and
> it works, but we should change it to bundle.
>
fixed.
> *
>
>
> 1. Unnecessary build plugin declarations
> * There are modules where the build plugin maven-compiler-plugin
> is explicitly defined even if not defining any configuration
> and so completely useless (as it is part of default Maven
> lifecycle).
>
fixed.
> * On the other side maven-war-plugin is defined in many places
> only because of <failOnMissingWebXml> element. Can we move
> that to super pom's <dependencyManagement> block ?
>
fixed.
> *
>
>
>
> 1. Other
> * junit dependency in super pom.xml should have default test scope
> o This is interesting, I would define the JUnit dependency
> as test scoped and only explicitly overwrite the scope to
> compile for tyrus-test-tools module.
> o junit is then manually set to test scoped in various other
> modules
>
I'd prefer to leave this as it is - then you can see what dependency is
in which scope when you see pom file itself (you don't need to do
execute mvn to get effective pom etc).
>
> I can provide patches to all the mentioned items after
> clarification/approval.
that's fine, I already fixed these in the master branch.
Regards,
Pavel
>
> Thanks,
> Martin