The maven dox are clear about its adherence to "convention over configuration", which is the very thing I found compelling after my own bout of grumbling over its noncompliance with *my* conventions (src/main/java indeed when src should be enough, sez' I). That said, it provide way to override almost anything, although that's usually painful enough that its best avoided. <div>
<br></div><div>Think of it this way. For the problems I work on, JDOM is a very small tree in a very large forest of jars that must work together. I need it to fit in to that forest and "just work" without having to think about your reasons for wanting (or needing) your own set of conventions. Regardless of its (many) flaws, maven projects generally more or less deliver on that promise. Outlier conventions create problems for me and I avoid packages that create problems.<br>
<br><div class="gmail_quote">On Fri, May 18, 2012 at 1:30 PM, Rolf Lear <span dir="ltr"><<a href="mailto:jdom@tuis.net" target="_blank">jdom@tuis.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
So, a general comment, and four questions....<br>
<br>
The inability of maven to accommodate the flexibility of 'real life'<br>
development in an automated way is not the fault of JDOM. The very fact<br>
that I have spent so much time already 'dealing' with maven indicates that<br>
it has something fundamentally wrong with its design/model. I get the<br>
impression that Maven developers expect the world to conform to them,<br>
rather than tolerating the heterogeneous we live in. It is "everyone else's<br>
fault" if things don't work the maven way.....<br>
<br>
1. you say that the artifact does not need to be the same as the 'base<br>
name' of the jar, yet everything i have read suggests it does need to be<br>
the same: <a href="http://maven.apache.org/maven-conventions.html" target="_blank">http://maven.apache.org/maven-conventions.html</a> Further, while I<br>
have no record of it, I recall that when I tried to upload maven bundles to<br>
sonatype, the jar name has to be of the specific form<br>
<artifact>-<version>-<subcomp>.jar, If your artifact is abc123 and the<br>
version is 1.2.3 then it expects abc123-1.2.3.jar,<br>
abc123-1.2.3-sources.jar, abc123-1.2.3-javadocs.jar, etc. When I get home I<br>
can try something different to double-check, but i am pretty certain.... If<br>
maven were actually 'easy' to work with, there should be an easy way for<br>
anyone to actually try that.... is there a way?<br>
<br>
2. If it is possible to load jdom-2.0.2.jar in to the jdom2 artifact, I<br>
will consider it... but what about people who are already pulling 2.0.0 and<br>
2.0.1 from the jdom artifact? How will they know to 'move' if their<br>
dependencies are not going to move with the artifact....? If I can keep the<br>
jdom-2.0.x.jar, I would also consider deploying to *both* jdom2 and jdom<br>
artifacts....<br>
<br>
3. How do I 'notify' the 30k people a month using 1.1 that they should<br>
upgrade/change their artifact to jdom2?<br>
<br>
4. Maven provides no way to 'test' something... (at least not with the<br>
simple 'bundle' upload). How do I do a 'dry run'? I have already got the<br>
JDOM beta's in the jdom2 artifact because I needed to get some 'practice'<br>
in.....<br>
<br>
Frankly, I would rather be spending my time building 'fun' things than<br>
untangling this mess....<br>
<br>
Rolf<br>
<br>
On Fri, 18 May 2012 11:24:11 -0400, Gary Gregory <<a href="mailto:garydgregory@gmail.com">garydgregory@gmail.com</a>><br>
wrote:<br>
<div><div class="h5">> Hi Rolf,<br>
><br>
> Thank you for detailed reply. Let me address several points below. I'll<br>
> probably ramble on too... :)<br>
><br>
> On Fri, May 18, 2012 at 10:27 AM, Rolf Lear <<a href="mailto:jdom@tuis.net">jdom@tuis.net</a>> wrote:<br>
><br>
>><br>
>> Where were you for this discussion:<br>
>><br>
>><br>
<a href="http://markmail.org/message/yjojwj26bwrxj5nx#query:+page:1+mid:buwh5fismpdahuoi+state:results" target="_blank">http://markmail.org/message/yjojwj26bwrxj5nx#query:+page:1+mid:buwh5fismpdahuoi+state:results</a><br>
>><br>
>> ;-)<br>
>><br>
>> So, the problem is as follows.... Maven imposes naming requirements for<br>
>> artifacts.<br>
>><br>
><br>
> The problem is not that Maven has to give things names, the issue, IMO,<br>
is<br>
> how does *any* automated build system deal with using multiple versions<br>
of<br>
> the same component.<br>
><br>
> By 'build system' here, I am not talking about just compiling and jaring<br>
at<br>
> the Ant level, I am talking about continuous integration, automatically<br>
> dealing with pulling down project dependencies (I use Ant + Ivy at work<br>
and<br>
> Maven at Apache.) and publishing the build results up the food chain (I<br>
use<br>
> Ant + Ivy + Bamboo + Artifactory at work, and Maven + Nexus at Apache.)<br>
><br>
> At work (and to a lesser extent at Apache), I deal with multiple product<br>
> lines with multiple branches, each with their own set of large<br>
dependency<br>
> list.<br>
><br>
> As you can imagine, doing anything build related by hand is not good.<br>
><br>
> So here I am building a large application server and I want update my<br>
code<br>
> to JDOM2. Several of my 3rd party dependencies from various products<br>
(some<br>
> open source, some not) use JDOM1. They each use different versions of<br>
> JDOM1, luckily, overriding all dependencies to use 1.1.1 has not been a<br>
> problem.<br>
><br>
> In Ivy, I cannot say this and expect it to work:<br>
><br>
> <dependency org="org.jdom" name="jdom" conf="blah,blah" rev="1.1.1"<br>
/><br>
> <dependency org="org.jdom" name="jdom" conf="blah,blah" rev="2.0.1"<br>
/><br>
><br>
> This works OTOH:<br>
><br>
> <dependency org="commons-lang" name="commons-lang" conf="blah,blah"<br>
> rev="2.6" /><br>
> <dependency org="org.apache.commons" name="commons-lang3"<br>
> conf="blah,blah" rev="3.1" /><br>
><br>
> If you want to use both commons-lang 2.6 and 3.1 at the same time, you<br>
need<br>
> to pull down both using a different "name" which corresponds to the<br>
Maven<br>
> "artifact Id"<br>
><br>
> This example also shows that the "org" was changed but it is irrelevant<br>
to<br>
> this example. What matters is that you can uniquely identify each<br>
artifact.<br>
><br>
><br>
>> 'We' decided that this is JDOM 2.0.0, not JDOM2 1.0.0, and also not<br>
JDOM2<br>
>> 2.0.0, etc. Thus, the *main* download will be the jar jdom-2.0.0.jar.<br>
>><br>
><br>
> Great ;) The jar name and project name are your own should not matter.<br>
><br>
><br>
>><br>
>> This means that the maven artifact id *must* be 'jdom', not 'jdom2'.<br>
>><br>
><br>
> I do not think so. Naming the jar and the artifact are separate issues.<br>
><br>
> From the Ivy POV at least, once an artifact is found, Ivy can download<br>
it<br>
> and rename it on the fly to a custom name pattern (with a version in the<br>
> jar name or not, it's up to the user)<br>
><br>
><br>
>> At the time I was not aware how hard/impossible it would be to have<br>
both<br>
>> jdom 1.x and 2.x sourced from maven....<br>
>><br>
><br>
> That's the joy of serving people who build large complex systems ;)<br>
><br>
><br>
>><br>
>> Maven is the 'secondary' distribution system for JDOM. The primary JDOM<br>
>> source is from <a href="http://www.jdom.org" target="_blank">www.jdom.org</a>. The jars downloaded from maven should be<br>
>> identical to the ones from <a href="http://jdom.org" target="_blank">jdom.org</a>.<br>
>><br>
><br>
> A jar is a jar, it just need to be uniquely identifiable whether it<br>
lives<br>
> in an FTP directory, a Maven or Ivy repository.<br>
><br>
><br>
>><br>
>><br>
>> There are about 15k downloads a month from <a href="http://www.jdom.org" target="_blank">www.jdom.org</a> of 1.x versions<br>
>> of<br>
>> JDOM.<br>
>> There are about 35k downloads a month from maven-central of 1.x<br>
versions<br>
>> of JDOM.<br>
>><br>
>> There are about 10k downloads a month from <a href="http://www.jdom.org" target="_blank">www.jdom.org</a> of 2.0.x<br>
versions<br>
>> of JDOM<br>
>> There are about 1k downloads a month from maven-central of 2.0.x<br>
versions<br>
>> of JDOM.<br>
>><br>
>> The maven downloads show an *opposite* distribution of downloads<br>
compared<br>
>> to <a href="http://www.jdom.org" target="_blank">www.jdom.org</a>:<br>
>><br>
>> Here are maven's statistics for the three months Feb, Mar, Apr:<br>
>><br>
>> version,count,%<br>
>> "1.1","92301","0.8971452713012695"<br>
>> "1.1.2","6406","0.062264904379844666"<br>
>> "1.1.3","3425","0.03329024091362953"<br>
>> "2.0.0","716","0.006959361489862204"<br>
>> "2.0.1","35","3.4019225859083235E-4"<br>
>><br>
>> here's the graph....<br>
>><br>
>><br>
>><br>
</div></div><a href="http://chart.apis.google.com/chart?cht=p3&chs=400x400&chp=4.71&chco=326A9F|32349F|67329F|9D329F|9F326A&chtt=Downloads+From+Last%203%20Months|For+org.jdom:jdom&chds=0,92301&chd=t:92301,6406,3425,716,35&chdl=1.1|1.1.2|1.1.3|2.0.0|2.0.1" target="_blank">http://chart.apis.google.com/chart?cht=p3&chs=400x400&chp=4.71&chco=326A9F|32349F|67329F|9D329F|9F326A&chtt=Downloads+From+Last%203%20Months|For+org.jdom:jdom&chds=0,92301&chd=t:92301,6406,3425,716,35&chdl=1.1|1.1.2|1.1.3|2.0.0|2.0.1</a><<a href="http://chart.apis.google.com/chart?cht=p3&chs=400x400&chp=4.71&chco=326A9F%7C32349F%7C67329F%7C9D329F%7C9F326A&chtt=Downloads+From+Last%203%20Months%7CFor+org.jdom:jdom&chds=0,92301&chd=t:92301,6406,3425,716,35&chdl=1.1%7C1.1.2%7C1.1.3%7C2.0.0%7C2.0.1" target="_blank">http://chart.apis.google.com/chart?cht=p3&chs=400x400&chp=4.71&chco=326A9F%7C32349F%7C67329F%7C9D329F%7C9F326A&chtt=Downloads+From+Last%203%20Months%7CFor+org.jdom:jdom&chds=0,92301&chd=t:92301,6406,3425,716,35&chdl=1.1%7C1.1.2%7C1.1.3%7C2.0.0%7C2.0.1</a>><br>
<div><div class="h5">>><br>
>><br>
>> JDOM 1.1 (released 2007) was downloaded 92K times in 3 months.<br>
>> 1.1.2 (released last Aug) downloaded 6.5k times in 3 months.<br>
>> 1.1.3 (released in Feb) just 3.5k times in 3 months<br>
>><br>
>> Note that Maven does not even have JDOM 1.1.1 (from 2009) .....<br>
>><br>
><br>
> Uh... Who's fault is that?<br>
><br>
><br>
>><br>
>> So, it shows a distinct 'inertia' in maven users. For all I know they<br>
are<br>
>> not even aware that JDOM 2.x has happened.... My guess would be that<br>
90%<br>
>> of<br>
>> maven users do not pay attention to their code....<br>
>><br>
>> In a 'short while' I want to be in the position to say: "JDOM 1.x is no<br>
>> longer being maintained". It is not in *my* interests to do it.... it<br>
is<br>
>> essentially unchanged since 2007. If people have problems in JDOM 1.x<br>
I'm<br>
>> going to want to say "Upgrade to 2.x". I am targeting about December<br>
2012<br>
>> for that....<br>
>><br>
>> What all this rambling boils down to is:<br>
>><br>
>> 1. I don't want to have to change JDOM's jar file name from<br>
>> jdom-2.0.x.jar<br>
>> to jdom2-x.y.z.jar<br>
>><br>
><br>
> You do not have to do that. You can call the jars whatever you want.<br>
><br>
><br>
>> 2. maven is the 'secondary' distribution system<br>
>><br>
> 3. you can ask your 'dependency' code to upgrade to jdom 2.x (they<br>
should<br>
>> be doing it anyway).<br>
>><br>
><br>
> This is unrealistic for several reasons.<br>
> What if a jar using JDOM1 is not longer active?<br>
> And closed source to boot?<br>
> There are plenty of scenario where JDOM 1 and 2 need to co-exist.<br>
><br>
> 4. The bell has already been rung on this... I can't un-ring this maven<br>
>> problem.<br>
>><br>
><br>
> This can be addresses in future releases.<br>
><br>
><br>
>> 5. maven users are 'lazy' about keeping in touch with their<br>
dependencies,<br>
>> and this will 'prod' them.<br>
>><br>
><br>
> What about people who build in Grail, Buildr, Groovy and Scala?<br>
><br>
><br>
>> 6. This is all a maven problem (by design or implementation, I am not<br>
>> sure)<br>
>><br>
><br>
> Au contraire, this is not a Maven problem. This is a generic issue as I<br>
> described above when building large systems automatically with complex<br>
> dependencies.<br>
><br>
> 7. maven 'users' (including apache commons) are happy to do their own<br>
>> thing anyway...<br>
>><br>
><br>
> True of any user on any build system.<br>
><br>
><br>
>><br>
>><br>
</div></div><a href="http://search.maven.org/#search|ga|1|a%3A%22org.apache.servicemix.bundles.jdom%22" target="_blank">http://search.maven.org/#search|ga|1|a%3A%22org.apache.servicemix.bundles.jdom%22</a><<a href="http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22org.apache.servicemix.bundles.jdom%22" target="_blank">http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22org.apache.servicemix.bundles.jdom%22</a>><br>
<div class="im HOEnZb">>> 8. maven is a PITA ..... :(<br>
>><br>
><br>
> True of any build on any build system once it gets large and complex<br>
> enough.<br>
><br>
><br>
>><br>
>> As you can tell, maven support 'requirement' has not been a happy<br>
>> process.... in hindsight I probably should have just said no .... On<br>
the<br>
>> other hand, now that I have the automated build system working, it is<br>
not<br>
>> hard to publish to maven, as long as it conforms to JDOM's standards,<br>
I'm<br>
>> OK.<br>
>><br>
>> Now that I have established my 'aversion' to the maven model, can you<br>
>> suggest a way out of this predicament that also conforms to the JDOM<br>
>> 'standard'... ? I promise to consider any suggestions....<br>
>><br>
><br>
> I suggest that you publish JDOM2 under the jdom2 artifact id to match<br>
the<br>
> package name. You can call the jar whatever you want.<br>
><br>
> Thank you for reading this far!<br>
><br>
> Gary<br>
><br>
><br>
>> Rolf<br>
>><br>
<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
To control your jdom-interest membership:<br>
<a href="http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com" target="_blank">http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Cell: 703-594-1883<br>Blog: <a href="http://bradjcox.blogspot.com">http://bradjcox.blogspot.com</a><br>Web: <a href="http://virtualschool.edu">http://virtualschool.edu</a><br>
Manassas VA 20111<br><br>
</div>