Alex Collins created MNG-5392:
---------------------------------

             Summary: Support XMl attributes for simple data types in POM
                 Key: MNG-5392
                 URL: https://jira.codehaus.org/browse/MNG-5392
             Project: Maven 2 & 3
          Issue Type: New Feature
          Components: POM
    Affects Versions: 3.0.4
            Reporter: Alex Collins
            Priority: Minor


Maven's XML format can be a bit verbose. For example, a dependency takes 5 
lines:

<dependency>
            <groupId>com.ingg.common</groupId>
            <artifactId>common-scala</artifactId>
            <version>1.0.5</version>
        </dependency>

This means that in an editor like mine, you can only see 5 dependencies at 
once. 

I could compact this like this:

        
<dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>4.4</version><scope>test</scope></dependency>

But (1) this is too wide for my editor at 129 chars and (2) someone will 
reformat it at some point! For simple data types (e.g. string or ints) if we 
could use attributes here it'd be shorter.

        <dependency groupId="junit" artifactId="junit" version="4.4" 
scope="test/>

This would reduce tying by about 30%. Homing would faster too, making editing 
POMs faster, as you don't have to cursor about to find the bit you want. 
Finally, as more data is displayed (I could see 25 dependencies where before I 
could see only 5, a 500% increase in this example), it'll make a project easier 
and faster to understand.

This also applies to other XML elements:

<resource directory="src/main/resources" filtering="true"/>

I might attach a completely reduced pom later on.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to