+0.5 (see below, comment inline)
Yes, I agree. I even have a way forward, if you've been paying
attention to the maven branch(OFBIZ-6271).
I have maven working with the *existing* layout in ofbiz. My plan for
migration has been this:
* Get maven working with existing structure. Ie, maven can compile all
the code, can create all the jars, basically, it can do everything that
the build.xml files do. This is a little tricky, as the top-level
build.xml contains several custom targets; I'll probably just use the
antrun plugin for these.
* Add top-level properties in ofbiz-parent.pom, that define all the
folders we might need to move; update ofbiz-component-pom.xml to use
these variables.
* Switch each component one at a time, setting variables in the local
pom.xml(s) with the new location. Each one of these should be a
separate commit.
* Announce(!)
* ??? Profit?
ps: The standard maven test hooks do *not* run coverage against code
compiled by the test phase. Aka, there is no way to know if src/test/*
is getting correct coverage. I think I can fix this, as we really
should verify not only the baseline code, but the testing code, for
correctness.
On 04/23/2015 10:42 PM, Scott Gray wrote:
+1
Regards
Scott
On 21 January 2015 at 00:41, Jacopo Cappellato <
jacopo.cappell...@hotwaxmedia.com> wrote:
In my opinion it would be nice to review how we organize the code in our
components and switch to a directory layout that is more inline with what
other projects are doing, for example:
http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
More specifically I would like to switch from, for example:
script/org/ofbiz/product/
src/org/ofbiz/product/
src/org/ofbiz/product/test/
to:
src/main/java/org/ofbiz/product/
src/main/minilang/org/ofbiz/product/
src/main/groovy/...
src/test/java/org/ofbiz/product/
Altho, actually, I think this layout is because maven is stupid, and the
plugins and fileset api does not allow for different type files in
different folders. Aka, the groovyc and javac hooks have a hard time
compiling .groovy and .java when they exist together in src/, so maven
authors decided to split them into src/*/groovy and src/*/java.
I haven't yet gotten to integrating a groovy compiler plugin, I see only
one .groovy in framework/service/src, for the entire project.