You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Antonio Petrelli <an...@gmail.com> on 2010/07/01 09:53:03 UTC

Re: [Engine-2.0] Delete allo log classes?

2010/6/30 Nathan Bubna <nb...@gmail.com>:
> On Wed, Jun 30, 2010 at 7:40 AM, Antonio Petrelli
> <an...@gmail.com> wrote:
>> 2010/6/30 Nathan Bubna <nb...@gmail.com>:
>>> So, if i wanted to use the servlet log, i would have to download and
>>> use both a velocity-engine jar and a velocity-engine-servlet jar?
>>
>> Yes. Or declare a dependency to velocity-log-servlet (I would like to
>> name it this way) and velocity-engine will come as a transitive
>> dependency.
>
> we have plenty of non-Maven users.  so, naming it that way is making
> an assumption that i would not recommend making.

Ok velocity-engine-servlet, however see below.

>> Absolutely yes, optional dependencies are far more confusing than small modules.
>> Take a look at how Tiles 2.2.2 is now, little modules with few
>> classes, like tiles-servlet-wildcard, just to be sure to include
>> Spring only when needed.
>
> more confusing to Maven users, perhaps.  but there are many who do not
> use Maven, for whom i think the confusion would run the other way.

Again, for non-Maven users, there will be an uberjar.

>>> optional packages?  so *can* Maven acknowledge that a dependency is
>>> required for compilation but optional at runtime?  i've been operating
>>> under the (mis)conception that it could not.
>>
>> Yes it can, by adding <optional>true</optional>.
>> It must not confused with <scope>provided</scope> that means that a
>> package is needed when compiling, but it is "provided" by an external
>> source, e.g. servlet.jar in a servlet container, so it must be
>> present, but outside of the package itself.
>> The "provided" scope is clearer with WARs: if the scope is "compile"
>> or "runtime", the package is included in WEB-INF/lib, if it is
>> provided, it is not (not sure about optional packages though).
>
> yeah, i knew about "provided", but that would probably only apply to
> the servlet api dependency.  it would not have been an appropriate
> designation for our log4j dependency.  it is the "optional"
> designation that i was looking for.

"optional" does not indicate, in a clear way, if your package will
work or not. This usually means that you discover that you need an
extra dependency only at runtime. This also means that you need a
clear documentation about it, thus you will receive some emails about
it that you will easily avoid using non optional dependencies.

>
>>>  what sort of transitive dependency troubles does it cause?
>>
>> If your project has optional packages, they must be included
>> explicitly in projects that depend on it if you want to use them. The
>> same for "provided" packages.
>
> that sounds perfect.  how is it a trouble to require that users
> explicitly declare optional things they wish to use?

Because it is not "required" to do, you must discover it from Velocity's pom.

>  that is no different than non-Maven users being
> required to add a jar for optional things they wish to use.

Uberjar, again.

Anyway, if you like to see one package with everything inside and
optional dependencies, I won't object much. I tried in any way to
describe the usefulness of the small package approach and the uberjar
to collect packages in one jar if needed. Do we need to vote about it?
(I know I will lose, who cares).

Antonio

P.S. Velocity Tools will follow the same path of splitting in several
subpackages (at least "general", "struts" and "pure servlet"), but in
this case the classes are more than just one. I hope to be more
convincing next time.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


Re: [Engine-2.0] Delete allo log classes?

Posted by Antonio Petrelli <an...@gmail.com>.
2010/7/2 Nathan Bubna <nb...@gmail.com>:
> Sorry for making so much useless work for you, Antonio.  I made a
> mistake.  Please forgive me.

Absolutely no problem, in fact I learnt something from this discussion
too, probably sometimes I am too keen on Maven to be objective :-)

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


Re: [Engine-2.0] Delete allo log classes?

Posted by "Marinó A. Jónsson" <ma...@centrum.is>.
On 07/01/2010 10:22 PM, Nathan Bubna wrote:
> 2010/7/1 "Marinó A. Jónsson"<ma...@centrum.is>:
>    
>> Just noticed you're going ahead with the change from velocity-log-{lib} to
>> velocity-engine-{lib} - I believe, seeing as the uberjar will be packaged
>> for ant users, that the original naming of velocity-log-{lib} actually makes
>> more sense to us maven users :)
>>      
> Really?  Well, not being much of a maven user, it would be unwise of
> me not to trust you two.  And really, my complaint about the name was
> for non-Maven newbies, and now that we've agreed to always provide the
> uber jar, i think that means my complaint no longer stands.  Yikes.
> Sorry for making so much useless work for you, Antonio.  I made a
> mistake.  Please forgive me.
>    
yup - as a maven user you usually just declare the little modules you're 
interested in as dependencies and can rest assured that the "core" 
dependencies will automatically show up - no need to try and embed the 
transient dependencies in the names of the little modules :) ... of 
course this renders a tool like m2eclipse or IAM for analyzing your 
dependencies pretty critical :)
>    
>> Btw. Antonio great to have you on board!  I think this mavenization of the
>> project is long overdue :)
>>      
> it may not seem like it amidst my nitpicks, but i am also glad to see this.
>
>    
>> cheers,
>> Marinó
>>
>>
>> On 07/01/2010 02:04 PM, Antonio Petrelli wrote:
>>      
>>> 2010/7/1 Nathan Bubna<nb...@gmail.com>:
>>>
>>>        
>>>> On Thu, Jul 1, 2010 at 12:53 AM, Antonio Petrelli
>>>> <an...@gmail.com>    wrote:
>>>>
>>>>          
>>>>> 2010/6/30 Nathan Bubna<nb...@gmail.com>:
>>>>>
>>>>>            
>>>>>> On Wed, Jun 30, 2010 at 7:40 AM, Antonio Petrelli
>>>>>> <an...@gmail.com>    wrote:
>>>>>>   that is no different than non-Maven users being
>>>>>> required to add a jar for optional things they wish to use.
>>>>>>
>>>>>>              
>>>>> Uberjar, again.
>>>>>
>>>>>            
>>>> as long as there is this, i'll leave off on nagging you. :)
>>>>
>>>>          
>>> So we've found a trade-off then, small modules plus an uberjar, and we
>>> flamed for nothing :-D
>>>
>>> Thanks
>>> Antonio
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
>>> For additional commands, e-mail: dev-help@velocity.apache.org
>>>
>>>
>>>        
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
>> For additional commands, e-mail: dev-help@velocity.apache.org
>>
>>
>>      
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
> For additional commands, e-mail: dev-help@velocity.apache.org
>
>    


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


Re: [Engine-2.0] Delete allo log classes?

Posted by Nathan Bubna <nb...@gmail.com>.
2010/7/1 "Marinó A. Jónsson" <ma...@centrum.is>:
> Just noticed you're going ahead with the change from velocity-log-{lib} to
> velocity-engine-{lib} - I believe, seeing as the uberjar will be packaged
> for ant users, that the original naming of velocity-log-{lib} actually makes
> more sense to us maven users :)

Really?  Well, not being much of a maven user, it would be unwise of
me not to trust you two.  And really, my complaint about the name was
for non-Maven newbies, and now that we've agreed to always provide the
uber jar, i think that means my complaint no longer stands.  Yikes.
Sorry for making so much useless work for you, Antonio.  I made a
mistake.  Please forgive me.

> Btw. Antonio great to have you on board!  I think this mavenization of the
> project is long overdue :)

it may not seem like it amidst my nitpicks, but i am also glad to see this.

> cheers,
> Marinó
>
>
> On 07/01/2010 02:04 PM, Antonio Petrelli wrote:
>>
>> 2010/7/1 Nathan Bubna<nb...@gmail.com>:
>>
>>>
>>> On Thu, Jul 1, 2010 at 12:53 AM, Antonio Petrelli
>>> <an...@gmail.com>  wrote:
>>>
>>>>
>>>> 2010/6/30 Nathan Bubna<nb...@gmail.com>:
>>>>
>>>>>
>>>>> On Wed, Jun 30, 2010 at 7:40 AM, Antonio Petrelli
>>>>> <an...@gmail.com>  wrote:
>>>>>  that is no different than non-Maven users being
>>>>> required to add a jar for optional things they wish to use.
>>>>>
>>>>
>>>> Uberjar, again.
>>>>
>>>
>>> as long as there is this, i'll leave off on nagging you. :)
>>>
>>
>> So we've found a trade-off then, small modules plus an uberjar, and we
>> flamed for nothing :-D
>>
>> Thanks
>> Antonio
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
>> For additional commands, e-mail: dev-help@velocity.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
> For additional commands, e-mail: dev-help@velocity.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


Re: [Engine-2.0] Delete allo log classes?

Posted by "Marinó A. Jónsson" <ma...@centrum.is>.
Just noticed you're going ahead with the change from velocity-log-{lib} 
to velocity-engine-{lib} - I believe, seeing as the uberjar will be 
packaged for ant users, that the original naming of velocity-log-{lib} 
actually makes more sense to us maven users :)

Btw. Antonio great to have you on board!  I think this mavenization of 
the project is long overdue :)

cheers,
Marinó


On 07/01/2010 02:04 PM, Antonio Petrelli wrote:
> 2010/7/1 Nathan Bubna<nb...@gmail.com>:
>    
>> On Thu, Jul 1, 2010 at 12:53 AM, Antonio Petrelli
>> <an...@gmail.com>  wrote:
>>      
>>> 2010/6/30 Nathan Bubna<nb...@gmail.com>:
>>>        
>>>> On Wed, Jun 30, 2010 at 7:40 AM, Antonio Petrelli
>>>> <an...@gmail.com>  wrote:
>>>>   that is no different than non-Maven users being
>>>> required to add a jar for optional things they wish to use.
>>>>          
>>> Uberjar, again.
>>>        
>> as long as there is this, i'll leave off on nagging you. :)
>>      
> So we've found a trade-off then, small modules plus an uberjar, and we
> flamed for nothing :-D
>
> Thanks
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
> For additional commands, e-mail: dev-help@velocity.apache.org
>
>    


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


Re: [Engine-2.0] Delete allo log classes?

Posted by Nathan Bubna <nb...@gmail.com>.
On Thu, Jul 1, 2010 at 7:04 AM, Antonio Petrelli
<an...@gmail.com> wrote:
> 2010/7/1 Nathan Bubna <nb...@gmail.com>:
>> On Thu, Jul 1, 2010 at 12:53 AM, Antonio Petrelli
>> <an...@gmail.com> wrote:
>>> 2010/6/30 Nathan Bubna <nb...@gmail.com>:
>>>> On Wed, Jun 30, 2010 at 7:40 AM, Antonio Petrelli
>>>> <an...@gmail.com> wrote:
>>>>  that is no different than non-Maven users being
>>>> required to add a jar for optional things they wish to use.
>>>
>>> Uberjar, again.
>>
>> as long as there is this, i'll leave off on nagging you. :)
>
> So we've found a trade-off then, small modules plus an uberjar, and we
> flamed for nothing :-D

not at all.  i, at least, learned from the discussion.

> Thanks
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
> For additional commands, e-mail: dev-help@velocity.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


Re: [Engine-2.0] Delete allo log classes?

Posted by Antonio Petrelli <an...@gmail.com>.
2010/7/1 Nathan Bubna <nb...@gmail.com>:
> On Thu, Jul 1, 2010 at 12:53 AM, Antonio Petrelli
> <an...@gmail.com> wrote:
>> 2010/6/30 Nathan Bubna <nb...@gmail.com>:
>>> On Wed, Jun 30, 2010 at 7:40 AM, Antonio Petrelli
>>> <an...@gmail.com> wrote:
>>>  that is no different than non-Maven users being
>>> required to add a jar for optional things they wish to use.
>>
>> Uberjar, again.
>
> as long as there is this, i'll leave off on nagging you. :)

So we've found a trade-off then, small modules plus an uberjar, and we
flamed for nothing :-D

Thanks
Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


Re: [Engine-2.0] Delete allo log classes?

Posted by Nathan Bubna <nb...@gmail.com>.
On Thu, Jul 1, 2010 at 12:53 AM, Antonio Petrelli
<an...@gmail.com> wrote:
> 2010/6/30 Nathan Bubna <nb...@gmail.com>:
>> On Wed, Jun 30, 2010 at 7:40 AM, Antonio Petrelli
>> <an...@gmail.com> wrote:
>>> 2010/6/30 Nathan Bubna <nb...@gmail.com>:
>>>> So, if i wanted to use the servlet log, i would have to download and
>>>> use both a velocity-engine jar and a velocity-engine-servlet jar?
>>>
>>> Yes. Or declare a dependency to velocity-log-servlet (I would like to
>>> name it this way) and velocity-engine will come as a transitive
>>> dependency.
>>
>> we have plenty of non-Maven users.  so, naming it that way is making
>> an assumption that i would not recommend making.
>
> Ok velocity-engine-servlet, however see below.
>
>>> Absolutely yes, optional dependencies are far more confusing than small modules.
>>> Take a look at how Tiles 2.2.2 is now, little modules with few
>>> classes, like tiles-servlet-wildcard, just to be sure to include
>>> Spring only when needed.
>>
>> more confusing to Maven users, perhaps.  but there are many who do not
>> use Maven, for whom i think the confusion would run the other way.
>
> Again, for non-Maven users, there will be an uberjar.

thank you.  :)

>>>> optional packages?  so *can* Maven acknowledge that a dependency is
>>>> required for compilation but optional at runtime?  i've been operating
>>>> under the (mis)conception that it could not.
>>>
>>> Yes it can, by adding <optional>true</optional>.
>>> It must not confused with <scope>provided</scope> that means that a
>>> package is needed when compiling, but it is "provided" by an external
>>> source, e.g. servlet.jar in a servlet container, so it must be
>>> present, but outside of the package itself.
>>> The "provided" scope is clearer with WARs: if the scope is "compile"
>>> or "runtime", the package is included in WEB-INF/lib, if it is
>>> provided, it is not (not sure about optional packages though).
>>
>> yeah, i knew about "provided", but that would probably only apply to
>> the servlet api dependency.  it would not have been an appropriate
>> designation for our log4j dependency.  it is the "optional"
>> designation that i was looking for.
>
> "optional" does not indicate, in a clear way, if your package will
> work or not. This usually means that you discover that you need an
> extra dependency only at runtime. This also means that you need a
> clear documentation about it, thus you will receive some emails about
> it that you will easily avoid using non optional dependencies.

yes, this is already the way things are.  and we actually don't
receive many emails about it.  most users are quite able to figure out
which extra dependency they wish to add from the documentation alone.

>>>>  what sort of transitive dependency troubles does it cause?
>>>
>>> If your project has optional packages, they must be included
>>> explicitly in projects that depend on it if you want to use them. The
>>> same for "provided" packages.
>>
>> that sounds perfect.  how is it a trouble to require that users
>> explicitly declare optional things they wish to use?
>
> Because it is not "required" to do, you must discover it from Velocity's pom.

preferably from the documentation.

>>  that is no different than non-Maven users being
>> required to add a jar for optional things they wish to use.
>
> Uberjar, again.

as long as there is this, i'll leave off on nagging you. :)

> Anyway, if you like to see one package with everything inside and
> optional dependencies, I won't object much. I tried in any way to
> describe the usefulness of the small package approach and the uberjar
> to collect packages in one jar if needed. Do we need to vote about it?
> (I know I will lose, who cares).

no, i won't object to having the small packages available, as long as
there is an uber jar still.

> Antonio
>
> P.S. Velocity Tools will follow the same path of splitting in several
> subpackages (at least "general", "struts" and "pure servlet"), but in
> this case the classes are more than just one. I hope to be more
> convincing next time.

no worries, VelocityTools definitely has three sub-projects.  though
we will again want an uber jar as well.

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
> For additional commands, e-mail: dev-help@velocity.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org