Hello there, I am working on Maven 2 for quite a while now. I like the tool a lot, it helps the developers -and- the project leads. It is a real gift.
I feel however that there is a (major?) issue with the propery management in Maven. In both the concept and the implementation. {settings.xml} The settings.xml seems to be the perfect place to put certain values specificly for one (single) user for several projects. Examples of such a settings would be a SUbversion username or a database password. Also the settings.xml could contain specific proxy host and port values (and authentication data for that single user). {profiles.xml} It is obvious that the settings.xml can not contain data for one single project. I feel that there must be specific file containing the different values per project. Indeed, the profiles.xml can be used to specify project specific properties. Sadly one can not use: myproperty = abc=def The the model parser will throw exceptions. One has to use the <myproperty><![CDATA[abc=def]]></myproperty> in stead. This is not a good way to specify properties, I believe. Also, property handling is not very powerful. When specifying 4 properties: <database-type>mysql</database-type> <database-host>localhost</database-host> <database-port>3306</database-port> <database-name>foobar</database-name> And trying to use these properties in the same profile: <database-url> jdbc:${database-type}://${database-host}:${database-port}/${database-name} </databse-url> The ${database-url} would return jdbc:null://null:null/null {model needs improvement} Also the profile.xml model is tiny. A profile only contains properties and activation elements (and reposiotories - but they do not take part in this property handling topic). This is far too little: it would be good to be able to specify much more in a profile (almost as much as in a regular om model, I would assume). Also conditional execution would be handy in the profile.xml. Say we are building a war that should run on several application servers. One could specify several plugins to start|stop|deploy|undeploy the web server or activate or deactivate the built application in the pom.xml. This would result in a pom.xml that is too big and incomplete. It would be much nicer to be able to add plugins when certain properties are set. For example, one could specify webserver.name = jetty6x in a ${project.name}.properties file (or in the upgraded profile.xml). When such a file read by Maven (before processing the pom.xml) the pom could be filled with extra (conditional) plugins following the guidelines in the ${project.name}.properties (or profiles.xml) file. The same example can be given regarding database access. [I know some issues could arrise as specified in http://maven.apache.org/guides/introduction/introduction-to-profiles.html, at the 'profile pitfalls' section. Solution can be found for this.] Many property handling issues (related to this rant) can be found: http://www.nabble.com/-m2-property-filtering-at-runtime-question-t1296364.html#a3451790 http://www.nabble.com/conditionally-loading-property-files-t1412492.html#a3806540 http://www.nabble.com/Maven-2.0.4-problem-with-properties-t1445796.html#a3905175 http://www.nabble.com/maven-2-specify-properties-file-t461893.html#a1260787 http://www.nabble.com/Maven-properties-inside-java-code-t209452.html#a584456 Maven 2 is indeed much cleaner, more elegant and more powerful, but Ant's property management is plainly better designed and implemented, I believe. Any remarks on this? I might be totally of mark. Am I? Jan -- View this message in context: http://www.nabble.com/-m2-2.0.4-Property-Management-t1533316.html#a4165556 Sent from the Maven - Users forum at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]