|
View:
New views
18 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
Re: Is it possible to make pom.xml simpler?+1 to that. Kind regards, Dave Sag Matt Raible <mraible@...> wrote on 15-12-2005 02:06:04: > After seeing what the Spring Developers have done to simplify Spring > context files, I can't help but think the same thing is possible for > Maven 2's pom.xml. Is it possible to add namespaces and make > something like the following possible? > > Before: > > <dependency> > <groupId>springframework</groupId> > <artifactId>spring</artifactId> > <version>1.2.6</version> > </dependency> > > After: > > <dep:artifact name="org/springframework/spring" version="1.2.6"/> > > Or just allow attributes to make things a bit cleaner? > > <dependency groupId="org.springframework" artifactId="spring" > version="1.2.6"/> > > Allowing 1 line instead of 5-6 lines per dependency would allow me to > cut my dependencies listing from 140 lines of XML to 37 lines. When > the Spring guys allows a couple of elements as attributes (<ref> and > <value>) - it made writing Spring context files *much* easier. > > Here's an example of my simplified version: > > <dependencies> > <dependency groupId="cargo" artifactId="cargo" version="0.6" > scope="test"/> > <dependency groupId="commons-lang" artifactId="commons-lang" > version="2.0"/> > <dependency groupId="commons-logging" artifactId="commons-logging" > version="1.0.4"/> > <dependency groupId="displaytag" artifactId="displaytag" > version="1.0" scope="runtime"> > <exclusions> > <exclusion artifactId="xalan" groupId="xalan"/> > </exclusions> > </dependency> > <dependency groupId="uk.ltd.getahead" artifactId="dwr" > version="1.0" scope="runtime"/> > <dependency groupId="org.hibernate" artifactId="hibernate" > version="3.0.5"> > <exclusions> > <exclusion artifactId="jta" groupId="javax.transaction"/> > </exclusions> > </dependency> > <dependency groupId="geronimo-spec" artifactId="geronimo-spec-jta" > version="1.0.1B-rc4"/> > <dependency groupId="jmock" artifactId="jmock" version="1.0.1" > scope="test"/> > <dependency groupId="junit" artifactId="junit" version="3.8.1" > scope="test"/> > <dependency groupId="jwebunit" artifactId="jwebunit" version="1.2" > scope="test"/> > <dependency groupId="httpunit" artifactId="httpunit" version="1.6" > scope="test"> > <exclusions> > <exclusion artifactId="js" groupId="rhino"/> > </exclusions> > </dependency> > <dependency groupId="log4j" artifactId="log4j" version="1.2.11"/> > <dependency groupId="postgresql" artifactId="postgresql" > version="8.1-404.jdbc3"/> > <dependency groupId="javax.servlet" artifactId="servlet-api" > version="2.4" scope="provided"/> > <dependency groupId="javax.servlet" artifactId="jstl" > version="1.1.2" scope="runtime"/> > <dependency groupId="taglibs" artifactId="standard" > version="1.1.2" scope="runtime"/> > <dependency groupId="opensymphony" artifactId="sitemesh" > version="2.2.1" scope="runtime"/> > <dependency groupId="springmodules" > artifactId="springmodules-validator" version="0.1" scope="runtime"/> > <dependency groupId="springframework" artifactId="spring" > version="1.2.6"/> > <dependency groupId="springframework" artifactId="spring-mock" > version="1.2.6" scope="test"> > <exclusions> > <exclusion artifactId="spring-jdbc" groupId="springframework"/> > <exclusion artifactId="spring-web" groupId="springframework"/> > </exclusions> > </dependency> > </dependencies> > > Of course, Ivy's syntax is even simpler, so maybe that'll provide some > motivation. ;-) > > <dependencies> > <dependency org="apache" name="commons-lang" rev="2.0" /> > <dependency org="apache" name="commons-cli" rev="1.0" /> > </dependencies> > > Matt > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > |
|
|
Re: Is it possible to make pom.xml simpler?+1 on this from me. I have a very large project with a large number of
dependencies and just the size of the file makes things more complicated than it could be. Is seems to be that expressing having fewer characters that same exactly the same thing would make large files much simpler. Matt On Dec 14, 2005, at 8:06 PM, Matt Raible wrote: > After seeing what the Spring Developers have done to simplify Spring > context files, I can't help but think the same thing is possible for > Maven 2's pom.xml. Is it possible to add namespaces and make > something like the following possible? > > Before: > > <dependency> > <groupId>springframework</groupId> > <artifactId>spring</artifactId> > <version>1.2.6</version> > </dependency> > > After: > > <dep:artifact name="org/springframework/spring" version="1.2.6"/> > > Or just allow attributes to make things a bit cleaner? > > <dependency groupId="org.springframework" artifactId="spring" > version="1.2.6"/> > > Allowing 1 line instead of 5-6 lines per dependency would allow me to > cut my dependencies listing from 140 lines of XML to 37 lines. When > the Spring guys allows a couple of elements as attributes (<ref> and > <value>) - it made writing Spring context files *much* easier. > > Here's an example of my simplified version: > > <dependencies> > <dependency groupId="cargo" artifactId="cargo" version="0.6" > scope="test"/> > <dependency groupId="commons-lang" artifactId="commons-lang" > version="2.0"/> > <dependency groupId="commons-logging" artifactId="commons-logging" > version="1.0.4"/> > <dependency groupId="displaytag" artifactId="displaytag" > version="1.0" scope="runtime"> > <exclusions> > <exclusion artifactId="xalan" groupId="xalan"/> > </exclusions> > </dependency> > <dependency groupId="uk.ltd.getahead" artifactId="dwr" > version="1.0" scope="runtime"/> > <dependency groupId="org.hibernate" artifactId="hibernate" > version="3.0.5"> > <exclusions> > <exclusion artifactId="jta" groupId="javax.transaction"/> > </exclusions> > </dependency> > <dependency groupId="geronimo-spec" artifactId="geronimo-spec-jta" > version="1.0.1B-rc4"/> > <dependency groupId="jmock" artifactId="jmock" version="1.0.1" > scope="test"/> > <dependency groupId="junit" artifactId="junit" version="3.8.1" > scope="test"/> > <dependency groupId="jwebunit" artifactId="jwebunit" version="1.2" > scope="test"/> > <dependency groupId="httpunit" artifactId="httpunit" version="1.6" > scope="test"> > <exclusions> > <exclusion artifactId="js" groupId="rhino"/> > </exclusions> > </dependency> > <dependency groupId="log4j" artifactId="log4j" version="1.2.11"/> > <dependency groupId="postgresql" artifactId="postgresql" > version="8.1-404.jdbc3"/> > <dependency groupId="javax.servlet" artifactId="servlet-api" > version="2.4" scope="provided"/> > <dependency groupId="javax.servlet" artifactId="jstl" > version="1.1.2" scope="runtime"/> > <dependency groupId="taglibs" artifactId="standard" > version="1.1.2" scope="runtime"/> > <dependency groupId="opensymphony" artifactId="sitemesh" > version="2.2.1" scope="runtime"/> > <dependency groupId="springmodules" > artifactId="springmodules-validator" version="0.1" scope="runtime"/> > <dependency groupId="springframework" artifactId="spring" > version="1.2.6"/> > <dependency groupId="springframework" artifactId="spring-mock" > version="1.2.6" scope="test"> > <exclusions> > <exclusion artifactId="spring-jdbc" groupId="springframework"/> > <exclusion artifactId="spring-web" groupId="springframework"/> > </exclusions> > </dependency> > </dependencies> > > Of course, Ivy's syntax is even simpler, so maybe that'll provide some > motivation. ;-) > > <dependencies> > <dependency org="apache" name="commons-lang" rev="2.0" /> > <dependency org="apache" name="commons-cli" rev="1.0" /> > </dependencies> > > Matt > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > ___ Matt Brozowski, OpenNMS Maintainer Main: +1 919 812 4984 The OpenNMS Group, Inc. Fax: +1 503 961 7746 Email: brozow@... URL: http://www.opennms.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Is it possible to make pom.xml simpler?On Thu, Dec 15, 2005 at 10:15:02PM +0100, ir. ing. Jan Dockx wrote:
> here, here > > Directory "pom", next to pom.xml, src and target; all xml files there > are merged together; or something; reminds me of our faces-config.xml > setup. As a matter of fact, current xerces supports the XInclude, so, as I see, partitioning POM is not a problem, just the distribution mechanism, has to be xinclude aware. http://www.w3.org/TR/xinclude/ http://xerces.apache.org/xerces2-j/faq-xinclude.html incze --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Is it possible to make pom.xml simpler?>If your sole concern is the number of lines one must type, it is >certainly an option to have meta-pom.xml be in the format you find most >comfortable, then xslt it into the "more verbose" m2 pom.xml. > >This argument of attributes versus elements has existed since the dawn >of [xml] time. I am not trying to argue one way or the other, but since >m1 pom used the "more verbose" syntax, it eases the transition. > > My USD$0.02, > -- /v\atthew > >--------------------------------------------------------------------- > > verbose schemas on the fly :) The advantage of using namespaces is that you can create a your tag and map it to the verbose tag from the official pom. That's the way I've seen the spring guys use it for now but the advantage that I see is that in could be much easier to extend the pom and it would be more "type safe" My 0.02MKD --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Is it possible to make pom.xml simpler?-1
I agree with Brett. This is a matter of taste. My taste goes towards the existing solution. Writing everything on a single line may even become less readable. Have you ever tried to read an Eclipse .classpath file? You can hardly say that's more readeable. I also think that mixing attributes with elements is in this case a bad idea and would hurt overall consistency. On 12/17/05, Srepfler Srgjan <srgjan.srepfler@...> wrote: > > > >If your sole concern is the number of lines one must type, it is > >certainly an option to have meta-pom.xml be in the format you find most > >comfortable, then xslt it into the "more verbose" m2 pom.xml. > > > >This argument of attributes versus elements has existed since the dawn > >of [xml] time. I am not trying to argue one way or the other, but since > >m1 pom used the "more verbose" syntax, it eases the transition. > > > > My USD$0.02, > > -- /v\atthew > > > >--------------------------------------------------------------------- > > > > > In fact people should develop a plugin that maps the simplified and > verbose schemas on the fly :) > The advantage of using namespaces is that you can create a your tag and > map it to the verbose tag from the official pom. > That's the way I've seen the spring guys use it for now but the > advantage that I see is that in could be much easier to extend the pom > and it would be more "type safe" > > My 0.02MKD > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > |
|
|
Re: Is it possible to make pom.xml simpler?A simple XSLT stylesheet would do the job there. You don't need maven
to support this format. On 12/17/05, Thomas Van de Velde <thomas.vdvelde@...> wrote: > -1 > > I agree with Brett. This is a matter of taste. My taste goes towards the > existing solution. Writing everything on a single line may even become less > readable. Have you ever tried to read an Eclipse .classpath file? You can > hardly say that's more readeable. I also think that mixing attributes with > elements is in this case a bad idea and would hurt overall consistency. > > On 12/17/05, Srepfler Srgjan <srgjan.srepfler@...> wrote: > > > > > > >If your sole concern is the number of lines one must type, it is > > >certainly an option to have meta-pom.xml be in the format you find most > > >comfortable, then xslt it into the "more verbose" m2 pom.xml. > > > > > >This argument of attributes versus elements has existed since the dawn > > >of [xml] time. I am not trying to argue one way or the other, but since > > >m1 pom used the "more verbose" syntax, it eases the transition. > > > > > > My USD$0.02, > > > -- /v\atthew > > > > > >--------------------------------------------------------------------- > > > > > > > > In fact people should develop a plugin that maps the simplified and > > verbose schemas on the fly :) > > The advantage of using namespaces is that you can create a your tag and > > map it to the verbose tag from the official pom. > > That's the way I've seen the spring guys use it for now but the > > advantage that I see is that in could be much easier to extend the pom > > and it would be more "type safe" > > > > My 0.02MKD > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@... > > For additional commands, e-mail: users-help@... > > > > > > -- Alexandre Poitras Québec, Canada --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Is it possible to make pom.xml simpler?We all agree that it is really a matter of taste. That's precisely why
Maven *should* support another theme. I definitly agree that whether attributes are more readable or not is arguable (at best) - but why not keep both camps happy? :) (if the costs are reasonable of course) On 12/17/05, Alexandre Poitras <alexandre.poitras@...> wrote: > A simple XSLT stylesheet would do the job there. You don't need maven > to support this format. > > On 12/17/05, Thomas Van de Velde <thomas.vdvelde@...> wrote: > > -1 > > > > I agree with Brett. This is a matter of taste. My taste goes towards the > > existing solution. Writing everything on a single line may even become less > > readable. Have you ever tried to read an Eclipse .classpath file? You can > > hardly say that's more readeable. I also think that mixing attributes with > > elements is in this case a bad idea and would hurt overall consistency. > > > > On 12/17/05, Srepfler Srgjan <srgjan.srepfler@...> wrote: > > > > > > > > > >If your sole concern is the number of lines one must type, it is > > > >certainly an option to have meta-pom.xml be in the format you find most > > > >comfortable, then xslt it into the "more verbose" m2 pom.xml. > > > > > > > >This argument of attributes versus elements has existed since the dawn > > > >of [xml] time. I am not trying to argue one way or the other, but since > > > >m1 pom used the "more verbose" syntax, it eases the transition. > > > > > > > > My USD$0.02, > > > > -- /v\atthew > > > > > > > >--------------------------------------------------------------------- > > > > > > > > > > > In fact people should develop a plugin that maps the simplified and > > > verbose schemas on the fly :) > > > The advantage of using namespaces is that you can create a your tag and > > > map it to the verbose tag from the official pom. > > > That's the way I've seen the spring guys use it for now but the > > > advantage that I see is that in could be much easier to extend the pom > > > and it would be more "type safe" > > > > > > My 0.02MKD > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: users-unsubscribe@... > > > For additional commands, e-mail: users-help@... > > > > > > > > > > > > > -- > Alexandre Poitras > Québec, Canada > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > -- Regards, _____________________________________ Arik Kfir arikkfir@... |
|
|
|
|
|
Re: Is it possible to make pom.xml simpler?That's a good point....question is: Is readability of pom.xml a
good-enough feature? (which brings us back to a matter of taste hehehee) On 12/17/05, Brian E. Fox <brianf@...> wrote: > "why not keep both camps happy? :) " > > I would personally have them spend time on bugs fixes and new functional features than rewrite something that is a matter of taste. > > -----Original Message----- > From: Arik Kfir [mailto:arikkfir@...] > Sent: Saturday, December 17, 2005 7:30 AM > To: Maven Users List > Subject: Re: Is it possible to make pom.xml simpler? > > We all agree that it is really a matter of taste. That's precisely why Maven *should* support another theme. > > I definitly agree that whether attributes are more readable or not is arguable (at best) - but why not keep both camps happy? :) (if the costs are reasonable of course) > > > On 12/17/05, Alexandre Poitras <alexandre.poitras@...> wrote: > > A simple XSLT stylesheet would do the job there. You don't need maven > > to support this format. > > > > On 12/17/05, Thomas Van de Velde <thomas.vdvelde@...> wrote: > > > -1 > > > > > > I agree with Brett. This is a matter of taste. My taste goes > > > towards the existing solution. Writing everything on a single line > > > may even become less readable. Have you ever tried to read an > > > Eclipse .classpath file? You can hardly say that's more readeable. > > > I also think that mixing attributes with elements is in this case a bad idea and would hurt overall consistency. > > > > > > On 12/17/05, Srepfler Srgjan <srgjan.srepfler@...> wrote: > > > > > > > > > > > > >If your sole concern is the number of lines one must type, it is > > > > >certainly an option to have meta-pom.xml be in the format you > > > > >find most comfortable, then xslt it into the "more verbose" m2 pom.xml. > > > > > > > > > >This argument of attributes versus elements has existed since the > > > > >dawn of [xml] time. I am not trying to argue one way or the > > > > >other, but since > > > > >m1 pom used the "more verbose" syntax, it eases the transition. > > > > > > > > > > My USD$0.02, > > > > > -- /v\atthew > > > > > > > > > >----------------------------------------------------------------- > > > > >---- > > > > > > > > > > > > > > In fact people should develop a plugin that maps the simplified > > > > and verbose schemas on the fly :) The advantage of using > > > > namespaces is that you can create a your tag and map it to the > > > > verbose tag from the official pom. > > > > That's the way I've seen the spring guys use it for now but the > > > > advantage that I see is that in could be much easier to extend the > > > > pom and it would be more "type safe" > > > > > > > > My 0.02MKD > > > > > > > > ------------------------------------------------------------------ > > > > --- To unsubscribe, e-mail: users-unsubscribe@... > > > > For additional commands, e-mail: users-help@... > > > > > > > > > > > > > > > > > > > > -- > > Alexandre Poitras > > Québec, Canada > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@... > > For additional commands, e-mail: users-help@... > > > > > > > -- > Regards, > _____________________________________ > Arik Kfir arikkfir@... > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > -- Regards, _____________________________________ Arik Kfir arikkfir@... |
|
|
Re: Is it possible to make pom.xml simpler?-0
Support for both should be out of the question. Double the documentation, double the confusion, double the possibility for error proneness. Readability is very important. I've never been a big fan of the "less lines" argument. Sure: if(a!=null){a+=" label";System,out.println(a);} may be less lines than: if ( a!=null ) { a += " label"; System,out.println( a ); } However, I'd rather maintain the second than the first. Since maintinence of code (and, by extension, the POM) is a larger percentage of the development lifecycle than the initial writing, that is the more important piece to pander too. I'm all for removing some of the verbosity of the POM. I kind of like the <id>groupId/artifactId</id> syntax. But that's a far cry from cramming everything onto a single, unreadable ( hyperbole :) ), line. Eric On 12/17/05, Arik Kfir <arikkfir@...> wrote: > > That's a good point....question is: Is readability of pom.xml a > good-enough feature? (which brings us back to a matter of taste > hehehee) > > On 12/17/05, Brian E. Fox <brianf@...> wrote: > > "why not keep both camps happy? :) " > > > > I would personally have them spend time on bugs fixes and new functional > features than rewrite something that is a matter of taste. > > > > -----Original Message----- > > From: Arik Kfir [mailto:arikkfir@...] > > Sent: Saturday, December 17, 2005 7:30 AM > > To: Maven Users List > > Subject: Re: Is it possible to make pom.xml simpler? > > > > We all agree that it is really a matter of taste. That's precisely why > Maven *should* support another theme. > > > > I definitly agree that whether attributes are more readable or not is > arguable (at best) - but why not keep both camps happy? :) (if the costs > are reasonable of course) > > > > > > On 12/17/05, Alexandre Poitras <alexandre.poitras@...> wrote: > > > A simple XSLT stylesheet would do the job there. You don't need maven > > > to support this format. > > > > > > On 12/17/05, Thomas Van de Velde <thomas.vdvelde@...> wrote: > > > > -1 > > > > > > > > I agree with Brett. This is a matter of taste. My taste goes > > > > towards the existing solution. Writing everything on a single line > > > > may even become less readable. Have you ever tried to read an > > > > Eclipse .classpath file? You can hardly say that's more readeable. > > > > I also think that mixing attributes with elements is in this case a > bad idea and would hurt overall consistency. > > > > > > > > On 12/17/05, Srepfler Srgjan <srgjan.srepfler@...> wrote: > > > > > > > > > > > > > > > >If your sole concern is the number of lines one must type, it is > > > > > >certainly an option to have meta-pom.xml be in the format you > > > > > >find most comfortable, then xslt it into the "more verbose" m2 > pom.xml. > > > > > > > > > > > >This argument of attributes versus elements has existed since the > > > > > >dawn of [xml] time. I am not trying to argue one way or the > > > > > >other, but since > > > > > >m1 pom used the "more verbose" syntax, it eases the transition. > > > > > > > > > > > > My USD$0.02, > > > > > > -- /v\atthew > > > > > > > > > > > >----------------------------------------------------------------- > > > > > >---- > > > > > > > > > > > > > > > > > In fact people should develop a plugin that maps the simplified > > > > > and verbose schemas on the fly :) The advantage of using > > > > > namespaces is that you can create a your tag and map it to the > > > > > verbose tag from the official pom. > > > > > That's the way I've seen the spring guys use it for now but the > > > > > advantage that I see is that in could be much easier to extend the > > > > > pom and it would be more "type safe" > > > > > > > > > > My 0.02MKD > > > > > > > > > > ------------------------------------------------------------------ > > > > > --- To unsubscribe, e-mail: users-unsubscribe@... > > > > > For additional commands, e-mail: users-help@... > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Alexandre Poitras > > > Québec, Canada > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: users-unsubscribe@... > > > For additional commands, e-mail: users-help@... > > > > > > > > > > > > -- > > Regards, > > _____________________________________ > > Arik Kfir arikkfir@... > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@... > > For additional commands, e-mail: users-help@... > > > > > > > -- > Regards, > _____________________________________ > Arik Kfir arikkfir@... > |
|
|
Re: Is it possible to make pom.xml simpler?Don't confuse "shorter" with "more readable". I don't mind going for
the "<id>mygroup/myartiact</id>" instead of attributes. I just wanted to note that the existing syntax is (perhaps) *too* verbose... I definitly agree with your example, and maintainance takes priority over number-of-source-lines...but when you reach 20..30 dependencies, things get messy... Some might argue that having 20 dependencies might indicate a hidden problem, but even with 10 dependencies, combined with a real-world <build> and <plugins> section, you get a pretty big POM... Anyway, just my 2cents ;-) On 12/17/05, Eric Redmond <eric.redmond@...> wrote: > -0 > > Support for both should be out of the question. Double the documentation, > double the confusion, double the possibility for error proneness. > > Readability is very important. I've never been a big fan of the "less lines" > argument. Sure: > > if(a!=null){a+=" label";System,out.println(a);} > > may be less lines than: > > if ( a!=null ) > { > a += " label"; > System,out.println( a ); > } > > However, I'd rather maintain the second than the first. Since maintinence of > code (and, by extension, the POM) is a larger percentage of the development > lifecycle than the initial writing, that is the more important piece to > pander too. > > I'm all for removing some of the verbosity of the POM. I kind of like the > <id>groupId/artifactId</id> syntax. But that's a far cry from cramming > everything onto a single, unreadable ( hyperbole :) ), line. > > Eric > > On 12/17/05, Arik Kfir <arikkfir@...> wrote: > > > > That's a good point....question is: Is readability of pom.xml a > > good-enough feature? (which brings us back to a matter of taste > > hehehee) > > > > On 12/17/05, Brian E. Fox <brianf@...> wrote: > > > "why not keep both camps happy? :) " > > > > > > I would personally have them spend time on bugs fixes and new functional > > features than rewrite something that is a matter of taste. > > > > > > -----Original Message----- > > > From: Arik Kfir [mailto:arikkfir@...] > > > Sent: Saturday, December 17, 2005 7:30 AM > > > To: Maven Users List > > > Subject: Re: Is it possible to make pom.xml simpler? > > > > > > We all agree that it is really a matter of taste. That's precisely why > > Maven *should* support another theme. > > > > > > I definitly agree that whether attributes are more readable or not is > > arguable (at best) - but why not keep both camps happy? :) (if the costs > > are reasonable of course) > > > > > > > > > On 12/17/05, Alexandre Poitras <alexandre.poitras@...> wrote: > > > > A simple XSLT stylesheet would do the job there. You don't need maven > > > > to support this format. > > > > > > > > On 12/17/05, Thomas Van de Velde <thomas.vdvelde@...> wrote: > > > > > -1 > > > > > > > > > > I agree with Brett. This is a matter of taste. My taste goes > > > > > towards the existing solution. Writing everything on a single line > > > > > may even become less readable. Have you ever tried to read an > > > > > Eclipse .classpath file? You can hardly say that's more readeable. > > > > > I also think that mixing attributes with elements is in this case a > > bad idea and would hurt overall consistency. > > > > > > > > > > On 12/17/05, Srepfler Srgjan <srgjan.srepfler@...> wrote: > > > > > > > > > > > > > > > > > > >If your sole concern is the number of lines one must type, it is > > > > > > >certainly an option to have meta-pom.xml be in the format you > > > > > > >find most comfortable, then xslt it into the "more verbose" m2 > > pom.xml. > > > > > > > > > > > > > >This argument of attributes versus elements has existed since the > > > > > > >dawn of [xml] time. I am not trying to argue one way or the > > > > > > >other, but since > > > > > > >m1 pom used the "more verbose" syntax, it eases the transition. > > > > > > > > > > > > > > My USD$0.02, > > > > > > > -- /v\atthew > > > > > > > > > > > > > >----------------------------------------------------------------- > > > > > > >---- > > > > > > > > > > > > > > > > > > > > In fact people should develop a plugin that maps the simplified > > > > > > and verbose schemas on the fly :) The advantage of using > > > > > > namespaces is that you can create a your tag and map it to the > > > > > > verbose tag from the official pom. > > > > > > That's the way I've seen the spring guys use it for now but the > > > > > > advantage that I see is that in could be much easier to extend the > > > > > > pom and it would be more "type safe" > > > > > > > > > > > > My 0.02MKD > > > > > > > > > > > > ------------------------------------------------------------------ > > > > > > --- To unsubscribe, e-mail: users-unsubscribe@... > > > > > > For additional commands, e-mail: users-help@... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > Alexandre Poitras > > > > Québec, Canada > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: users-unsubscribe@... > > > > For additional commands, e-mail: users-help@... > > > > > > > > > > > > > > > > > -- > > > Regards, > > > _____________________________________ > > > Arik Kfir arikkfir@... > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: users-unsubscribe@... > > > For additional commands, e-mail: users-help@... > > > > > > > > > > > > -- > > Regards, > > _____________________________________ > > Arik Kfir arikkfir@... > > > > -- Regards, _____________________________________ Arik Kfir arikkfir@... |
|
|
Re: Is it possible to make pom.xml simpler?+1 on going the Spring 2.0 xml style route. I saw the presentation on
JavaPolis and I liked the conciseness of their new syntax. I'm currently migrating my build to maven 2 and I am not able to do this quickly because of the repetition in the POM 4.0. It is unreadable due to the repetition of dependencies, plugin management etc. Having a shorthand available would make life so much easier. I don't agree with the camp that it is just a matter of taste. If it were, why is Spring adding the simplified support to their configuration file? Not because it is just a matter of taste. Reading this thread, there is a genuine interest in making configuring the pom much simpler. Having such progress would help adoption of maven2 even better. Martijn On 12/18/05, Arik Kfir <arikkfir@...> wrote: > > Don't confuse "shorter" with "more readable". I don't mind going for > the "<id>mygroup/myartiact</id>" instead of attributes. I just wanted > to note that the existing syntax is (perhaps) *too* verbose... > > I definitly agree with your example, and maintainance takes priority > over number-of-source-lines...but when you reach 20..30 dependencies, > things get messy... Some might argue that having 20 dependencies might > indicate a hidden problem, but even with 10 dependencies, combined > with a real-world <build> and <plugins> section, you get a pretty big > POM... > > Anyway, just my 2cents ;-) > > On 12/17/05, Eric Redmond <eric.redmond@...> wrote: > > -0 > > > > Support for both should be out of the question. Double the > documentation, > > double the confusion, double the possibility for error proneness. > > > > Readability is very important. I've never been a big fan of the "less > lines" > > argument. Sure: > > > > if(a!=null){a+=" label";System,out.println(a);} > > > > may be less lines than: > > > > if ( a!=null ) > > { > > a += " label"; > > System,out.println( a ); > > } > > > > However, I'd rather maintain the second than the first. Since > maintinence of > > code (and, by extension, the POM) is a larger percentage of the > development > > lifecycle than the initial writing, that is the more important piece to > > pander too. > > > > I'm all for removing some of the verbosity of the POM. I kind of like > the > > <id>groupId/artifactId</id> syntax. But that's a far cry from cramming > > everything onto a single, unreadable ( hyperbole :) ), line. > > > > Eric > > > > On 12/17/05, Arik Kfir <arikkfir@...> wrote: > > > > > > That's a good point....question is: Is readability of pom.xml a > > > good-enough feature? (which brings us back to a matter of taste > > > hehehee) > > > > > > On 12/17/05, Brian E. Fox <brianf@...> wrote: > > > > "why not keep both camps happy? :) " > > > > > > > > I would personally have them spend time on bugs fixes and new > functional > > > features than rewrite something that is a matter of taste. > > > > > > > > -----Original Message----- > > > > From: Arik Kfir [mailto:arikkfir@...] > > > > Sent: Saturday, December 17, 2005 7:30 AM > > > > To: Maven Users List > > > > Subject: Re: Is it possible to make pom.xml simpler? > > > > > > > > We all agree that it is really a matter of taste. That's precisely > why > > > Maven *should* support another theme. > > > > > > > > I definitly agree that whether attributes are more readable or not > is > > > arguable (at best) - but why not keep both camps happy? :) (if the > costs > > > are reasonable of course) > > > > > > > > > > > > On 12/17/05, Alexandre Poitras <alexandre.poitras@...> wrote: > > > > > A simple XSLT stylesheet would do the job there. You don't need > maven > > > > > to support this format. > > > > > > > > > > On 12/17/05, Thomas Van de Velde <thomas.vdvelde@...> wrote: > > > > > > -1 > > > > > > > > > > > > I agree with Brett. This is a matter of taste. My taste goes > > > > > > towards the existing solution. Writing everything on a single > line > > > > > > may even become less readable. Have you ever tried to read an > > > > > > Eclipse .classpath file? You can hardly say that's more > readeable. > > > > > > I also think that mixing attributes with elements is in this > case a > > > bad idea and would hurt overall consistency. > > > > > > > > > > > > On 12/17/05, Srepfler Srgjan <srgjan.srepfler@...> > wrote: > > > > > > > > > > > > > > > > > > > > > >If your sole concern is the number of lines one must type, it > is > > > > > > > >certainly an option to have meta-pom.xml be in the format you > > > > > > > >find most comfortable, then xslt it into the "more verbose" > m2 > > > pom.xml. > > > > > > > > > > > > > > > >This argument of attributes versus elements has existed since > the > > > > > > > >dawn of [xml] time. I am not trying to argue one way or the > > > > > > > >other, but since > > > > > > > >m1 pom used the "more verbose" syntax, it eases the > transition. > > > > > > > > > > > > > > > > My USD$0.02, > > > > > > > > -- /v\atthew > > > > > > > > > > > > > > > > >----------------------------------------------------------------- > > > > > > > >---- > > > > > > > > > > > > > > > > > > > > > > > In fact people should develop a plugin that maps the > simplified > > > > > > > and verbose schemas on the fly :) The advantage of using > > > > > > > namespaces is that you can create a your tag and map it to the > > > > > > > verbose tag from the official pom. > > > > > > > That's the way I've seen the spring guys use it for now but > the > > > > > > > advantage that I see is that in could be much easier to extend > the > > > > > > > pom and it would be more "type safe" > > > > > > > > > > > > > > My 0.02MKD > > > > > > > > > > > > > > > ------------------------------------------------------------------ > > > > > > > --- To unsubscribe, e-mail: users-unsubscribe@... > > > > > > > For additional commands, e-mail: users-help@... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Alexandre Poitras > > > > > Québec, Canada > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: users-unsubscribe@... > > > > > For additional commands, e-mail: users-help@... > > > > > > > > > > > > > > > > > > > > > > -- > > > > Regards, > > > > _____________________________________ > > > > Arik Kfir arikkfir@... > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: users-unsubscribe@... > > > > For additional commands, e-mail: users-help@... > > > > > > > > > > > > > > > > > -- > > > Regards, > > > _____________________________________ > > > Arik Kfir arikkfir@... > > > > > > > > > > -- > Regards, > _____________________________________ > Arik Kfir arikkfir@... > -- Living a wicket life... Martijn Dashorst - http://www.jroller.com/page/dashorst Wicket 1.1 is out: http://wicket.sourceforge.net/wicket-1.1 |
|
|
Re: Is it possible to make pom.xml simpler?Martijn Dashorst wrote:
> of the repetition in the POM 4.0. It is unreadable due to the repetition of > dependencies, plugin management etc. That's a structural question and *completely* unrelated to the question, how the POM looks syntactically. > I don't agree with the camp that it is just a matter of taste. If it were, > why is Spring adding the simplified support to their configuration file? Because their taste has changed? :-) Jochen --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Is it possible to make pom.xml simpler?Like I said there is nothing that **could** prevent people from doing a
1-1 mapper between a simple-style to complex-style, all that it's important is that there is 1 format in the repositories. If this could help speed up the process of *writing* the code I say it might be welcome. One point though, having seen the humongous xsd for the pom, it's not at all trivial task and it could be more trouble then worth (then again, it could be tackled in many ways, one namespace for a simplified pom, separate namespaces for different things/different plugins). All in all, it *could* be done, I don't know if it *should* be done. The things we end users and you developers should weigh in are these: If you simplify the pom perhaps you could gain more users. If you develop this namespace approach, we'd have to tech the parsers how to deal with these new schemas, we'd have to write new schemas, we'd have a bunch of bugs which would lead to bad user experience and probably a drop in early adopters (like me). I'd go with the more gradual approach, open the infrastructure for use cases where the pom is a flexible, extensible, syntacticly open model. Build the infrastructure and enforce community guidelines for public repositories. That would be what I'd do. Srgjan Srepfler --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Is it possible to make pom.xml simpler?You just need a simple xslt transformation. Just call xalan from
mvn.bat. No need for maven to support two styles.... Everyone complain about those xml configuration files but always forget about the "good side" of using xml. Sicken me.... On 12/18/05, Srepfler Srgjan <srgjan.srepfler@...> wrote: > Like I said there is nothing that **could** prevent people from doing a > 1-1 mapper between a simple-style to complex-style, all that it's > important is that there is 1 format in the repositories. If this could > help speed up the process of *writing* the code I say it might be welcome. > One point though, having seen the humongous xsd for the pom, it's not at > all trivial task and it could be more trouble then worth (then again, it > could be tackled in many ways, one namespace for a simplified pom, > separate namespaces for different things/different plugins). All in all, > it *could* be done, I don't know if it *should* be done. > The things we end users and you developers should weigh in are these: > If you simplify the pom perhaps you could gain more users. > If you develop this namespace approach, we'd have to tech the parsers > how to deal with these new schemas, we'd have to write new schemas, we'd > have a bunch of bugs which would lead to bad user experience and > probably a drop in early adopters (like me). > I'd go with the more gradual approach, open the infrastructure for use > cases where the pom is a flexible, extensible, syntacticly open model. > Build the infrastructure and enforce community guidelines for public > repositories. > That would be what I'd do. > > Srgjan Srepfler > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > -- Alexandre Poitras Québec, Canada --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Is it possible to make pom.xml simpler?I am +1 for the existing format. Supporting more would be a maintenance
add-on. The only thing I can suggest is that may be certain sections could be factored out (something like profiles.xml) into separate files (optional) and merged at build time before the pom is processed. And I think this could be driven by the fact - what are frequently 'touched' sections after an 'initial' POM has been setup for a project. For POMs with looooong list of dependencies, would it be possible to sort the dependencies(or other elements) in an alphabetical order to ensure they can be located easily? .... may be we could whip up a SortMojo ;-) ...... just thinking out loud! cheers, Rahul ----- Original Message ----- From: "Matt Raible" <mraible@...> To: "Maven Users List" <users@...> Sent: Thursday, December 15, 2005 2:06 PM Subject: Is it possible to make pom.xml simpler? After seeing what the Spring Developers have done to simplify Spring context files, I can't help but think the same thing is possible for Maven 2's pom.xml. Is it possible to add namespaces and make something like the following possible? Before: <dependency> <groupId>springframework</groupId> <artifactId>spring</artifactId> <version>1.2.6</version> </dependency> After: <dep:artifact name="org/springframework/spring" version="1.2.6"/> Or just allow attributes to make things a bit cleaner? <dependency groupId="org.springframework" artifactId="spring" version="1.2.6"/> Allowing 1 line instead of 5-6 lines per dependency would allow me to cut my dependencies listing from 140 lines of XML to 37 lines. When the Spring guys allows a couple of elements as attributes (<ref> and <value>) - it made writing Spring context files *much* easier. Here's an example of my simplified version: <dependencies> <dependency groupId="cargo" artifactId="cargo" version="0.6" scope="test"/> <dependency groupId="commons-lang" artifactId="commons-lang" version="2.0"/> <dependency groupId="commons-logging" artifactId="commons-logging" version="1.0.4"/> <dependency groupId="displaytag" artifactId="displaytag" version="1.0" scope="runtime"> <exclusions> <exclusion artifactId="xalan" groupId="xalan"/> </exclusions> </dependency> <dependency groupId="uk.ltd.getahead" artifactId="dwr" version="1.0" scope="runtime"/> <dependency groupId="org.hibernate" artifactId="hibernate" version="3.0.5"> <exclusions> <exclusion artifactId="jta" groupId="javax.transaction"/> </exclusions> </dependency> <dependency groupId="geronimo-spec" artifactId="geronimo-spec-jta" version="1.0.1B-rc4"/> <dependency groupId="jmock" artifactId="jmock" version="1.0.1" scope="test"/> <dependency groupId="junit" artifactId="junit" version="3.8.1" scope="test"/> <dependency groupId="jwebunit" artifactId="jwebunit" version="1.2" scope="test"/> <dependency groupId="httpunit" artifactId="httpunit" version="1.6" scope="test"> <exclusions> <exclusion artifactId="js" groupId="rhino"/> </exclusions> </dependency> <dependency groupId="log4j" artifactId="log4j" version="1.2.11"/> <dependency groupId="postgresql" artifactId="postgresql" version="8.1-404.jdbc3"/> <dependency groupId="javax.servlet" artifactId="servlet-api" version="2.4" scope="provided"/> <dependency groupId="javax.servlet" artifactId="jstl" version="1.1.2" scope="runtime"/> <dependency groupId="taglibs" artifactId="standard" version="1.1.2" scope="runtime"/> <dependency groupId="opensymphony" artifactId="sitemesh" version="2.2.1" scope="runtime"/> <dependency groupId="springmodules" artifactId="springmodules-validator" version="0.1" scope="runtime"/> <dependency groupId="springframework" artifactId="spring" version="1.2.6"/> <dependency groupId="springframework" artifactId="spring-mock" version="1.2.6" scope="test"> <exclusions> <exclusion artifactId="spring-jdbc" groupId="springframework"/> <exclusion artifactId="spring-web" groupId="springframework"/> </exclusions> </dependency> </dependencies> Of course, Ivy's syntax is even simpler, so maybe that'll provide some motivation. ;-) <dependencies> <dependency org="apache" name="commons-lang" rev="2.0" /> <dependency org="apache" name="commons-cli" rev="1.0" /> </dependencies> Matt --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
|
|
|
Re: Is it possible to make pom.xml simpler?SortMojo! Now thats the best idea I've heard yet.
Eric On 12/19/05, Rinku <rahul.thakur.xdev@...> wrote: > > I am +1 for the existing format. Supporting more would be a maintenance > add-on. > > The only thing I can suggest is that may be certain sections could be > factored out (something like profiles.xml) into separate files (optional) > and merged at build time before the pom is processed. And I think this > could > be driven by the fact - what are frequently 'touched' sections after an > 'initial' POM has been setup for a project. > > For POMs with looooong list of dependencies, would it be possible to sort > the dependencies(or other elements) in an alphabetical order to ensure > they > can be located easily? .... may be we could whip up a SortMojo ;-) ...... > just thinking out loud! > > cheers, > Rahul > > > ----- Original Message ----- > From: "Matt Raible" <mraible@...> > To: "Maven Users List" <users@...> > Sent: Thursday, December 15, 2005 2:06 PM > Subject: Is it possible to make pom.xml simpler? > > > After seeing what the Spring Developers have done to simplify Spring > context files, I can't help but think the same thing is possible for > Maven 2's pom.xml. Is it possible to add namespaces and make > something like the following possible? > > Before: > > <dependency> > <groupId>springframework</groupId> > <artifactId>spring</artifactId> > <version>1.2.6</version> > </dependency> > > After: > > <dep:artifact name="org/springframework/spring" version="1.2.6"/> > > Or just allow attributes to make things a bit cleaner? > > <dependency groupId="org.springframework" artifactId="spring" > version="1.2.6"/> > > Allowing 1 line instead of 5-6 lines per dependency would allow me to > cut my dependencies listing from 140 lines of XML to 37 lines. When > the Spring guys allows a couple of elements as attributes (<ref> and > <value>) - it made writing Spring context files *much* easier. > > Here's an example of my simplified version: > > <dependencies> > <dependency groupId="cargo" artifactId="cargo" version="0.6" > scope="test"/> > <dependency groupId="commons-lang" artifactId="commons-lang" > version="2.0"/> > <dependency groupId="commons-logging" artifactId="commons-logging" > version="1.0.4"/> > <dependency groupId="displaytag" artifactId="displaytag" > version="1.0" scope="runtime"> > <exclusions> > <exclusion artifactId="xalan" groupId="xalan"/> > </exclusions> > </dependency> > <dependency groupId="uk.ltd.getahead" artifactId="dwr" > version="1.0" scope="runtime"/> > <dependency groupId="org.hibernate" artifactId="hibernate" > version="3.0.5"> > <exclusions> > <exclusion artifactId="jta" groupId="javax.transaction"/> > </exclusions> > </dependency> > <dependency groupId="geronimo-spec" artifactId="geronimo-spec-jta" > version="1.0.1B-rc4"/> > <dependency groupId="jmock" artifactId="jmock" version="1.0.1" > scope="test"/> > <dependency groupId="junit" artifactId="junit" version="3.8.1" > scope="test"/> > <dependency groupId="jwebunit" artifactId="jwebunit" version="1.2" > scope="test"/> > <dependency groupId="httpunit" artifactId="httpunit" version="1.6" > scope="test"> > <exclusions> > <exclusion artifactId="js" groupId="rhino"/> > </exclusions> > </dependency> > <dependency groupId="log4j" artifactId="log4j" version="1.2.11"/> > <dependency groupId="postgresql" artifactId="postgresql" > version="8.1-404.jdbc3"/> > <dependency groupId="javax.servlet" artifactId="servlet-api" > version="2.4" scope="provided"/> > <dependency groupId="javax.servlet" artifactId="jstl" > version="1.1.2" scope="runtime"/> > <dependency groupId="taglibs" artifactId="standard" > version="1.1.2" scope="runtime"/> > <dependency groupId="opensymphony" artifactId="sitemesh" > version="2.2.1" scope="runtime"/> > <dependency groupId="springmodules" > artifactId="springmodules-validator" version="0.1" scope="runtime"/> > <dependency groupId="springframework" artifactId="spring" > version="1.2.6"/> > <dependency groupId="springframework" artifactId="spring-mock" > version="1.2.6" scope="test"> > <exclusions> > <exclusion artifactId="spring-jdbc" groupId="springframework"/> > <exclusion artifactId="spring-web" groupId="springframework"/> > </exclusions> > </dependency> > </dependencies> > > Of course, Ivy's syntax is even simpler, so maybe that'll provide some > motivation. ;-) > > <dependencies> > <dependency org="apache" name="commons-lang" rev="2.0" /> > <dependency org="apache" name="commons-cli" rev="1.0" /> > </dependencies> > > Matt > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > |
| < Prev | 1 - 2 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |