On Mon, 25 Feb 2019 at 16:24, Vladimir Sitnikov <sitnikov.vladi...@gmail.com> wrote: > > sebb> It can mess up history, and why move over 1000 files if you don't > need to? > > It does NOT mess the history. > Feel free to inspect my gradle branch: > https://github.com/vlsi/jmeter/tree/gradle > > For instance, here's the history for NewDriver.java: > https://github.com/vlsi/jmeter/blame/gradle/src/core/src/main/java/org/apache/jmeter/NewDriver.java > Even though I moved the file, it shows the history just fine. Not a single > line is attributed to me. > > sebb>Also it makes it easier to compare Gradle with Ant if there are fewer > changes. > > The point of Git/Gradle migration is to make Apache JMeter development > experience great again. Of course we can configure Gradle build files so it > uses current folder layout, however it would run into various issues > (including the ones where IDE does not support our build customization). > > Note: so far I just moved files around, and it is quite trivial to verify > that no source was altered in the middle. > The jar artifacts would still need to be inspected, so keeping old source > layout does not really help to verify binaries. > > sebb>If you mean that the test files should be in the same directory as the > sebb>files they are testing, then I am -1 on that. > > I mean that the layout should be like > core/src/main/java/org/apache/jmeter/... <-- production java classes > core/src/main/resources/org/apache/jmeter/... <-- resources for > production (e.g. property files) > core/src/test/java/org/apache/jmeter/... <-- test classes for core module > core/src/test/resources/org/apache/jmeter/... <-- resources for test > classes (e.g. property files, jmx files, etc)
That's OK, except I don't see the need to move the runtime source files, particularly for a Proof of Concept. > You can read more on that in the documentation: > https://docs.gradle.org/current/userguide/java_plugin.html#sec:java_project_layout Which also explains how easy it is to use a custom layout: https://docs.gradle.org/current/userguide/java_plugin.html#sec:changing_java_project_layout Is that not properly supported by Gradle? > sebb> What are you trying to achieve by moving the files? > > I'm trying to move test classes closer to the relevant implementations. > > For instance, in my branch (e.g. > https://github.com/vlsi/jmeter/tree/6674650bb1c35e93fdc4bb3caa57fdcf1acc8dea/src/protocol/jms/src > ) you > can find how > test classes for JMS are located in jms/src/test/java, and implementation > classes for jms are located in jms/src/main/java > > It provides several improvements: > 1) The layout is standard, and developers know where they can find > implementation and/or a test class. They know where the class should be > added to. > 2) Classpath for testing is sane. In other words, if a certain protocol > uses a dependency jar, we don't really want that dependency to be used > accidentally in implementation and/or in test classes for other protocol. > 3) Tests for different modules can be compiled and run in parallel. > > Vladimir