You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Łukasz Dywicki <lu...@code-house.org> on 2014/04/12 00:40:29 UTC
Maven build improvements & osgi stuff
Hey all,
Apachecon has been ended so I am following the promise I did - I’ve taken a look on the log4j build to check what’s going on with OSGi stuff. Currently OSGi bundles are split from main log4j-core which I think leads to maintanance trouble also number of dependencies of log4j-core seems to be very high. If we could split the log4j-core into smaller modules (mongodb, jms, jmx, web) then there will be no need to keep log4j-osgi and it’s submodules.
According to maven guides [1] "Optional dependencies are used when it's not really possible (for whatever reason) to split a project up into sub-modules”, I think it will also make library design much more clear and will avoid making unecessary inner code deps. Seems that big, aggregate modules, are always grow to size which require major work to split them to make both: maintanance and community involvement possible.
[1] https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
Cheers,
Łukasz Dywicki
--
luke@code-house.org
Twitter: ldywicki
Blog: http://dywicki.pl
Code-House - http://code-house.org
Re: Maven build improvements & osgi stuff
Posted by Matt Sicker <bo...@gmail.com>.
Just be separating out the parts that use optional dependencies, we can
update those modules to have required dependencies. Or in the case of
something like JPA, the documentation would state that you need to include
a JPA provider. JMS: a JMS provider. That sort of thing.
On 15 April 2014 03:50, Łukasz Dywicki <lu...@code-house.org> wrote:
> I think your approach is reasonable - JMS is not used in desktop
> applications often. Even in Tomcat which is web container it’s very rare to
> run JMS for logging. I don’t have any objections to disruptor dependency.
> Documentation will need to enlist JARs which have to be present on
> classpath to make particular appenders running. For developers it’s
> straight forward because maven does great job, but for administrators
> setting up for example centralized tomcat logging will be very helpful.
>
> Thank you very much for cooperation!
>
> Best regards,
> Łukasz Dywicki
> --
> luke@code-house.org
> Twitter: ldywicki
> Blog: http://dywicki.pl
> Code-House - http://code-house.org
>
> Wiadomość napisana przez Matt Sicker <bo...@gmail.com> w dniu 15 kwi
> 2014, o godz. 01:05:
>
> JMX is part of Java SE. I think it should work fine. The GUI can still be
> its own JAR as it's needed for JConsole, but the MBeans and such work fine
> in Java SE.
>
>
> On 14 April 2014 17:15, Remko Popma <re...@gmail.com> wrote:
>
>>
>>
>> On 2014/04/15, at 0:21, Ralph Goers <ra...@dslextreme.com> wrote:
>>
>> I, for one, am not upset by this discussion. As I have said, I have no
>> objection to pulling some stuff out of core and I am thinking we need to
>> start a companion project for “extra” stuff. That said, most Log4j users
>> will expect that the core will contain roughly the same components that
>> were in Log4j 1.x. But I am not convinced that JPA (or even SMTP) needs to
>> be a core component. And I would probably be in favor of moving JMX out
>> too, but I know it might be difficult to get consensus on that.
>>
>>
>> Are you aware that JMX does not require any external dependencies?
>>
>> The JMX GUI does need the JDK tools.jar to build (so it can be run inside
>> JConsole as well as a standalone app), and we already moved it to a
>> separate module...
>>
>> From a dependencies point of view there is no reason to move JMX out of
>> core.
>>
>> Remko
>>
>> Sent from my iPhone
>>
>>
>> Ralph
>>
>>
>> On Apr 14, 2014, at 7:42 AM, Matt Sicker <bo...@gmail.com> wrote:
>>
>> Oh right, that is true. Well, you still need to provide the Jackson
>> dependencies for JSON files to work.
>>
>> I agree on the god library front, too. I just don't know how to get the
>> point across without upsetting everyone.
>>
>> On Monday, 14 April 2014, Łukasz Dywicki <lu...@code-house.org> wrote:
>>
>>> Hey Matt,
>>> I assumed JSON is default (or has higher priority than XML at least)
>>> based on documentation.
>>>
>>> Log4j will inspect the "log4j.configurationFile" system property and, if
>>> set, will attempt to load the configuration using the
>>> ConfigurationFactory that matches the file extension.
>>> If no system property is set the JSON ConfigurationFactory will look for
>>> log4j2-test.json or log4j2-test.jsn in the classpath.
>>> If no such file is found the XML ConfigurationFactory will look for
>>> log4j2-test.xml in the classpath.
>>> If a test file cannot be located the JSON ConfigurationFactory will look
>>> for log4j2.json or log4j2.jsn on the classpath.
>>> If a JSON file cannot be located the XML ConfigurationFactory will try
>>> to locate log4j2.xml on the classpath.
>>> If no configuration file could be located the DefaultConfiguration will
>>> be used. This will cause logging output to go to the console.
>>>
>>> Sadly you did not catch sense of my question. Point was - how much
>>> configuration *formats* you gonna place in core, when people will opt for
>>> scala configuration dsl, what will happen?
>>>
>>> Anyway, it’s up to you how you drive your library. You might not see
>>> need to split core, that’s fine for me. Just remind that creation of
>>> "god-like” thinks is bad practice in software development regardless if
>>> it’s class, package or module.
>>>
>>> Best regards,
>>> Łukasz Dywicki
>>> --
>>> luke@code-house.org
>>> Twitter: ldywicki
>>> Blog: http://dywicki.pl
>>> Code-House - http://code-house.org
>>>
>>> Wiadomość napisana przez Matt Sicker <bo...@gmail.com> w dniu 13 kwi
>>> 2014, o godz. 18:27:
>>>
>>> XML is the default file format. You need to add the jackson libraries to
>>> get JSON and YAML support. If people like YAML more than JSON, they're
>>> using the same library, so it's perfectly alright!
>>>
>>> What would you mean by Groovy and Scala formats? You can already use
>>> Log4j2 with any JVM language, and you can write your own custom
>>> implementation of Configuration (though it's usually only done to support
>>> more file formats due to the need to represent a parsed configuration file).
>>>
>>> Really, the parts that I think make most sense for modularity are any
>>> packages that have optional dependencies. It's just that each optional
>>> dependency tends to correspond to about 3-5 java files, so it seems
>>> pointless to make entire JARs for each of those. I think that's the problem
>>> everyone else is seeing.
>>>
>>>
>>> On 13 April 2014 05:53, Łukasz Dywicki <lu...@code-house.org> wrote:
>>>
>>> Hey,
>>> Please find my replies inline. I do reply on all mails at the same time.
>>>
>>>
>>>
>>> I had a great idea inspired by Mark from Tomcat (forget his full name)
>>> in regards to splitting up core: we can set up a parallel repository that
>>> uses svn:external to organise the various packages into separate modules.
>>> Then separate pom.xml files can be written for these sub-modules. This
>>> might be a better route to go.
>>>
>>> I think you have spoken to Mark Thomas who did presentat few things. I
>>> also spoken to Christopher Schultz who had tomcat monitoring presentation
>>> and he is also tomcat commiter. He told me that Tomcat build is quite
>>> complicated and that’s reason why they did not switch to maven. No need to
>>> mention how big is build.xml for them. Main reason why their build is
>>> complicated and hard to get it done is big core.
>>>
>>> In Tomcat, they keep all their source code in one tree. However, their
>>> Ant build scripts build several JARs from that tree by pulling in various
>>> sub-directories. This is actually a big reason why they couldn't easily
>>> move to Maven (amongst other reasons I bet). It was suggested to make a
>>> parallel repository like I mentioned above.
>>>
>>> I don’t think that having source code in one tree is bad thing.
>>> Sometimes you will have different releases having exactelly same code
>>> producing unecessary traffic on maven repos and so on (we will let Sonatype
>>> pay for it ;-))). For most of people it does not make a big difference. But
>>> on Tomcat build example you can see a big technology debt. Multiple
>>> repositories are bringing some extra effort to releases too.
>>>
>>> Also, amusingly enough, Lucas, I've had quite a similar discussion here
>>> before. The main thing here is that nobody seems to think that core is
>>> large enough to be split. It's a different way of thinking about
>>> development when you move to OSGi.
>>>
>>> I can understand that. But you already see bunch of things which are
>>> sitting next to each other having not that much in common. You can also
>>> take a look on camel which is big project in apache having many
>>> dependencies. You might run it under tomcat and they have fine grained
>>> dependencies. I never seen anybody on their mailing lists considering that
>>> as mistake or wrong thing.
>>>
>>> Also, if you drop Log4j into a web container currently it will
>>> automatically initialize in a Servlet 3 container. I’ve always been a bit
>>> uncomfortable with that and it was originally in its own jar, but others
>>> preferred it the way it currently is.
>>>
>>> I do use log4j under tomcat as default logging backend also for
>>> container so in the container I just need slf4j bridge since all apps I
>>> have made are not dependant on logging backend. These times many libraries
>>> are already backed to slf4j so it is even easier to go.
>>>
>>> Wait, some one is going to want to split each configuration forma
>>>
>>>
>>>
>>
>> --
>> Matt Sicker <bo...@gmail.com>
>>
>>
>>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>
>
>
--
Matt Sicker <bo...@gmail.com>
Re: Maven build improvements & osgi stuff
Posted by Łukasz Dywicki <lu...@code-house.org>.
I think your approach is reasonable - JMS is not used in desktop applications often. Even in Tomcat which is web container it’s very rare to run JMS for logging. I don’t have any objections to disruptor dependency. Documentation will need to enlist JARs which have to be present on classpath to make particular appenders running. For developers it’s straight forward because maven does great job, but for administrators setting up for example centralized tomcat logging will be very helpful.
Thank you very much for cooperation!
Best regards,
Łukasz Dywicki
--
luke@code-house.org
Twitter: ldywicki
Blog: http://dywicki.pl
Code-House - http://code-house.org
Wiadomość napisana przez Matt Sicker <bo...@gmail.com> w dniu 15 kwi 2014, o godz. 01:05:
> JMX is part of Java SE. I think it should work fine. The GUI can still be its own JAR as it's needed for JConsole, but the MBeans and such work fine in Java SE.
>
>
> On 14 April 2014 17:15, Remko Popma <re...@gmail.com> wrote:
>
>
> On 2014/04/15, at 0:21, Ralph Goers <ra...@dslextreme.com> wrote:
>
>> I, for one, am not upset by this discussion. As I have said, I have no objection to pulling some stuff out of core and I am thinking we need to start a companion project for “extra” stuff. That said, most Log4j users will expect that the core will contain roughly the same components that were in Log4j 1.x. But I am not convinced that JPA (or even SMTP) needs to be a core component. And I would probably be in favor of moving JMX out too, but I know it might be difficult to get consensus on that.
>
> Are you aware that JMX does not require any external dependencies?
>
> The JMX GUI does need the JDK tools.jar to build (so it can be run inside JConsole as well as a standalone app), and we already moved it to a separate module...
>
> From a dependencies point of view there is no reason to move JMX out of core.
>
> Remko
>
> Sent from my iPhone
>>
>> Ralph
>>
>>
>> On Apr 14, 2014, at 7:42 AM, Matt Sicker <bo...@gmail.com> wrote:
>>
>>> Oh right, that is true. Well, you still need to provide the Jackson dependencies for JSON files to work.
>>>
>>> I agree on the god library front, too. I just don't know how to get the point across without upsetting everyone.
>>>
>>> On Monday, 14 April 2014, Łukasz Dywicki <lu...@code-house.org> wrote:
>>> Hey Matt,
>>> I assumed JSON is default (or has higher priority than XML at least) based on documentation.
>>>
>>> Log4j will inspect the "log4j.configurationFile" system property and, if set, will attempt to load the configuration using the ConfigurationFactory that matches the file extension.
>>> If no system property is set the JSON ConfigurationFactory will look for log4j2-test.json or log4j2-test.jsn in the classpath.
>>> If no such file is found the XML ConfigurationFactory will look for log4j2-test.xml in the classpath.
>>> If a test file cannot be located the JSON ConfigurationFactory will look for log4j2.json or log4j2.jsn on the classpath.
>>> If a JSON file cannot be located the XML ConfigurationFactory will try to locate log4j2.xml on the classpath.
>>> If no configuration file could be located the DefaultConfiguration will be used. This will cause logging output to go to the console.
>>>
>>> Sadly you did not catch sense of my question. Point was - how much configuration *formats* you gonna place in core, when people will opt for scala configuration dsl, what will happen?
>>>
>>> Anyway, it’s up to you how you drive your library. You might not see need to split core, that’s fine for me. Just remind that creation of "god-like” thinks is bad practice in software development regardless if it’s class, package or module.
>>>
>>> Best regards,
>>> Łukasz Dywicki
>>> --
>>> luke@code-house.org
>>> Twitter: ldywicki
>>> Blog: http://dywicki.pl
>>> Code-House - http://code-house.org
>>>
>>> Wiadomość napisana przez Matt Sicker <bo...@gmail.com> w dniu 13 kwi 2014, o godz. 18:27:
>>>
>>>> XML is the default file format. You need to add the jackson libraries to get JSON and YAML support. If people like YAML more than JSON, they're using the same library, so it's perfectly alright!
>>>>
>>>> What would you mean by Groovy and Scala formats? You can already use Log4j2 with any JVM language, and you can write your own custom implementation of Configuration (though it's usually only done to support more file formats due to the need to represent a parsed configuration file).
>>>>
>>>> Really, the parts that I think make most sense for modularity are any packages that have optional dependencies. It's just that each optional dependency tends to correspond to about 3-5 java files, so it seems pointless to make entire JARs for each of those. I think that's the problem everyone else is seeing.
>>>>
>>>>
>>>> On 13 April 2014 05:53, Łukasz Dywicki <lu...@code-house.org> wrote:
>>>> Hey,
>>>> Please find my replies inline. I do reply on all mails at the same time.
>>>>
>>>>
>>>>
>>>>> I had a great idea inspired by Mark from Tomcat (forget his full name) in regards to splitting up core: we can set up a parallel repository that uses svn:external to organise the various packages into separate modules. Then separate pom.xml files can be written for these sub-modules. This might be a better route to go.
>>>>
>>>> I think you have spoken to Mark Thomas who did presentat few things. I also spoken to Christopher Schultz who had tomcat monitoring presentation and he is also tomcat commiter. He told me that Tomcat build is quite complicated and that’s reason why they did not switch to maven. No need to mention how big is build.xml for them. Main reason why their build is complicated and hard to get it done is big core.
>>>>
>>>>> In Tomcat, they keep all their source code in one tree. However, their Ant build scripts build several JARs from that tree by pulling in various sub-directories. This is actually a big reason why they couldn't easily move to Maven (amongst other reasons I bet). It was suggested to make a parallel repository like I mentioned above.
>>>>
>>>> I don’t think that having source code in one tree is bad thing. Sometimes you will have different releases having exactelly same code producing unecessary traffic on maven repos and so on (we will let Sonatype pay for it ;-))). For most of people it does not make a big difference. But on Tomcat build example you can see a big technology debt. Multiple repositories are bringing some extra effort to releases too.
>>>>
>>>>> Also, amusingly enough, Lucas, I've had quite a similar discussion here before. The main thing here is that nobody seems to think that core is large enough to be split. It's a different way of thinking about development when you move to OSGi.
>>>>
>>>> I can understand that. But you already see bunch of things which are sitting next to each other having not that much in common. You can also take a look on camel which is big project in apache having many dependencies. You might run it under tomcat and they have fine grained dependencies. I never seen anybody on their mailing lists considering that as mistake or wrong thing.
>>>>
>>>>> Also, if you drop Log4j into a web container currently it will automatically initialize in a Servlet 3 container. I’ve always been a bit uncomfortable with that and it was originally in its own jar, but others preferred it the way it currently is.
>>>> I do use log4j under tomcat as default logging backend also for container so in the container I just need slf4j bridge since all apps I have made are not dependant on logging backend. These times many libraries are already backed to slf4j so it is even easier to go.
>>>>
>>>>>> Wait, some one is going to want to split each configuration forma
>>>
>>>
>>>
>>> --
>>> Matt Sicker <bo...@gmail.com>
>>
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
Re: Maven build improvements & osgi stuff
Posted by Matt Sicker <bo...@gmail.com>.
JMX is part of Java SE. I think it should work fine. The GUI can still be
its own JAR as it's needed for JConsole, but the MBeans and such work fine
in Java SE.
On 14 April 2014 17:15, Remko Popma <re...@gmail.com> wrote:
>
>
> On 2014/04/15, at 0:21, Ralph Goers <ra...@dslextreme.com> wrote:
>
> I, for one, am not upset by this discussion. As I have said, I have no
> objection to pulling some stuff out of core and I am thinking we need to
> start a companion project for “extra” stuff. That said, most Log4j users
> will expect that the core will contain roughly the same components that
> were in Log4j 1.x. But I am not convinced that JPA (or even SMTP) needs to
> be a core component. And I would probably be in favor of moving JMX out
> too, but I know it might be difficult to get consensus on that.
>
>
> Are you aware that JMX does not require any external dependencies?
>
> The JMX GUI does need the JDK tools.jar to build (so it can be run inside
> JConsole as well as a standalone app), and we already moved it to a
> separate module...
>
> From a dependencies point of view there is no reason to move JMX out of
> core.
>
> Remko
>
> Sent from my iPhone
>
>
> Ralph
>
>
> On Apr 14, 2014, at 7:42 AM, Matt Sicker <bo...@gmail.com> wrote:
>
> Oh right, that is true. Well, you still need to provide the Jackson
> dependencies for JSON files to work.
>
> I agree on the god library front, too. I just don't know how to get the
> point across without upsetting everyone.
>
> On Monday, 14 April 2014, Łukasz Dywicki <lu...@code-house.org> wrote:
>
>> Hey Matt,
>> I assumed JSON is default (or has higher priority than XML at least)
>> based on documentation.
>>
>> Log4j will inspect the "log4j.configurationFile" system property and, if
>> set, will attempt to load the configuration using the
>> ConfigurationFactory that matches the file extension.
>> If no system property is set the JSON ConfigurationFactory will look for
>> log4j2-test.json or log4j2-test.jsn in the classpath.
>> If no such file is found the XML ConfigurationFactory will look for
>> log4j2-test.xml in the classpath.
>> If a test file cannot be located the JSON ConfigurationFactory will look
>> for log4j2.json or log4j2.jsn on the classpath.
>> If a JSON file cannot be located the XML ConfigurationFactory will try to
>> locate log4j2.xml on the classpath.
>> If no configuration file could be located the DefaultConfiguration will
>> be used. This will cause logging output to go to the console.
>>
>> Sadly you did not catch sense of my question. Point was - how much
>> configuration *formats* you gonna place in core, when people will opt for
>> scala configuration dsl, what will happen?
>>
>> Anyway, it’s up to you how you drive your library. You might not see need
>> to split core, that’s fine for me. Just remind that creation of "god-like”
>> thinks is bad practice in software development regardless if it’s class,
>> package or module.
>>
>> Best regards,
>> Łukasz Dywicki
>> --
>> luke@code-house.org
>> Twitter: ldywicki
>> Blog: http://dywicki.pl
>> Code-House - http://code-house.org
>>
>> Wiadomość napisana przez Matt Sicker <bo...@gmail.com> w dniu 13 kwi
>> 2014, o godz. 18:27:
>>
>> XML is the default file format. You need to add the jackson libraries to
>> get JSON and YAML support. If people like YAML more than JSON, they're
>> using the same library, so it's perfectly alright!
>>
>> What would you mean by Groovy and Scala formats? You can already use
>> Log4j2 with any JVM language, and you can write your own custom
>> implementation of Configuration (though it's usually only done to support
>> more file formats due to the need to represent a parsed configuration file).
>>
>> Really, the parts that I think make most sense for modularity are any
>> packages that have optional dependencies. It's just that each optional
>> dependency tends to correspond to about 3-5 java files, so it seems
>> pointless to make entire JARs for each of those. I think that's the problem
>> everyone else is seeing.
>>
>>
>> On 13 April 2014 05:53, Łukasz Dywicki <lu...@code-house.org> wrote:
>>
>> Hey,
>> Please find my replies inline. I do reply on all mails at the same time.
>>
>>
>>
>> I had a great idea inspired by Mark from Tomcat (forget his full name) in
>> regards to splitting up core: we can set up a parallel repository that uses
>> svn:external to organise the various packages into separate modules. Then
>> separate pom.xml files can be written for these sub-modules. This might be
>> a better route to go.
>>
>> I think you have spoken to Mark Thomas who did presentat few things. I
>> also spoken to Christopher Schultz who had tomcat monitoring presentation
>> and he is also tomcat commiter. He told me that Tomcat build is quite
>> complicated and that’s reason why they did not switch to maven. No need to
>> mention how big is build.xml for them. Main reason why their build is
>> complicated and hard to get it done is big core.
>>
>> In Tomcat, they keep all their source code in one tree. However, their
>> Ant build scripts build several JARs from that tree by pulling in various
>> sub-directories. This is actually a big reason why they couldn't easily
>> move to Maven (amongst other reasons I bet). It was suggested to make a
>> parallel repository like I mentioned above.
>>
>> I don’t think that having source code in one tree is bad thing. Sometimes
>> you will have different releases having exactelly same code producing
>> unecessary traffic on maven repos and so on (we will let Sonatype pay for
>> it ;-))). For most of people it does not make a big difference. But on
>> Tomcat build example you can see a big technology debt. Multiple
>> repositories are bringing some extra effort to releases too.
>>
>> Also, amusingly enough, Lucas, I've had quite a similar discussion here
>> before. The main thing here is that nobody seems to think that core is
>> large enough to be split. It's a different way of thinking about
>> development when you move to OSGi.
>>
>> I can understand that. But you already see bunch of things which are
>> sitting next to each other having not that much in common. You can also
>> take a look on camel which is big project in apache having many
>> dependencies. You might run it under tomcat and they have fine grained
>> dependencies. I never seen anybody on their mailing lists considering that
>> as mistake or wrong thing.
>>
>> Also, if you drop Log4j into a web container currently it will
>> automatically initialize in a Servlet 3 container. I’ve always been a bit
>> uncomfortable with that and it was originally in its own jar, but others
>> preferred it the way it currently is.
>>
>> I do use log4j under tomcat as default logging backend also for container
>> so in the container I just need slf4j bridge since all apps I have made are
>> not dependant on logging backend. These times many libraries are already
>> backed to slf4j so it is even easier to go.
>>
>> Wait, some one is going to want to split each configuration forma
>>
>>
>>
>
> --
> Matt Sicker <bo...@gmail.com>
>
>
>
--
Matt Sicker <bo...@gmail.com>
Re: Maven build improvements & osgi stuff
Posted by Remko Popma <re...@gmail.com>.
> On 2014/04/15, at 0:21, Ralph Goers <ra...@dslextreme.com> wrote:
>
> I, for one, am not upset by this discussion. As I have said, I have no objection to pulling some stuff out of core and I am thinking we need to start a companion project for “extra” stuff. That said, most Log4j users will expect that the core will contain roughly the same components that were in Log4j 1.x. But I am not convinced that JPA (or even SMTP) needs to be a core component. And I would probably be in favor of moving JMX out too, but I know it might be difficult to get consensus on that.
Are you aware that JMX does not require any external dependencies?
The JMX GUI does need the JDK tools.jar to build (so it can be run inside JConsole as well as a standalone app), and we already moved it to a separate module...
From a dependencies point of view there is no reason to move JMX out of core.
Remko
Sent from my iPhone
>
> Ralph
>
>
>> On Apr 14, 2014, at 7:42 AM, Matt Sicker <bo...@gmail.com> wrote:
>>
>> Oh right, that is true. Well, you still need to provide the Jackson dependencies for JSON files to work.
>>
>> I agree on the god library front, too. I just don't know how to get the point across without upsetting everyone.
>>
>>> On Monday, 14 April 2014, Łukasz Dywicki <lu...@code-house.org> wrote:
>>> Hey Matt,
>>> I assumed JSON is default (or has higher priority than XML at least) based on documentation.
>>>
>>> Log4j will inspect the "log4j.configurationFile" system property and, if set, will attempt to load the configuration using the ConfigurationFactory that matches the file extension.
>>> If no system property is set the JSON ConfigurationFactory will look for log4j2-test.json or log4j2-test.jsn in the classpath.
>>> If no such file is found the XML ConfigurationFactory will look for log4j2-test.xml in the classpath.
>>> If a test file cannot be located the JSON ConfigurationFactory will look for log4j2.json or log4j2.jsn on the classpath.
>>> If a JSON file cannot be located the XML ConfigurationFactory will try to locate log4j2.xml on the classpath.
>>> If no configuration file could be located the DefaultConfiguration will be used. This will cause logging output to go to the console.
>>>
>>> Sadly you did not catch sense of my question. Point was - how much configuration *formats* you gonna place in core, when people will opt for scala configuration dsl, what will happen?
>>>
>>> Anyway, it’s up to you how you drive your library. You might not see need to split core, that’s fine for me. Just remind that creation of "god-like” thinks is bad practice in software development regardless if it’s class, package or module.
>>>
>>> Best regards,
>>> Łukasz Dywicki
>>> --
>>> luke@code-house.org
>>> Twitter: ldywicki
>>> Blog: http://dywicki.pl
>>> Code-House - http://code-house.org
>>>
>>>> Wiadomość napisana przez Matt Sicker <bo...@gmail.com> w dniu 13 kwi 2014, o godz. 18:27:
>>>>
>>>> XML is the default file format. You need to add the jackson libraries to get JSON and YAML support. If people like YAML more than JSON, they're using the same library, so it's perfectly alright!
>>>>
>>>> What would you mean by Groovy and Scala formats? You can already use Log4j2 with any JVM language, and you can write your own custom implementation of Configuration (though it's usually only done to support more file formats due to the need to represent a parsed configuration file).
>>>>
>>>> Really, the parts that I think make most sense for modularity are any packages that have optional dependencies. It's just that each optional dependency tends to correspond to about 3-5 java files, so it seems pointless to make entire JARs for each of those. I think that's the problem everyone else is seeing.
>>>>
>>>>
>>>> On 13 April 2014 05:53, Łukasz Dywicki <lu...@code-house.org> wrote:
>>>> Hey,
>>>> Please find my replies inline. I do reply on all mails at the same time.
>>>>
>>>>
>>>>
>>>>> I had a great idea inspired by Mark from Tomcat (forget his full name) in regards to splitting up core: we can set up a parallel repository that uses svn:external to organise the various packages into separate modules. Then separate pom.xml files can be written for these sub-modules. This might be a better route to go.
>>>>
>>>> I think you have spoken to Mark Thomas who did presentat few things. I also spoken to Christopher Schultz who had tomcat monitoring presentation and he is also tomcat commiter. He told me that Tomcat build is quite complicated and that’s reason why they did not switch to maven. No need to mention how big is build.xml for them. Main reason why their build is complicated and hard to get it done is big core.
>>>>
>>>>> In Tomcat, they keep all their source code in one tree. However, their Ant build scripts build several JARs from that tree by pulling in various sub-directories. This is actually a big reason why they couldn't easily move to Maven (amongst other reasons I bet). It was suggested to make a parallel repository like I mentioned above.
>>>>
>>>> I don’t think that having source code in one tree is bad thing. Sometimes you will have different releases having exactelly same code producing unecessary traffic on maven repos and so on (we will let Sonatype pay for it ;-))). For most of people it does not make a big difference. But on Tomcat build example you can see a big technology debt. Multiple repositories are bringing some extra effort to releases too.
>>>>
>>>>> Also, amusingly enough, Lucas, I've had quite a similar discussion here before. The main thing here is that nobody seems to think that core is large enough to be split. It's a different way of thinking about development when you move to OSGi.
>>>>
>>>> I can understand that. But you already see bunch of things which are sitting next to each other having not that much in common. You can also take a look on camel which is big project in apache having many dependencies. You might run it under tomcat and they have fine grained dependencies. I never seen anybody on their mailing lists considering that as mistake or wrong thing.
>>>>
>>>>> Also, if you drop Log4j into a web container currently it will automatically initialize in a Servlet 3 container. I’ve always been a bit uncomfortable with that and it was originally in its own jar, but others preferred it the way it currently is.
>>>> I do use log4j under tomcat as default logging backend also for container so in the container I just need slf4j bridge since all apps I have made are not dependant on logging backend. These times many libraries are already backed to slf4j so it is even easier to go.
>>>>
>>>>>> Wait, some one is going to want to split each configuration forma
>>
>>
>> --
>> Matt Sicker <bo...@gmail.com>
>
Re: Maven build improvements & osgi stuff
Posted by Matt Sicker <bo...@gmail.com>.
The disruptor might actually have to be an exception to the rule! You raise
a great point. The async logger is one of the coolest new features, so we
should probably bring that dependency in. We could go the Tomcat route and
package-rename an internal version of it, or we could just keep an external
dependency on it.
On 14 April 2014 16:24, Ralph Goers <ra...@dslextreme.com> wrote:
> While I agree in principal that may not be practical. For example, I
> don’t know that that could be done with the disruptor, and to be honest
> given the interest there seems to be in asynch mode I’m not sure that would
> be a good idea even if it could be done.
>
> Ralph
>
> On Apr 14, 2014, at 2:19 PM, Matt Sicker <bo...@gmail.com> wrote:
>
> I feel as though anything that requires an outside dependency (other than
> log4j-api) should probably be in its own module. The core should consist of
> everything that is doable without dependencies outside Java SE.
>
> So, even though JMS uses Java EE, it could be its own module since that's
> not standard Java SE.
>
>
> On 14 April 2014 10:21, Ralph Goers <ra...@dslextreme.com> wrote:
>
>> I, for one, am not upset by this discussion. As I have said, I have no
>> objection to pulling some stuff out of core and I am thinking we need to
>> start a companion project for “extra” stuff. That said, most Log4j users
>> will expect that the core will contain roughly the same components that
>> were in Log4j 1.x. But I am not convinced that JPA (or even SMTP) needs to
>> be a core component. And I would probably be in favor of moving JMX out
>> too, but I know it might be difficult to get consensus on that.
>> Ralph
>>
>>
>>
>> On Apr 14, 2014, at 7:42 AM, Matt Sicker <bo...@gmail.com> wrote:
>>
>> Oh right, that is true. Well, you still need to provide the Jackson
>> dependencies for JSON files to work.
>>
>> I agree on the god library front, too. I just don't know how to get the
>> point across without upsetting everyone.
>>
>> On Monday, 14 April 2014, Łukasz Dywicki <lu...@code-house.org> wrote:
>>
>>> Hey Matt,
>>> I assumed JSON is default (or has higher priority than XML at least)
>>> based on documentation.
>>>
>>> Log4j will inspect the "log4j.configurationFile" system property and, if
>>> set, will attempt to load the configuration using the
>>> ConfigurationFactory that matches the file extension.
>>> If no system property is set the JSON ConfigurationFactory will look for
>>> log4j2-test.json or log4j2-test.jsn in the classpath.
>>> If no such file is found the XML ConfigurationFactory will look for
>>> log4j2-test.xml in the classpath.
>>> If a test file cannot be located the JSON ConfigurationFactory will look
>>> for log4j2.json or log4j2.jsn on the classpath.
>>> If a JSON file cannot be located the XML ConfigurationFactory will try
>>> to locate log4j2.xml on the classpath.
>>> If no configuration file could be located the DefaultConfiguration will
>>> be used. This will cause logging output to go to the console.
>>>
>>> Sadly you did not catch sense of my question. Point was - how much
>>> configuration *formats* you gonna place in core, when people will opt for
>>> scala configuration dsl, what will happen?
>>>
>>> Anyway, it’s up to you how you drive your library. You might not see
>>> need to split core, that’s fine for me. Just remind that creation of
>>> "god-like” thinks is bad practice in software development regardless if
>>> it’s class, package or module.
>>>
>>> Best regards,
>>> Łukasz Dywicki
>>> --
>>> luke@code-house.org
>>> Twitter: ldywicki
>>> Blog: http://dywicki.pl
>>> Code-House - http://code-house.org
>>>
>>> Wiadomość napisana przez Matt Sicker <bo...@gmail.com> w dniu 13 kwi
>>> 2014, o godz. 18:27:
>>>
>>> XML is the default file format. You need to add the jackson libraries to
>>> get JSON and YAML support. If people like YAML more than JSON, they're
>>> using the same library, so it's perfectly alright!
>>>
>>> What would you mean by Groovy and Scala formats? You can already use
>>> Log4j2 with any JVM language, and you can write your own custom
>>> implementation of Configuration (though it's usually only done to support
>>> more file formats due to the need to represent a parsed configuration file).
>>>
>>> Really, the parts that I think make most sense for modularity are any
>>> packages that have optional dependencies. It's just that each optional
>>> dependency tends to correspond to about 3-5 java files, so it seems
>>> pointless to make entire JARs for each of those. I think that's the problem
>>> everyone else is seeing.
>>>
>>>
>>> On 13 April 2014 05:53, Łukasz Dywicki <lu...@code-house.org> wrote:
>>>
>>> Hey,
>>> Please find my replies inline. I do reply on all mails at the same time.
>>>
>>>
>>>
>>> I had a great idea inspired by Mark from Tomcat (forget his full name)
>>> in regards to splitting up core: we can set up a parallel repository that
>>> uses svn:external to organise the various packages into separate modules.
>>> Then separate pom.xml files can be written for these sub-modules. This
>>> might be a better route to go.
>>>
>>> I think you have spoken to Mark Thomas who did presentat few things. I
>>> also spoken to Christopher Schultz who had tomcat monitoring presentation
>>> and he is also tomcat commiter. He told me that Tomcat build is quite
>>> complicated and that’s reason why they did not switch to maven. No need to
>>> mention how big is build.xml for them. Main reason why their build is
>>> complicated and hard to get it done is big core.
>>>
>>> In Tomcat, they keep all their source code in one tree. However, their
>>> Ant build scripts build several JARs from that tree by pulling in various
>>> sub-directories. This is actually a big reason why they couldn't easily
>>> move to Maven (amongst other reasons I bet). It was suggested to make a
>>> parallel repository like I mentioned above.
>>>
>>> I don’t think that having source code in one tree is bad thing.
>>> Sometimes you will have different releases having exactelly same code
>>> producing unecessary traffic on maven repos and so on (we will let Sonatype
>>> pay for it ;-))). For most of people it does not make a big difference. But
>>> on Tomcat build example you can see a big technology debt. Multiple
>>> repositories are bringing some extra effort to releases too.
>>>
>>> Also, amusingly enough, Lucas, I've had quite a similar discussion here
>>> before. The main thing here is that nobody seems to think that core is
>>> large enough to be split. It's a different way of thinking about
>>> development when you move to OSGi.
>>>
>>> I can understand that. But you already see bunch of things which are
>>> sitting next to each other having not that much in common. You can also
>>> take a look on camel which is big project in apache having many
>>> dependencies. You might run it under tomcat and they have fine grained
>>> dependencies. I never seen anybody on their mailing lists considering that
>>> as mistake or wrong thing.
>>>
>>> Also, if you drop Log4j into a web container currently it will
>>> automatically initialize in a Servlet 3 container. I’ve always been a bit
>>> uncomfortable with that and it was originally in its own jar, but others
>>> preferred it the way it currently is.
>>>
>>> I do use log4j under tomcat as default logging backend also for
>>> container so in the container I just need slf4j bridge since all apps I
>>> have made are not dependant on logging backend. These times many libraries
>>> are already backed to slf4j so it is even easier to go.
>>>
>>> Wait, some one is going to want to split each configuration forma
>>>
>>>
>>>
>>
>> --
>> Matt Sicker <bo...@gmail.com>
>>
>>
>>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>
>
>
--
Matt Sicker <bo...@gmail.com>
Re: Maven build improvements & osgi stuff
Posted by Ralph Goers <ra...@dslextreme.com>.
While I agree in principal that may not be practical. For example, I don’t know that that could be done with the disruptor, and to be honest given the interest there seems to be in asynch mode I’m not sure that would be a good idea even if it could be done.
Ralph
On Apr 14, 2014, at 2:19 PM, Matt Sicker <bo...@gmail.com> wrote:
> I feel as though anything that requires an outside dependency (other than log4j-api) should probably be in its own module. The core should consist of everything that is doable without dependencies outside Java SE.
>
> So, even though JMS uses Java EE, it could be its own module since that's not standard Java SE.
>
>
> On 14 April 2014 10:21, Ralph Goers <ra...@dslextreme.com> wrote:
> I, for one, am not upset by this discussion. As I have said, I have no objection to pulling some stuff out of core and I am thinking we need to start a companion project for “extra” stuff. That said, most Log4j users will expect that the core will contain roughly the same components that were in Log4j 1.x. But I am not convinced that JPA (or even SMTP) needs to be a core component. And I would probably be in favor of moving JMX out too, but I know it might be difficult to get consensus on that.
> Ralph
>
>
>
> On Apr 14, 2014, at 7:42 AM, Matt Sicker <bo...@gmail.com> wrote:
>
>> Oh right, that is true. Well, you still need to provide the Jackson dependencies for JSON files to work.
>>
>> I agree on the god library front, too. I just don't know how to get the point across without upsetting everyone.
>>
>> On Monday, 14 April 2014, Łukasz Dywicki <lu...@code-house.org> wrote:
>> Hey Matt,
>> I assumed JSON is default (or has higher priority than XML at least) based on documentation.
>>
>> Log4j will inspect the "log4j.configurationFile" system property and, if set, will attempt to load the configuration using the ConfigurationFactory that matches the file extension.
>> If no system property is set the JSON ConfigurationFactory will look for log4j2-test.json or log4j2-test.jsn in the classpath.
>> If no such file is found the XML ConfigurationFactory will look for log4j2-test.xml in the classpath.
>> If a test file cannot be located the JSON ConfigurationFactory will look for log4j2.json or log4j2.jsn on the classpath.
>> If a JSON file cannot be located the XML ConfigurationFactory will try to locate log4j2.xml on the classpath.
>> If no configuration file could be located the DefaultConfiguration will be used. This will cause logging output to go to the console.
>>
>> Sadly you did not catch sense of my question. Point was - how much configuration *formats* you gonna place in core, when people will opt for scala configuration dsl, what will happen?
>>
>> Anyway, it’s up to you how you drive your library. You might not see need to split core, that’s fine for me. Just remind that creation of "god-like” thinks is bad practice in software development regardless if it’s class, package or module.
>>
>> Best regards,
>> Łukasz Dywicki
>> --
>> luke@code-house.org
>> Twitter: ldywicki
>> Blog: http://dywicki.pl
>> Code-House - http://code-house.org
>>
>> Wiadomość napisana przez Matt Sicker <bo...@gmail.com> w dniu 13 kwi 2014, o godz. 18:27:
>>
>>> XML is the default file format. You need to add the jackson libraries to get JSON and YAML support. If people like YAML more than JSON, they're using the same library, so it's perfectly alright!
>>>
>>> What would you mean by Groovy and Scala formats? You can already use Log4j2 with any JVM language, and you can write your own custom implementation of Configuration (though it's usually only done to support more file formats due to the need to represent a parsed configuration file).
>>>
>>> Really, the parts that I think make most sense for modularity are any packages that have optional dependencies. It's just that each optional dependency tends to correspond to about 3-5 java files, so it seems pointless to make entire JARs for each of those. I think that's the problem everyone else is seeing.
>>>
>>>
>>> On 13 April 2014 05:53, Łukasz Dywicki <lu...@code-house.org> wrote:
>>> Hey,
>>> Please find my replies inline. I do reply on all mails at the same time.
>>>
>>>
>>>
>>>> I had a great idea inspired by Mark from Tomcat (forget his full name) in regards to splitting up core: we can set up a parallel repository that uses svn:external to organise the various packages into separate modules. Then separate pom.xml files can be written for these sub-modules. This might be a better route to go.
>>>
>>> I think you have spoken to Mark Thomas who did presentat few things. I also spoken to Christopher Schultz who had tomcat monitoring presentation and he is also tomcat commiter. He told me that Tomcat build is quite complicated and that’s reason why they did not switch to maven. No need to mention how big is build.xml for them. Main reason why their build is complicated and hard to get it done is big core.
>>>
>>>> In Tomcat, they keep all their source code in one tree. However, their Ant build scripts build several JARs from that tree by pulling in various sub-directories. This is actually a big reason why they couldn't easily move to Maven (amongst other reasons I bet). It was suggested to make a parallel repository like I mentioned above.
>>>
>>> I don’t think that having source code in one tree is bad thing. Sometimes you will have different releases having exactelly same code producing unecessary traffic on maven repos and so on (we will let Sonatype pay for it ;-))). For most of people it does not make a big difference. But on Tomcat build example you can see a big technology debt. Multiple repositories are bringing some extra effort to releases too.
>>>
>>>> Also, amusingly enough, Lucas, I've had quite a similar discussion here before. The main thing here is that nobody seems to think that core is large enough to be split. It's a different way of thinking about development when you move to OSGi.
>>>
>>> I can understand that. But you already see bunch of things which are sitting next to each other having not that much in common. You can also take a look on camel which is big project in apache having many dependencies. You might run it under tomcat and they have fine grained dependencies. I never seen anybody on their mailing lists considering that as mistake or wrong thing.
>>>
>>>> Also, if you drop Log4j into a web container currently it will automatically initialize in a Servlet 3 container. I’ve always been a bit uncomfortable with that and it was originally in its own jar, but others preferred it the way it currently is.
>>> I do use log4j under tomcat as default logging backend also for container so in the container I just need slf4j bridge since all apps I have made are not dependant on logging backend. These times many libraries are already backed to slf4j so it is even easier to go.
>>>
>>>>> Wait, some one is going to want to split each configuration forma
>>
>>
>>
>> --
>> Matt Sicker <bo...@gmail.com>
>
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
Re: Maven build improvements & osgi stuff
Posted by Matt Sicker <bo...@gmail.com>.
I feel as though anything that requires an outside dependency (other than
log4j-api) should probably be in its own module. The core should consist of
everything that is doable without dependencies outside Java SE.
So, even though JMS uses Java EE, it could be its own module since that's
not standard Java SE.
On 14 April 2014 10:21, Ralph Goers <ra...@dslextreme.com> wrote:
> I, for one, am not upset by this discussion. As I have said, I have no
> objection to pulling some stuff out of core and I am thinking we need to
> start a companion project for “extra” stuff. That said, most Log4j users
> will expect that the core will contain roughly the same components that
> were in Log4j 1.x. But I am not convinced that JPA (or even SMTP) needs to
> be a core component. And I would probably be in favor of moving JMX out
> too, but I know it might be difficult to get consensus on that.
>
> Ralph
>
>
>
> On Apr 14, 2014, at 7:42 AM, Matt Sicker <bo...@gmail.com> wrote:
>
> Oh right, that is true. Well, you still need to provide the Jackson
> dependencies for JSON files to work.
>
> I agree on the god library front, too. I just don't know how to get the
> point across without upsetting everyone.
>
> On Monday, 14 April 2014, Łukasz Dywicki <lu...@code-house.org> wrote:
>
>> Hey Matt,
>> I assumed JSON is default (or has higher priority than XML at least)
>> based on documentation.
>>
>> Log4j will inspect the "log4j.configurationFile" system property and, if
>> set, will attempt to load the configuration using the
>> ConfigurationFactory that matches the file extension.
>> If no system property is set the JSON ConfigurationFactory will look for
>> log4j2-test.json or log4j2-test.jsn in the classpath.
>> If no such file is found the XML ConfigurationFactory will look for
>> log4j2-test.xml in the classpath.
>> If a test file cannot be located the JSON ConfigurationFactory will look
>> for log4j2.json or log4j2.jsn on the classpath.
>> If a JSON file cannot be located the XML ConfigurationFactory will try to
>> locate log4j2.xml on the classpath.
>> If no configuration file could be located the DefaultConfiguration will
>> be used. This will cause logging output to go to the console.
>>
>> Sadly you did not catch sense of my question. Point was - how much
>> configuration *formats* you gonna place in core, when people will opt for
>> scala configuration dsl, what will happen?
>>
>> Anyway, it’s up to you how you drive your library. You might not see need
>> to split core, that’s fine for me. Just remind that creation of "god-like”
>> thinks is bad practice in software development regardless if it’s class,
>> package or module.
>>
>> Best regards,
>> Łukasz Dywicki
>> --
>> luke@code-house.org
>> Twitter: ldywicki
>> Blog: http://dywicki.pl
>> Code-House - http://code-house.org
>>
>> Wiadomość napisana przez Matt Sicker <bo...@gmail.com> w dniu 13 kwi
>> 2014, o godz. 18:27:
>>
>> XML is the default file format. You need to add the jackson libraries to
>> get JSON and YAML support. If people like YAML more than JSON, they're
>> using the same library, so it's perfectly alright!
>>
>> What would you mean by Groovy and Scala formats? You can already use
>> Log4j2 with any JVM language, and you can write your own custom
>> implementation of Configuration (though it's usually only done to support
>> more file formats due to the need to represent a parsed configuration file).
>>
>> Really, the parts that I think make most sense for modularity are any
>> packages that have optional dependencies. It's just that each optional
>> dependency tends to correspond to about 3-5 java files, so it seems
>> pointless to make entire JARs for each of those. I think that's the problem
>> everyone else is seeing.
>>
>>
>> On 13 April 2014 05:53, Łukasz Dywicki <lu...@code-house.org> wrote:
>>
>> Hey,
>> Please find my replies inline. I do reply on all mails at the same time.
>>
>>
>>
>> I had a great idea inspired by Mark from Tomcat (forget his full name) in
>> regards to splitting up core: we can set up a parallel repository that uses
>> svn:external to organise the various packages into separate modules. Then
>> separate pom.xml files can be written for these sub-modules. This might be
>> a better route to go.
>>
>> I think you have spoken to Mark Thomas who did presentat few things. I
>> also spoken to Christopher Schultz who had tomcat monitoring presentation
>> and he is also tomcat commiter. He told me that Tomcat build is quite
>> complicated and that’s reason why they did not switch to maven. No need to
>> mention how big is build.xml for them. Main reason why their build is
>> complicated and hard to get it done is big core.
>>
>> In Tomcat, they keep all their source code in one tree. However, their
>> Ant build scripts build several JARs from that tree by pulling in various
>> sub-directories. This is actually a big reason why they couldn't easily
>> move to Maven (amongst other reasons I bet). It was suggested to make a
>> parallel repository like I mentioned above.
>>
>> I don’t think that having source code in one tree is bad thing. Sometimes
>> you will have different releases having exactelly same code producing
>> unecessary traffic on maven repos and so on (we will let Sonatype pay for
>> it ;-))). For most of people it does not make a big difference. But on
>> Tomcat build example you can see a big technology debt. Multiple
>> repositories are bringing some extra effort to releases too.
>>
>> Also, amusingly enough, Lucas, I've had quite a similar discussion here
>> before. The main thing here is that nobody seems to think that core is
>> large enough to be split. It's a different way of thinking about
>> development when you move to OSGi.
>>
>> I can understand that. But you already see bunch of things which are
>> sitting next to each other having not that much in common. You can also
>> take a look on camel which is big project in apache having many
>> dependencies. You might run it under tomcat and they have fine grained
>> dependencies. I never seen anybody on their mailing lists considering that
>> as mistake or wrong thing.
>>
>> Also, if you drop Log4j into a web container currently it will
>> automatically initialize in a Servlet 3 container. I’ve always been a bit
>> uncomfortable with that and it was originally in its own jar, but others
>> preferred it the way it currently is.
>>
>> I do use log4j under tomcat as default logging backend also for container
>> so in the container I just need slf4j bridge since all apps I have made are
>> not dependant on logging backend. These times many libraries are already
>> backed to slf4j so it is even easier to go.
>>
>> Wait, some one is going to want to split each configuration forma
>>
>>
>>
>
> --
> Matt Sicker <bo...@gmail.com>
>
>
>
--
Matt Sicker <bo...@gmail.com>
Re: Maven build improvements & osgi stuff
Posted by Ralph Goers <ra...@dslextreme.com>.
I, for one, am not upset by this discussion. As I have said, I have no objection to pulling some stuff out of core and I am thinking we need to start a companion project for “extra” stuff. That said, most Log4j users will expect that the core will contain roughly the same components that were in Log4j 1.x. But I am not convinced that JPA (or even SMTP) needs to be a core component. And I would probably be in favor of moving JMX out too, but I know it might be difficult to get consensus on that.
Ralph
On Apr 14, 2014, at 7:42 AM, Matt Sicker <bo...@gmail.com> wrote:
> Oh right, that is true. Well, you still need to provide the Jackson dependencies for JSON files to work.
>
> I agree on the god library front, too. I just don't know how to get the point across without upsetting everyone.
>
> On Monday, 14 April 2014, Łukasz Dywicki <lu...@code-house.org> wrote:
> Hey Matt,
> I assumed JSON is default (or has higher priority than XML at least) based on documentation.
>
> Log4j will inspect the "log4j.configurationFile" system property and, if set, will attempt to load the configuration using the ConfigurationFactory that matches the file extension.
> If no system property is set the JSON ConfigurationFactory will look for log4j2-test.json or log4j2-test.jsn in the classpath.
> If no such file is found the XML ConfigurationFactory will look for log4j2-test.xml in the classpath.
> If a test file cannot be located the JSON ConfigurationFactory will look for log4j2.json or log4j2.jsn on the classpath.
> If a JSON file cannot be located the XML ConfigurationFactory will try to locate log4j2.xml on the classpath.
> If no configuration file could be located the DefaultConfiguration will be used. This will cause logging output to go to the console.
>
> Sadly you did not catch sense of my question. Point was - how much configuration *formats* you gonna place in core, when people will opt for scala configuration dsl, what will happen?
>
> Anyway, it’s up to you how you drive your library. You might not see need to split core, that’s fine for me. Just remind that creation of "god-like” thinks is bad practice in software development regardless if it’s class, package or module.
>
> Best regards,
> Łukasz Dywicki
> --
> luke@code-house.org
> Twitter: ldywicki
> Blog: http://dywicki.pl
> Code-House - http://code-house.org
>
> Wiadomość napisana przez Matt Sicker <bo...@gmail.com> w dniu 13 kwi 2014, o godz. 18:27:
>
>> XML is the default file format. You need to add the jackson libraries to get JSON and YAML support. If people like YAML more than JSON, they're using the same library, so it's perfectly alright!
>>
>> What would you mean by Groovy and Scala formats? You can already use Log4j2 with any JVM language, and you can write your own custom implementation of Configuration (though it's usually only done to support more file formats due to the need to represent a parsed configuration file).
>>
>> Really, the parts that I think make most sense for modularity are any packages that have optional dependencies. It's just that each optional dependency tends to correspond to about 3-5 java files, so it seems pointless to make entire JARs for each of those. I think that's the problem everyone else is seeing.
>>
>>
>> On 13 April 2014 05:53, Łukasz Dywicki <lu...@code-house.org> wrote:
>> Hey,
>> Please find my replies inline. I do reply on all mails at the same time.
>>
>>
>>
>>> I had a great idea inspired by Mark from Tomcat (forget his full name) in regards to splitting up core: we can set up a parallel repository that uses svn:external to organise the various packages into separate modules. Then separate pom.xml files can be written for these sub-modules. This might be a better route to go.
>>
>> I think you have spoken to Mark Thomas who did presentat few things. I also spoken to Christopher Schultz who had tomcat monitoring presentation and he is also tomcat commiter. He told me that Tomcat build is quite complicated and that’s reason why they did not switch to maven. No need to mention how big is build.xml for them. Main reason why their build is complicated and hard to get it done is big core.
>>
>>> In Tomcat, they keep all their source code in one tree. However, their Ant build scripts build several JARs from that tree by pulling in various sub-directories. This is actually a big reason why they couldn't easily move to Maven (amongst other reasons I bet). It was suggested to make a parallel repository like I mentioned above.
>>
>> I don’t think that having source code in one tree is bad thing. Sometimes you will have different releases having exactelly same code producing unecessary traffic on maven repos and so on (we will let Sonatype pay for it ;-))). For most of people it does not make a big difference. But on Tomcat build example you can see a big technology debt. Multiple repositories are bringing some extra effort to releases too.
>>
>>> Also, amusingly enough, Lucas, I've had quite a similar discussion here before. The main thing here is that nobody seems to think that core is large enough to be split. It's a different way of thinking about development when you move to OSGi.
>>
>> I can understand that. But you already see bunch of things which are sitting next to each other having not that much in common. You can also take a look on camel which is big project in apache having many dependencies. You might run it under tomcat and they have fine grained dependencies. I never seen anybody on their mailing lists considering that as mistake or wrong thing.
>>
>>> Also, if you drop Log4j into a web container currently it will automatically initialize in a Servlet 3 container. I’ve always been a bit uncomfortable with that and it was originally in its own jar, but others preferred it the way it currently is.
>> I do use log4j under tomcat as default logging backend also for container so in the container I just need slf4j bridge since all apps I have made are not dependant on logging backend. These times many libraries are already backed to slf4j so it is even easier to go.
>>
>>>> Wait, some one is going to want to split each configuration forma
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
Re: Maven build improvements & osgi stuff
Posted by Matt Sicker <bo...@gmail.com>.
Oh right, that is true. Well, you still need to provide the Jackson
dependencies for JSON files to work.
I agree on the god library front, too. I just don't know how to get the
point across without upsetting everyone.
On Monday, 14 April 2014, Łukasz Dywicki <lu...@code-house.org> wrote:
> Hey Matt,
> I assumed JSON is default (or has higher priority than XML at least) based
> on documentation.
>
> Log4j will inspect the "log4j.configurationFile" system property and, if
> set, will attempt to load the configuration using the ConfigurationFactory that
> matches the file extension.
> If no system property is set the JSON ConfigurationFactory will look for
> log4j2-test.json or log4j2-test.jsn in the classpath.
> If no such file is found the XML ConfigurationFactory will look for
> log4j2-test.xml in the classpath.
> If a test file cannot be located the JSON ConfigurationFactory will look
> for log4j2.json or log4j2.jsn on the classpath.
> If a JSON file cannot be located the XML ConfigurationFactory will try to
> locate log4j2.xml on the classpath.
> If no configuration file could be located the DefaultConfiguration will
> be used. This will cause logging output to go to the console.
>
> Sadly you did not catch sense of my question. Point was - how much
> configuration *formats* you gonna place in core, when people will opt for
> scala configuration dsl, what will happen?
>
> Anyway, it’s up to you how you drive your library. You might not see need
> to split core, that’s fine for me. Just remind that creation of "god-like”
> thinks is bad practice in software development regardless if it’s class,
> package or module.
>
> Best regards,
> Łukasz Dywicki
> --
> luke@code-house.org <javascript:_e(%7B%7D,'cvml','luke@code-house.org');>
> Twitter: ldywicki
> Blog: http://dywicki.pl
> Code-House - http://code-house.org
>
> Wiadomość napisana przez Matt Sicker <boards@gmail.com<javascript:_e(%7B%7D,'cvml','boards@gmail.com');>>
> w dniu 13 kwi 2014, o godz. 18:27:
>
> XML is the default file format. You need to add the jackson libraries to
> get JSON and YAML support. If people like YAML more than JSON, they're
> using the same library, so it's perfectly alright!
>
> What would you mean by Groovy and Scala formats? You can already use
> Log4j2 with any JVM language, and you can write your own custom
> implementation of Configuration (though it's usually only done to support
> more file formats due to the need to represent a parsed configuration file).
>
> Really, the parts that I think make most sense for modularity are any
> packages that have optional dependencies. It's just that each optional
> dependency tends to correspond to about 3-5 java files, so it seems
> pointless to make entire JARs for each of those. I think that's the problem
> everyone else is seeing.
>
>
> On 13 April 2014 05:53, Łukasz Dywicki <lu...@code-house.org> wrote:
>
> Hey,
> Please find my replies inline. I do reply on all mails at the same time.
>
>
>
> I had a great idea inspired by Mark from Tomcat (forget his full name) in
> regards to splitting up core: we can set up a parallel repository that uses
> svn:external to organise the various packages into separate modules. Then
> separate pom.xml files can be written for these sub-modules. This might be
> a better route to go.
>
> I think you have spoken to Mark Thomas who did presentat few things. I
> also spoken to Christopher Schultz who had tomcat monitoring presentation
> and he is also tomcat commiter. He told me that Tomcat build is quite
> complicated and that’s reason why they did not switch to maven. No need to
> mention how big is build.xml for them. Main reason why their build is
> complicated and hard to get it done is big core.
>
> In Tomcat, they keep all their source code in one tree. However, their Ant
> build scripts build several JARs from that tree by pulling in various
> sub-directories. This is actually a big reason why they couldn't easily
> move to Maven (amongst other reasons I bet). It was suggested to make a
> parallel repository like I mentioned above.
>
> I don’t think that having source code in one tree is bad thing. Sometimes
> you will have different releases having exactelly same code producing
> unecessary traffic on maven repos and so on (we will let Sonatype pay for
> it ;-))). For most of people it does not make a big difference. But on
> Tomcat build example you can see a big technology debt. Multiple
> repositories are bringing some extra effort to releases too.
>
> Also, amusingly enough, Lucas, I've had quite a similar discussion here
> before. The main thing here is that nobody seems to think that core is
> large enough to be split. It's a different way of thinking about
> development when you move to OSGi.
>
> I can understand that. But you already see bunch of things which are
> sitting next to each other having not that much in common. You can also
> take a look on camel which is big project in apache having many
> dependencies. You might run it under tomcat and they have fine grained
> dependencies. I never seen anybody on their mailing lists considering that
> as mistake or wrong thing.
>
> Also, if you drop Log4j into a web container currently it will
> automatically initialize in a Servlet 3 container. I’ve always been a bit
> uncomfortable with that and it was originally in its own jar, but others
> preferred it the way it currently is.
>
> I do use log4j under tomcat as default logging backend also for container
> so in the container I just need slf4j bridge since all apps I have made are
> not dependant on logging backend. These times many libraries are already
> backed to slf4j so it is even easier to go.
>
> Wait, some one is going to want to split each configuration forma
>
>
>
--
Matt Sicker <bo...@gmail.com>
Re: Maven build improvements & osgi stuff
Posted by Łukasz Dywicki <lu...@code-house.org>.
Hey Matt,
I assumed JSON is default (or has higher priority than XML at least) based on documentation.
Log4j will inspect the "log4j.configurationFile" system property and, if set, will attempt to load the configuration using the ConfigurationFactory that matches the file extension.
If no system property is set the JSON ConfigurationFactory will look for log4j2-test.json or log4j2-test.jsn in the classpath.
If no such file is found the XML ConfigurationFactory will look for log4j2-test.xml in the classpath.
If a test file cannot be located the JSON ConfigurationFactory will look for log4j2.json or log4j2.jsn on the classpath.
If a JSON file cannot be located the XML ConfigurationFactory will try to locate log4j2.xml on the classpath.
If no configuration file could be located the DefaultConfiguration will be used. This will cause logging output to go to the console.
Sadly you did not catch sense of my question. Point was - how much configuration *formats* you gonna place in core, when people will opt for scala configuration dsl, what will happen?
Anyway, it’s up to you how you drive your library. You might not see need to split core, that’s fine for me. Just remind that creation of "god-like” thinks is bad practice in software development regardless if it’s class, package or module.
Best regards,
Łukasz Dywicki
--
luke@code-house.org
Twitter: ldywicki
Blog: http://dywicki.pl
Code-House - http://code-house.org
Wiadomość napisana przez Matt Sicker <bo...@gmail.com> w dniu 13 kwi 2014, o godz. 18:27:
> XML is the default file format. You need to add the jackson libraries to get JSON and YAML support. If people like YAML more than JSON, they're using the same library, so it's perfectly alright!
>
> What would you mean by Groovy and Scala formats? You can already use Log4j2 with any JVM language, and you can write your own custom implementation of Configuration (though it's usually only done to support more file formats due to the need to represent a parsed configuration file).
>
> Really, the parts that I think make most sense for modularity are any packages that have optional dependencies. It's just that each optional dependency tends to correspond to about 3-5 java files, so it seems pointless to make entire JARs for each of those. I think that's the problem everyone else is seeing.
>
>
> On 13 April 2014 05:53, Łukasz Dywicki <lu...@code-house.org> wrote:
> Hey,
> Please find my replies inline. I do reply on all mails at the same time.
>
>
>
>> I had a great idea inspired by Mark from Tomcat (forget his full name) in regards to splitting up core: we can set up a parallel repository that uses svn:external to organise the various packages into separate modules. Then separate pom.xml files can be written for these sub-modules. This might be a better route to go.
>
> I think you have spoken to Mark Thomas who did presentat few things. I also spoken to Christopher Schultz who had tomcat monitoring presentation and he is also tomcat commiter. He told me that Tomcat build is quite complicated and that’s reason why they did not switch to maven. No need to mention how big is build.xml for them. Main reason why their build is complicated and hard to get it done is big core.
>
>> In Tomcat, they keep all their source code in one tree. However, their Ant build scripts build several JARs from that tree by pulling in various sub-directories. This is actually a big reason why they couldn't easily move to Maven (amongst other reasons I bet). It was suggested to make a parallel repository like I mentioned above.
>
> I don’t think that having source code in one tree is bad thing. Sometimes you will have different releases having exactelly same code producing unecessary traffic on maven repos and so on (we will let Sonatype pay for it ;-))). For most of people it does not make a big difference. But on Tomcat build example you can see a big technology debt. Multiple repositories are bringing some extra effort to releases too.
>
>> Also, amusingly enough, Lucas, I've had quite a similar discussion here before. The main thing here is that nobody seems to think that core is large enough to be split. It's a different way of thinking about development when you move to OSGi.
>
> I can understand that. But you already see bunch of things which are sitting next to each other having not that much in common. You can also take a look on camel which is big project in apache having many dependencies. You might run it under tomcat and they have fine grained dependencies. I never seen anybody on their mailing lists considering that as mistake or wrong thing.
>
>> Also, if you drop Log4j into a web container currently it will automatically initialize in a Servlet 3 container. I’ve always been a bit uncomfortable with that and it was originally in its own jar, but others preferred it the way it currently is.
> I do use log4j under tomcat as default logging backend also for container so in the container I just need slf4j bridge since all apps I have made are not dependant on logging backend. These times many libraries are already backed to slf4j so it is even easier to go.
>
>>> Wait, some one is going to want to split each configuration format processing into it's own module to reduce dependencies.. ;) Jackson is used to parse JSON configuration files and JMX is currently defaulted to be always enabled.
> I don’t see this funny. How library is configured is one thing, how it is used is another. Especially during development programmers do not touch log4j configuration at all untill they have to apply log levels and so on (now with JMX it’s easier), however then it is configuration. In 2.x you assume JSON as default configuration, so it’s your choice but from my personal point of view it is unecessary as I rather preffer property file. Having jackson embedded in tomcat lib for people like me will just raise troubles as it’s popular library used by many developers.
>
> It’s worth to answer following question:
> - Will we put YAML/Groovy/Scala configuration format in core if donated?
> - What we gonna do if people will love YAML more than JSON?
>
> Kind regards,
> Łukasz Dywicki
> luke@code-house.org
> --
> Twitter: ldywicki
> Blog: http://dywicki.pl
> Code-House - http://code-house.org
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
Re: Maven build improvements & osgi stuff
Posted by Matt Sicker <bo...@gmail.com>.
XML is the default file format. You need to add the jackson libraries to
get JSON and YAML support. If people like YAML more than JSON, they're
using the same library, so it's perfectly alright!
What would you mean by Groovy and Scala formats? You can already use Log4j2
with any JVM language, and you can write your own custom implementation of
Configuration (though it's usually only done to support more file formats
due to the need to represent a parsed configuration file).
Really, the parts that I think make most sense for modularity are any
packages that have optional dependencies. It's just that each optional
dependency tends to correspond to about 3-5 java files, so it seems
pointless to make entire JARs for each of those. I think that's the problem
everyone else is seeing.
On 13 April 2014 05:53, Łukasz Dywicki <lu...@code-house.org> wrote:
> Hey,
> Please find my replies inline. I do reply on all mails at the same time.
>
>
>
> I had a great idea inspired by Mark from Tomcat (forget his full name) in
> regards to splitting up core: we can set up a parallel repository that uses
> svn:external to organise the various packages into separate modules. Then
> separate pom.xml files can be written for these sub-modules. This might be
> a better route to go.
>
> I think you have spoken to Mark Thomas who did presentat few things. I
> also spoken to Christopher Schultz who had tomcat monitoring presentation
> and he is also tomcat commiter. He told me that Tomcat build is quite
> complicated and that’s reason why they did not switch to maven. No need to
> mention how big is build.xml for them. Main reason why their build is
> complicated and hard to get it done is big core.
>
> In Tomcat, they keep all their source code in one tree. However, their Ant
> build scripts build several JARs from that tree by pulling in various
> sub-directories. This is actually a big reason why they couldn't easily
> move to Maven (amongst other reasons I bet). It was suggested to make a
> parallel repository like I mentioned above.
>
> I don’t think that having source code in one tree is bad thing. Sometimes
> you will have different releases having exactelly same code producing
> unecessary traffic on maven repos and so on (we will let Sonatype pay for
> it ;-))). For most of people it does not make a big difference. But on
> Tomcat build example you can see a big technology debt. Multiple
> repositories are bringing some extra effort to releases too.
>
> Also, amusingly enough, Lucas, I've had quite a similar discussion here
> before. The main thing here is that nobody seems to think that core is
> large enough to be split. It's a different way of thinking about
> development when you move to OSGi.
>
> I can understand that. But you already see bunch of things which are
> sitting next to each other having not that much in common. You can also
> take a look on camel which is big project in apache having many
> dependencies. You might run it under tomcat and they have fine grained
> dependencies. I never seen anybody on their mailing lists considering that
> as mistake or wrong thing.
>
> Also, if you drop Log4j into a web container currently it will
>> automatically initialize in a Servlet 3 container. I’ve always been a bit
>> uncomfortable with that and it was originally in its own jar, but others
>> preferred it the way it currently is.
>>
> I do use log4j under tomcat as default logging backend also for container
> so in the container I just need slf4j bridge since all apps I have made are
> not dependant on logging backend. These times many libraries are already
> backed to slf4j so it is even easier to go.
>
> Wait, some one is going to want to split each configuration format
>> processing into it's own module to reduce dependencies.. ;) Jackson is used
>> to parse JSON configuration files and JMX is currently defaulted to be
>> always enabled.
>>
>> I don’t see this funny. How library is configured is one thing, how it is
> used is another. Especially during development programmers do not touch
> log4j configuration at all untill they have to apply log levels and so on
> (now with JMX it’s easier), however then it is configuration. In 2.x you
> assume JSON as default configuration, so it’s your choice but from my
> personal point of view it is unecessary as I rather preffer property file.
> Having jackson embedded in tomcat lib for people like me will just raise
> troubles as it’s popular library used by many developers.
>
> It’s worth to answer following question:
> - Will we put YAML/Groovy/Scala configuration format in core if donated?
> - What we gonna do if people will love YAML more than JSON?
>
> Kind regards,
> Łukasz Dywicki
> luke@code-house.org
> --
> Twitter: ldywicki
> Blog: http://dywicki.pl
> Code-House - http://code-house.org
>
--
Matt Sicker <bo...@gmail.com>
Re: Maven build improvements & osgi stuff
Posted by Łukasz Dywicki <lu...@code-house.org>.
Hey,
Please find my replies inline. I do reply on all mails at the same time.
> I had a great idea inspired by Mark from Tomcat (forget his full name) in regards to splitting up core: we can set up a parallel repository that uses svn:external to organise the various packages into separate modules. Then separate pom.xml files can be written for these sub-modules. This might be a better route to go.
I think you have spoken to Mark Thomas who did presentat few things. I also spoken to Christopher Schultz who had tomcat monitoring presentation and he is also tomcat commiter. He told me that Tomcat build is quite complicated and that’s reason why they did not switch to maven. No need to mention how big is build.xml for them. Main reason why their build is complicated and hard to get it done is big core.
> In Tomcat, they keep all their source code in one tree. However, their Ant build scripts build several JARs from that tree by pulling in various sub-directories. This is actually a big reason why they couldn't easily move to Maven (amongst other reasons I bet). It was suggested to make a parallel repository like I mentioned above.
I don’t think that having source code in one tree is bad thing. Sometimes you will have different releases having exactelly same code producing unecessary traffic on maven repos and so on (we will let Sonatype pay for it ;-))). For most of people it does not make a big difference. But on Tomcat build example you can see a big technology debt. Multiple repositories are bringing some extra effort to releases too.
> Also, amusingly enough, Lucas, I've had quite a similar discussion here before. The main thing here is that nobody seems to think that core is large enough to be split. It's a different way of thinking about development when you move to OSGi.
I can understand that. But you already see bunch of things which are sitting next to each other having not that much in common. You can also take a look on camel which is big project in apache having many dependencies. You might run it under tomcat and they have fine grained dependencies. I never seen anybody on their mailing lists considering that as mistake or wrong thing.
> Also, if you drop Log4j into a web container currently it will automatically initialize in a Servlet 3 container. I’ve always been a bit uncomfortable with that and it was originally in its own jar, but others preferred it the way it currently is.
I do use log4j under tomcat as default logging backend also for container so in the container I just need slf4j bridge since all apps I have made are not dependant on logging backend. These times many libraries are already backed to slf4j so it is even easier to go.
>> Wait, some one is going to want to split each configuration format processing into it's own module to reduce dependencies.. ;) Jackson is used to parse JSON configuration files and JMX is currently defaulted to be always enabled.
I don’t see this funny. How library is configured is one thing, how it is used is another. Especially during development programmers do not touch log4j configuration at all untill they have to apply log levels and so on (now with JMX it’s easier), however then it is configuration. In 2.x you assume JSON as default configuration, so it’s your choice but from my personal point of view it is unecessary as I rather preffer property file. Having jackson embedded in tomcat lib for people like me will just raise troubles as it’s popular library used by many developers.
It’s worth to answer following question:
- Will we put YAML/Groovy/Scala configuration format in core if donated?
- What we gonna do if people will love YAML more than JSON?
Kind regards,
Łukasz Dywicki
luke@code-house.org
--
Twitter: ldywicki
Blog: http://dywicki.pl
Code-House - http://code-house.org
Re: Maven build improvements & osgi stuff
Posted by Matt Sicker <bo...@gmail.com>.
I had a great idea inspired by Mark from Tomcat (forget his full name) in
regards to splitting up core: we can set up a parallel repository that uses
svn:external to organise the various packages into separate modules. Then
separate pom.xml files can be written for these sub-modules. This might be
a better route to go.
In Tomcat, they keep all their source code in one tree. However, their Ant
build scripts build several JARs from that tree by pulling in various
sub-directories. This is actually a big reason why they couldn't easily
move to Maven (amongst other reasons I bet). It was suggested to make a
parallel repository like I mentioned above.
Also, amusingly enough, Lucas, I've had quite a similar discussion here
before. The main thing here is that nobody seems to think that core is
large enough to be split. It's a different way of thinking about
development when you move to OSGi.
On 12 April 2014 09:39, Ralph Goers <rg...@apache.org> wrote:
> Also, if you drop Log4j into a web container currently it will
> automatically initialize in a Servlet 3 container. I’ve always been a bit
> uncomfortable with that and it was originally in its own jar, but others
> preferred it the way it currently is.
>
> Ralph
>
> On Apr 12, 2014, at 7:20 AM, Ralph Goers <rg...@apache.org> wrote:
>
> Jackson is used to parse JSON configuration files and JMX is currently
> defaulted to be always enabled.
>
> Ralph
>
> On Apr 12, 2014, at 3:24 AM, Łukasz Dywicki <lu...@code-house.org> wrote:
>
> Ralph,
> For these who wants a "big” log4j you might provide aggregate JAR just
> like astyanax does. I think it’s much easier going this direction than
> other way around. Fine grained dependencies are proof of good library
> design. In slf4j epoch developers do not depend on any log4j code except
> test scope where mostly used is FileAppender. During deployment time it
> doesn’t make big difference too because only one place which would be
> affected is assembly. I can also imagine that some people could still love
> spring log4j stuff and will not need direct log4j support for it.
>
> I can understand that disruptor might be mandatory to provide asynchronous
> behaviour but why JMX and Jackson could not be separated?
>
> Best regards,
> Łukasz Dywicki
> --
> luke@code-house.org
> Twitter: ldywicki
> Blog: http://dywicki.pl
> Code-House - http://code-house.org
>
> Wiadomość napisana przez Ralph Goers <ra...@dslextreme.com> w dniu
> 12 kwi 2014, o godz. 06:26:
>
> There is a balance that needs to be struck here. We don’t want to add
> support for OSGi at the cost of forcing non-OSGi users to have to include a
> bunch of Log4j dependencies. That said, I suggest the other day that we
> might want to split some things that a majority of our users will rarely
> use into other modules, possible in a companion project to the Log4j kernel.
>
> We actually have a few dependencies, such as Jackson, the disruptor, and
> JMX that are optional but really can’t be separated from the core.
>
> That said, an analysis of what could be separated is warranted.
>
> Ralph
>
> On Apr 11, 2014, at 3:40 PM, Łukasz Dywicki <lu...@code-house.org> wrote:
>
> Hey all,
> Apachecon has been ended so I am following the promise I did - I’ve taken
> a look on the log4j build to check what’s going on with OSGi stuff.
> Currently OSGi bundles are split from main log4j-core which I think leads
> to maintanance trouble also number of dependencies of log4j-core seems to
> be very high. If we could split the log4j-core into smaller modules
> (mongodb, jms, jmx, web) then there will be no need to keep log4j-osgi and
> it’s submodules.
> According to maven guides [1] "Optional dependencies are used when it's
> not really possible (for whatever reason) to split a project up into
> sub-modules”, I think it will also make library design much more clear and
> will avoid making unecessary inner code deps. Seems that big, aggregate
> modules, are always grow to size which require major work to split them to
> make both: maintanance and community involvement possible.
>
> [1]
> https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
>
> Cheers,
> Łukasz Dywicki
> --
> luke@code-house.org
> Twitter: ldywicki
> Blog: http://dywicki.pl
> Code-House - http://code-house.org
>
>
>
>
>
--
Matt Sicker <bo...@gmail.com>
Re: Maven build improvements & osgi stuff
Posted by Ralph Goers <rg...@apache.org>.
Also, if you drop Log4j into a web container currently it will automatically initialize in a Servlet 3 container. I’ve always been a bit uncomfortable with that and it was originally in its own jar, but others preferred it the way it currently is.
Ralph
On Apr 12, 2014, at 7:20 AM, Ralph Goers <rg...@apache.org> wrote:
> Jackson is used to parse JSON configuration files and JMX is currently defaulted to be always enabled.
>
> Ralph
>
> On Apr 12, 2014, at 3:24 AM, Łukasz Dywicki <lu...@code-house.org> wrote:
>
>> Ralph,
>> For these who wants a "big” log4j you might provide aggregate JAR just like astyanax does. I think it’s much easier going this direction than other way around. Fine grained dependencies are proof of good library design. In slf4j epoch developers do not depend on any log4j code except test scope where mostly used is FileAppender. During deployment time it doesn’t make big difference too because only one place which would be affected is assembly. I can also imagine that some people could still love spring log4j stuff and will not need direct log4j support for it.
>>
>> I can understand that disruptor might be mandatory to provide asynchronous behaviour but why JMX and Jackson could not be separated?
>>
>> Best regards,
>> Łukasz Dywicki
>> --
>> luke@code-house.org
>> Twitter: ldywicki
>> Blog: http://dywicki.pl
>> Code-House - http://code-house.org
>>
>> Wiadomość napisana przez Ralph Goers <ra...@dslextreme.com> w dniu 12 kwi 2014, o godz. 06:26:
>>
>>> There is a balance that needs to be struck here. We don’t want to add support for OSGi at the cost of forcing non-OSGi users to have to include a bunch of Log4j dependencies. That said, I suggest the other day that we might want to split some things that a majority of our users will rarely use into other modules, possible in a companion project to the Log4j kernel.
>>>
>>> We actually have a few dependencies, such as Jackson, the disruptor, and JMX that are optional but really can’t be separated from the core.
>>>
>>> That said, an analysis of what could be separated is warranted.
>>>
>>> Ralph
>>>
>>> On Apr 11, 2014, at 3:40 PM, Łukasz Dywicki <lu...@code-house.org> wrote:
>>>
>>>> Hey all,
>>>> Apachecon has been ended so I am following the promise I did - I’ve taken a look on the log4j build to check what’s going on with OSGi stuff. Currently OSGi bundles are split from main log4j-core which I think leads to maintanance trouble also number of dependencies of log4j-core seems to be very high. If we could split the log4j-core into smaller modules (mongodb, jms, jmx, web) then there will be no need to keep log4j-osgi and it’s submodules.
>>>> According to maven guides [1] "Optional dependencies are used when it's not really possible (for whatever reason) to split a project up into sub-modules”, I think it will also make library design much more clear and will avoid making unecessary inner code deps. Seems that big, aggregate modules, are always grow to size which require major work to split them to make both: maintanance and community involvement possible.
>>>>
>>>> [1] https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
>>>>
>>>> Cheers,
>>>> Łukasz Dywicki
>>>> --
>>>> luke@code-house.org
>>>> Twitter: ldywicki
>>>> Blog: http://dywicki.pl
>>>> Code-House - http://code-house.org
>>>>
>>>
>>
Re: Maven build improvements & osgi stuff
Posted by Gary Gregory <ga...@gmail.com>.
On Sat, Apr 12, 2014 at 10:20 AM, Ralph Goers <rg...@apache.org> wrote:
> Jackson is used to parse JSON configuration files and JMX is currently
> defaulted to be always enabled.
>
Wait, some one is going to want to split each configuration format
processing into it's own module to reduce dependencies.. ;)
G
>
> Ralph
>
> On Apr 12, 2014, at 3:24 AM, Łukasz Dywicki <lu...@code-house.org> wrote:
>
> Ralph,
> For these who wants a "big” log4j you might provide aggregate JAR just
> like astyanax does. I think it’s much easier going this direction than
> other way around. Fine grained dependencies are proof of good library
> design. In slf4j epoch developers do not depend on any log4j code except
> test scope where mostly used is FileAppender. During deployment time it
> doesn’t make big difference too because only one place which would be
> affected is assembly. I can also imagine that some people could still love
> spring log4j stuff and will not need direct log4j support for it.
>
> I can understand that disruptor might be mandatory to provide asynchronous
> behaviour but why JMX and Jackson could not be separated?
>
> Best regards,
> Łukasz Dywicki
> --
> luke@code-house.org
> Twitter: ldywicki
> Blog: http://dywicki.pl
> Code-House - http://code-house.org
>
> Wiadomość napisana przez Ralph Goers <ra...@dslextreme.com> w dniu
> 12 kwi 2014, o godz. 06:26:
>
> There is a balance that needs to be struck here. We don’t want to add
> support for OSGi at the cost of forcing non-OSGi users to have to include a
> bunch of Log4j dependencies. That said, I suggest the other day that we
> might want to split some things that a majority of our users will rarely
> use into other modules, possible in a companion project to the Log4j kernel.
>
> We actually have a few dependencies, such as Jackson, the disruptor, and
> JMX that are optional but really can’t be separated from the core.
>
> That said, an analysis of what could be separated is warranted.
>
> Ralph
>
> On Apr 11, 2014, at 3:40 PM, Łukasz Dywicki <lu...@code-house.org> wrote:
>
> Hey all,
> Apachecon has been ended so I am following the promise I did - I’ve taken
> a look on the log4j build to check what’s going on with OSGi stuff.
> Currently OSGi bundles are split from main log4j-core which I think leads
> to maintanance trouble also number of dependencies of log4j-core seems to
> be very high. If we could split the log4j-core into smaller modules
> (mongodb, jms, jmx, web) then there will be no need to keep log4j-osgi and
> it’s submodules.
> According to maven guides [1] "Optional dependencies are used when it's
> not really possible (for whatever reason) to split a project up into
> sub-modules”, I think it will also make library design much more clear and
> will avoid making unecessary inner code deps. Seems that big, aggregate
> modules, are always grow to size which require major work to split them to
> make both: maintanance and community involvement possible.
>
> [1]
> https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
>
> Cheers,
> Łukasz Dywicki
> --
> luke@code-house.org
> Twitter: ldywicki
> Blog: http://dywicki.pl
> Code-House - http://code-house.org
>
>
>
>
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Re: Maven build improvements & osgi stuff
Posted by Ralph Goers <rg...@apache.org>.
Jackson is used to parse JSON configuration files and JMX is currently defaulted to be always enabled.
Ralph
> On Apr 12, 2014, at 3:24 AM, Łukasz Dywicki <lu...@code-house.org> wrote:
>
> Ralph,
> For these who wants a "big” log4j you might provide aggregate JAR just like astyanax does. I think it’s much easier going this direction than other way around. Fine grained dependencies are proof of good library design. In slf4j epoch developers do not depend on any log4j code except test scope where mostly used is FileAppender. During deployment time it doesn’t make big difference too because only one place which would be affected is assembly. I can also imagine that some people could still love spring log4j stuff and will not need direct log4j support for it.
>
> I can understand that disruptor might be mandatory to provide asynchronous behaviour but why JMX and Jackson could not be separated?
>
> Best regards,
> Łukasz Dywicki
> --
> luke@code-house.org
> Twitter: ldywicki
> Blog: http://dywicki.pl
> Code-House - http://code-house.org
>
>> Wiadomość napisana przez Ralph Goers <ra...@dslextreme.com> w dniu 12 kwi 2014, o godz. 06:26:
>>
>> There is a balance that needs to be struck here. We don’t want to add support for OSGi at the cost of forcing non-OSGi users to have to include a bunch of Log4j dependencies. That said, I suggest the other day that we might want to split some things that a majority of our users will rarely use into other modules, possible in a companion project to the Log4j kernel.
>>
>> We actually have a few dependencies, such as Jackson, the disruptor, and JMX that are optional but really can’t be separated from the core.
>>
>> That said, an analysis of what could be separated is warranted.
>>
>> Ralph
>>
>>> On Apr 11, 2014, at 3:40 PM, Łukasz Dywicki <lu...@code-house.org> wrote:
>>>
>>> Hey all,
>>> Apachecon has been ended so I am following the promise I did - I’ve taken a look on the log4j build to check what’s going on with OSGi stuff. Currently OSGi bundles are split from main log4j-core which I think leads to maintanance trouble also number of dependencies of log4j-core seems to be very high. If we could split the log4j-core into smaller modules (mongodb, jms, jmx, web) then there will be no need to keep log4j-osgi and it’s submodules.
>>> According to maven guides [1] "Optional dependencies are used when it's not really possible (for whatever reason) to split a project up into sub-modules”, I think it will also make library design much more clear and will avoid making unecessary inner code deps. Seems that big, aggregate modules, are always grow to size which require major work to split them to make both: maintanance and community involvement possible.
>>>
>>> [1] https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
>>>
>>> Cheers,
>>> Łukasz Dywicki
>>> --
>>> luke@code-house.org
>>> Twitter: ldywicki
>>> Blog: http://dywicki.pl
>>> Code-House - http://code-house.org
>
Re: Maven build improvements & osgi stuff
Posted by Łukasz Dywicki <lu...@code-house.org>.
Ralph,
For these who wants a "big” log4j you might provide aggregate JAR just like astyanax does. I think it’s much easier going this direction than other way around. Fine grained dependencies are proof of good library design. In slf4j epoch developers do not depend on any log4j code except test scope where mostly used is FileAppender. During deployment time it doesn’t make big difference too because only one place which would be affected is assembly. I can also imagine that some people could still love spring log4j stuff and will not need direct log4j support for it.
I can understand that disruptor might be mandatory to provide asynchronous behaviour but why JMX and Jackson could not be separated?
Best regards,
Łukasz Dywicki
--
luke@code-house.org
Twitter: ldywicki
Blog: http://dywicki.pl
Code-House - http://code-house.org
Wiadomość napisana przez Ralph Goers <ra...@dslextreme.com> w dniu 12 kwi 2014, o godz. 06:26:
> There is a balance that needs to be struck here. We don’t want to add support for OSGi at the cost of forcing non-OSGi users to have to include a bunch of Log4j dependencies. That said, I suggest the other day that we might want to split some things that a majority of our users will rarely use into other modules, possible in a companion project to the Log4j kernel.
>
> We actually have a few dependencies, such as Jackson, the disruptor, and JMX that are optional but really can’t be separated from the core.
>
> That said, an analysis of what could be separated is warranted.
>
> Ralph
>
> On Apr 11, 2014, at 3:40 PM, Łukasz Dywicki <lu...@code-house.org> wrote:
>
>> Hey all,
>> Apachecon has been ended so I am following the promise I did - I’ve taken a look on the log4j build to check what’s going on with OSGi stuff. Currently OSGi bundles are split from main log4j-core which I think leads to maintanance trouble also number of dependencies of log4j-core seems to be very high. If we could split the log4j-core into smaller modules (mongodb, jms, jmx, web) then there will be no need to keep log4j-osgi and it’s submodules.
>> According to maven guides [1] "Optional dependencies are used when it's not really possible (for whatever reason) to split a project up into sub-modules”, I think it will also make library design much more clear and will avoid making unecessary inner code deps. Seems that big, aggregate modules, are always grow to size which require major work to split them to make both: maintanance and community involvement possible.
>>
>> [1] https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
>>
>> Cheers,
>> Łukasz Dywicki
>> --
>> luke@code-house.org
>> Twitter: ldywicki
>> Blog: http://dywicki.pl
>> Code-House - http://code-house.org
>>
>
Re: Maven build improvements & osgi stuff
Posted by Ralph Goers <ra...@dslextreme.com>.
There is a balance that needs to be struck here. We don’t want to add support for OSGi at the cost of forcing non-OSGi users to have to include a bunch of Log4j dependencies. That said, I suggest the other day that we might want to split some things that a majority of our users will rarely use into other modules, possible in a companion project to the Log4j kernel.
We actually have a few dependencies, such as Jackson, the disruptor, and JMX that are optional but really can’t be separated from the core.
That said, an analysis of what could be separated is warranted.
Ralph
On Apr 11, 2014, at 3:40 PM, Łukasz Dywicki <lu...@code-house.org> wrote:
> Hey all,
> Apachecon has been ended so I am following the promise I did - I’ve taken a look on the log4j build to check what’s going on with OSGi stuff. Currently OSGi bundles are split from main log4j-core which I think leads to maintanance trouble also number of dependencies of log4j-core seems to be very high. If we could split the log4j-core into smaller modules (mongodb, jms, jmx, web) then there will be no need to keep log4j-osgi and it’s submodules.
> According to maven guides [1] "Optional dependencies are used when it's not really possible (for whatever reason) to split a project up into sub-modules”, I think it will also make library design much more clear and will avoid making unecessary inner code deps. Seems that big, aggregate modules, are always grow to size which require major work to split them to make both: maintanance and community involvement possible.
>
> [1] https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
>
> Cheers,
> Łukasz Dywicki
> --
> luke@code-house.org
> Twitter: ldywicki
> Blog: http://dywicki.pl
> Code-House - http://code-house.org
>