> On May 22, 2017, at 8:57, Ralph Goers <ralph.go...@dslextreme.com> wrote: > > When you run the release plugin the artifact is deployed when the module gets > to the deploy phase. Thus any shading would take place too late to do any > good.
I think there's a misunderstanding: the shade plugin is bound to the package phase, not the deploy phase. So the Java 9 classes would be copied in time (before verify>install>deploy). Would you object to the Java 9 classes going to a separate module if we can get this to work? > It could be done if we renamed log4j-api to something else and then disable > the deploy in the module. Then the new log4j-api could create the jar. But > this all seems messier than what is there now. If you ignore the Java 9 stuff > it should just work in the IDE. > > Ralph > >> On May 21, 2017, at 4:50 PM, Remko Popma <remko.po...@gmail.com> wrote: >> >> >>> On May 22, 2017, at 5:30, Ralph Goers <ralph.go...@dslextreme.com> wrote: >>> >>> I’m not sure how to make it be any better than this. Although the Java 9 >>> classes could be removed we would just have to put them back in a couple of >>> months when Java 9 is released. Putting them in a separate module is not a >>> great option as that will require an additional jar to run in Java 9. >> >> Putting the Java 9 classes in a separate module has several advantages. It >> would allow IDE's to function in a standard way. It would also make very >> clear which JDKs are required to build the project and remove the need for >> the toolchain workaround. >> >> Together these make the project more approachable for new contributors which >> I feel is important for the long term of the project. >> >> What remains is a matter of convincing Maven to do what we need: >> * we _don't_ want this new module to result in a separate artifact in the >> distribution. Seems doable: we already do this with log4j-perf. >> * we _do_ want the Java 9 classes to be included in the log4j-api artifact. >> I hope we can do this with maven-shade? >> >> Does this make sense? >> >> Remko >> >> (Shameless plug) Every java main() method deserves http://picocli.info >> >>> >>> Ralph >>> >>>> On May 21, 2017, at 1:14 PM, Mikael Ståldal <mik...@staldal.nu> wrote: >>>> >>>> Same with IntelliJ IDEA. You can set JRE per module (such as log4j-api, >>>> log4j-core), but not per source folder. >>>> >>>> So this is not enough to fix it. But it is better than nothing, so please >>>> keep it. And do the same for tests if/when we add any tests for the code >>>> in src/main/java9. >>>> >>>> I am now able to continue to work with the project in IntelliJ IDEA by >>>> excluding src/main/java9. (But if I work with the Java 9 stuff, I only >>>> have a text editor with syntax highlighting, no other IDE support for that >>>> part.) >>>> >>>> >>>>> On 2017-05-21 14:50, Gary Gregory wrote: >>>>> I set the JRE for that project to Java 9. I do not think you can set the >>>>> JRE per source folder, only per project. >>>>> Gary >>>>> On May 21, 2017 1:29 AM, "Ralph Goers" <ralph.go...@dslextreme.com> wrote: >>>>> I’ve modified the build to put the Java 9 classes of the API into a >>>>> separate source directory. Can you see if that helps things in Eclipse? >>>>> Ralph >>> >>> >> > >