Jason, On Tuesday 12 February 2008, Jason van Zyl wrote: > On 12-Feb-08, at 8:16 AM, Milos Kleint wrote: > > this is not about mimicking old behaviour. The new code is plain > > wrong for this case. > > Mimicking the behavior means making it work like the previous version. > > It would also have been nice if both you and Dan actually looked at > this before it was released. I don't think it's that much work to > change it, but appeared from almost all people talking about Archetype > absolutely hated the old mechanism. Writing scripts to work around it, > begging for another method to select.
Prior to today, I've used an archetype possibly twice, ever. I don't use them at all which is one reason why I didn't look at them. I have no need for them. I only looked at them today because someone else asked me "what made maven break today". Documented instructions on projects websites that suddenly stop working is one of the major things that give maven a bad reputation. Suddenly, stuff that was working one day completely doesn't work the next. People may have disliked the way it worked, but the point was that it DID WORK, but now doesn't. The OTHER thing that creates bad reputation is that when something like this happens, how do I figure out what to do? Since I KNEW a new version of the Archetype plugin was released (many people probably wouldn't have even known that), I specifically looked at the docs for the new Archetype to see if there was a "this is now how you do it" type page or a migration page or similar. I didn't find one. (Note: a BUNCH of the pages linked to from the maven-archetype-plugin docs online result in 404 errors. Example: http://maven.apache.org/plugins/maven-archetype-plugin/archetype-handcraft.html) Thus, I asked here. And I still don't have an answer. The only thing I came up with was: mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create ..... > > When you define the archetype's groupId, artifactId and version on > > command line, the plugin should not offer you a list to pick from. > > That's especially tragic when the archetype you want is not in the > > list. Period. > > I would consider that a bug, sure, I don't think I would categorize > that as tragic. I categorize anything that causes documented behavior that is relied upon my many projects and users to suddenly, and without warning, break as a tragic bug. Dan > > > If all archetype properties are defined, it should just create the > > project, if some are missing ask for missing values. > > Catalogues should help, not be in the way. > > Well, I'm sure glad you helped so much while we were developing the > new version. > > Both you and Dan had every opportunity to look at the code along the > way, look at the staged release and voice your concerns. > > Nothing is irreparable. But generally it would be better if you're > going to voice a concern try and do it before the release. By all > accounts I could see no one I could see actually like the old > cumbersome way. Evidenced by the proliferation of tools that cropped > up to present lists to people. > > > The only workaround I figured out, is to run maven in batch mode and > > declare archetype ids and all properties on command line. Strangely > > enough the central repository needs to be declared on command line > > as well. I'm for calling this a bug too. > > Nothing tragic, it can be fixed. We can create a new goal (like > archetype:generate which is more accurate or archetype:create-from- > list) for the behavior that we created, and have the "create" goal > mimic the old behavior. How's that sound? I think people who like the > old way are in the minority but not that hard to fix. > > > Milos > > > > On Feb 12, 2008 4:30 PM, Jason van Zyl <[EMAIL PROTECTED]> wrote: > >> We can create a new goal name, whatever it be, and mimic the old > >> behavior. > >> > >> The archetypes don't need to reside in central. I've been taking > >> the list off the Wiki and turning it into the internal catalog. We > >> can keep the list itself in that case for the command line. For the > >> Eclipse use case we can read the internal catalog, or the Nexus > >> index source which does require the Archetypes to be in central. > >> And what's the problem with that in your case if you're syncing to > >> central. > >> > >> At any rate, we can fix that goal and mimic the new behavior. Might > >> be > >> good to try and raise these things when we've asked repeatedly for > >> people to try it. Most people seem to hate that notation below so I > >> asked Raphael to make the batch mode non-default and provide the > >> list. > >> > >> On 12-Feb-08, at 7:02 AM, Daniel Kulp wrote: > >>> The new archetype plugin seems to have broken the normal > >>> instructions on > >>> how to create new projects. It doesn't seem to work. > >>> > >>> For example, according to: > >>> http://cwiki.apache.org/confluence/display/CAMEL/Creating+a+new+Sp > >>>ring+based+Camel+Route > >>> > >>> I should just need to run: > >>> mvn archetype:create \ > >>> -DarchetypeGroupId=org.apache.camel \ > >>> -DarchetypeArtifactId=camel-router \ > >>> -DarchetypeVersion=1.1.0 \ > >>> -DgroupId=myGroupId \ > >>> -DartifactId=myArtifactId > >>> > >>> > >>> That worked last week. Now I get a big list of archetypes to > >>> select > >>> from and the camel stuff isn't there. > >>> > >>> > >>> So, how the heck is this now supposed to work? If projects have > >>> archetypes in central, how are users supposed to use them? I > >>> really > >>> think we need to get a new version out that allows the previous > >>> instructions to work. This really breaks a BUNCH of projects > >>> instructions for creating samples/projects. > >>> > >>> > >>> -- > >>> J. Daniel Kulp > >>> Principal Engineer, IONA > >>> [EMAIL PROTECTED] > >>> http://www.dankulp.com/blog > >>> > >>> ------------------------------------------------------------------ > >>>--- To unsubscribe, e-mail: [EMAIL PROTECTED] > >>> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> Thanks, > >> > >> Jason > >> > >> ---------------------------------------------------------- > >> Jason van Zyl > >> Founder, Apache Maven > >> jason at sonatype dot com > >> ---------------------------------------------------------- > >> > >> happiness is like a butterfly: the more you chase it, the more it > >> will > >> elude you, but if you turn your attention to other things, it will > >> come > >> and sit softly on your shoulder ... > >> > >> -- Thoreau > >> > >> > >> > >> > >> > >> ------------------------------------------------------------------- > >>-- To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > > > > -------------------------------------------------------------------- > >- To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > Thanks, > > Jason > > ---------------------------------------------------------- > Jason van Zyl > Founder, Apache Maven > jason at sonatype dot com > ---------------------------------------------------------- > > A language that doesn’t affect the way you think about programming is > not worth knowing. > > -— Alan Perlis > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
