HubSpot / jinjava

Jinja template engine for Java
Apache License 2.0
704 stars 169 forks source link

Too many dependencies? #50

Open hrstoyanov opened 8 years ago

hrstoyanov commented 8 years ago

Here are the dependency 2.1.7 inflicts on your project: +--- com.hubspot.jinjava:jinjava:2.1.7 | +--- org.slf4j:slf4j-api:1.7.12 | +--- org.javassist:javassist:3.18.2-GA | +--- org.jsoup:jsoup:1.8.1 | +--- de.odysseus.juel:juel-api:2.2.7 | +--- de.odysseus.juel:juel-impl:2.2.7 | +--- de.odysseus.juel:juel-spi:2.2.7 | +--- org.apache.commons:commons-lang3:3.4 | --- com.google.code.findbugs:annotations:3.0.0

That is a bit too much! Especially problematic are the findbugs "shutup" annotation, but are these jars all that necessary? The most I can put up with is Guava dependence, if at all... Can you try to make it a "single jar" beauty like the freemarker or jsoup projects?

... Staying away from jinjava for now, given no compelling benefits over freemarker for email templates (Unless you can point some?) and all the extra baggage.

PS: I use ansible a lot and I am well aware of jinja2's power.

boulter commented 8 years ago

@hrstoyanov are you concerned with the size of the dependencies or keeping track of them? Are you looking for a single fat jar instead using maven to manage them? Thanks.

hrstoyanov commented 8 years ago

Yeah, take a look at jsoup or aftermarket for inspiration.

/Hristo Stoyanov On Apr 26, 2016 10:49 AM, "Jeff Boulter" notifications@github.com wrote:

@hrstoyanov https://github.com/hrstoyanov are you concerned with the size of the dependencies or keeping track of them? Are you looking for a single fat jar instead using maven to manage them? Thanks.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/HubSpot/jinjava/issues/50#issuecomment-214825954

leonmax commented 7 years ago

It also conflicts with guava 18.0 and above. emptyIterator() in Guava has become a private method, which causes NoMethodFoundException when rendering a template with Map or List structure. There will be no such a problem if you shade the dependency when making a fat jar

magdel commented 1 month ago

It's older issue but guava dependency is really terrible. Why not to make the library less requiring (and breaking existing dependencies in project where is used). Shadow is good option.