To add fuel to this fire... I stopped using JDOM 1.x altogether when it wasn't available on maven (awhile back) and started again only when JDOM 2.x became available on maven. <div><br></div><div>The "alternative" distro argument doesn't persuade; its just too much a PITA to adjust to each and every developer's idiosyncratic objections to a well-established model, regardless of its deficiencies. Its far easier to adjust to the idiosyncacies of the many DOM alternatives that ARE available on maven. </div>

<div><br></div><div>My main interest is SIMPLIFYING my life in this overly-complex world, and maven is the only tool that does that for me. I'd go back to W3C DOM if that were the only way to achieve it, as much as I detest working with that.<br>

<br><div class="gmail_quote">On Fri, May 18, 2012 at 11:24 AM, Gary Gregory <span dir="ltr"><<a href="mailto:garydgregory@gmail.com" target="_blank">garydgregory@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Rolf,<br><br>Thank you for detailed reply. Let me address several points below. I'll probably ramble on too... :)<br><br><div class="gmail_quote"><div class="im">On Fri, May 18, 2012 at 10:27 AM, 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>
Where were you for this discussion:<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></blockquote></div><div><br>The problem is not that Maven has to give things names, the issue, IMO, is how does *any* automated build system deal with using multiple versions of the same component.<br><br>By 'build system' here, I am not talking about just compiling and jaring at the Ant level, I am talking about continuous integration, automatically dealing with pulling down project dependencies (I use Ant + Ivy at work and Maven at Apache.) and publishing the build results up the food chain (I use 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 lines with multiple branches, each with their own set of large dependency 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 code to JDOM2. Several of my 3rd party dependencies from various products (some open source, some not) use JDOM1. They each use different versions of JDOM1, luckily, overriding all dependencies to use 1.1.1 has not been a 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>    <dependency org="org.jdom" name="jdom" conf="blah,blah" rev="2.0.1" /><br>


<br>This works OTOH:<br><br>    <dependency org="commons-lang" name="commons-lang" conf="blah,blah" rev="2.6" /><br>    <dependency org="org.apache.commons" name="commons-lang3" 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 need to pull down both using a different "name" which corresponds to the Maven "artifact Id"<br><br>This example also shows that the "org" was changed but it is irrelevant to this example. What matters is that you can uniquely identify each artifact.<br>


<br></div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
'We' decided that this is JDOM 2.0.0, not JDOM2 1.0.0, and also not JDOM2<br>
2.0.0, etc. Thus, the *main* download will be the jar jdom-2.0.0.jar.<br></blockquote></div><div><br>Great ;) The jar name and project name are your own should not matter.<br> <br></div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<br>
This means that the maven artifact id *must* be 'jdom', not 'jdom2'.<br></blockquote></div><div><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 it and rename it on the fly to a custom name pattern (with a version in the jar name or not, it's up to the user)<br>


<br></div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
At the time I was not aware how hard/impossible it would be to have both<br>
jdom 1.x and 2.x sourced from maven....<br></blockquote></div><div><br>That's the joy of serving people who build large complex systems ;)<br> <br></div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<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></blockquote></div><div><br>A jar is a jar, it just need to be uniquely identifiable whether it lives in an FTP directory, a Maven or Ivy repository. <br>


 <br></div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<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 of<br>
JDOM.<br>
There are about 35k downloads a month from maven-central of 1.x 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 versions<br>
of JDOM<br>
There are about 1k downloads a month from maven-central of 2.0.x versions<br>
of JDOM.<br>
<br>
The maven downloads show an *opposite* distribution of downloads 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>
<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|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><br>



<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></blockquote></div><div><br>Uh... Who's fault is that? <br> <br></div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<br>
So, it shows a distinct 'inertia' in maven users. For all I know they are<br>
not even aware that JDOM 2.x has happened.... My guess would be that 90% 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 is<br>
essentially unchanged since 2007. If people have problems in JDOM 1.x I'm<br>
going to want to say "Upgrade to 2.x". I am targeting about December 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 jdom-2.0.x.jar<br>
to jdom2-x.y.z.jar<br></blockquote></div><div><br>You do not have to do that. You can call the jars whatever you want.<br> <br></div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



2. maven is the 'secondary' distribution system <br></blockquote><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
3. you can ask your 'dependency' code to upgrade to jdom 2.x (they should<br>
be doing it anyway).<br></blockquote></div><div><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></div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
4. The bell has already been rung on this... I can't un-ring this maven<br>
problem.<br></blockquote></div><div><br>This can be addresses in future releases.<br> <br></div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">


5. maven users are 'lazy' about keeping in touch with their dependencies,<br>
and this will 'prod' them.<br></blockquote></div><div><br>What about people who build in Grail, Buildr, Groovy and Scala? <br> <br></div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



6. This is all a maven problem (by design or implementation, I am not<br>
sure)<br></blockquote></div><div><br>Au contraire, this is not a Maven problem. This is a generic issue as I described above when building large systems automatically with complex dependencies.<br><br></div><div class="im">

<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

7. maven 'users' (including apache commons) are happy to do their own<br>
thing anyway...<br></blockquote></div><div><br>True of any user on any build system.<br> <br></div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">


<a href="http://search.maven.org/#search%7Cga%7C1%7Ca%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><br>
8. maven is a PITA ..... :(<br></blockquote></div><div><br>True of any build on any build system once it gets large and complex enough.<br> 
<br></div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<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 the<br>
other hand, now that I have the automated build system working, it is not<br>
hard to publish to maven, as long as it conforms to JDOM's standards, 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></blockquote></div><div><br>I suggest that you publish JDOM2 under the jdom2 artifact id to match the package name. You can call the jar whatever you want.<br>


<br>Thank you for reading this far!<span class="HOEnZb"><font color="#888888"><br> <br>Gary<br><br></font></span></div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">


<br>
Rolf<br>
<br>
<br>
<br>
On Fri, 18 May 2012 08:29:28 -0400, Gary Gregory <<a href="mailto:garydgregory@gmail.com" target="_blank">garydgregory@gmail.com</a>><br>
wrote:<br>
<div><div>> Hi All,<br>
><br>
> For good or bad, I ended learning more than I care about Maven being the<br>
> release manager for several Apache Commons components.<br>
><br>
> Our rule in Commons is that when you change a package name, you must<br>
change<br>
> the Maven artifact id.<br>
><br>
> My suggestion is to do this in your POM:<br>
><br>
>   <groupId>org.jdom</groupId><br>
>   <artifactId>jdom2</artifactId><br>
>   <version>2.0.2</version><br>
><br>
> Depending on your philosophy, you could also re-publish the Maven<br>
artifacts<br>
> for 2.0.1. But this is usually considered bad form because the POM needs<br>
to<br>
> change and you would then have 2 2.0.1 version with different pom.xml in<br>
> your sources jar.<br>
><br>
> Gary<br>
><br>
<br>
</div></div></blockquote></div></div><br><br clear="all"><div class="HOEnZb"><div class="h5"><br>-- <br>E-Mail: <a href="mailto:garydgregory@gmail.com" target="_blank">garydgregory@gmail.com</a> | <a href="mailto:ggregory@apache.org" target="_blank">ggregory@apache.org </a><br>


JUnit in Action, 2nd Ed: <a href="http://goog_1249600977" target="_blank"></a><a href="http://bit.ly/ECvg0" target="_blank">http://bit.ly/ECvg0</a><br>Spring Batch in Action: <a href="http://s.apache.org/HOq" target="_blank"></a><a href="http://bit.ly/bqpbCK" rel="nofollow" target="_blank">http://bit.ly/bqpbCK</a><br>


Blog: <a href="http://garygregory.wordpress.com/" target="_blank">http://garygregory.wordpress.com</a> <br>Home: <a href="http://garygregory.com/" target="_blank">http://garygregory.com/</a><br>Tweet! <a href="http://twitter.com/GaryGregory" target="_blank">http://twitter.com/GaryGregory</a><br>



</div></div><br>_______________________________________________<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></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>