Ellen Spertus
Ellen Spertus

Reputation: 6805

Breaking strings into different lines in ant build.xml files

I'd like to know how to shorten lines containing long string literals in my ant build.xml file. For example:

<target name="foo"
        description="I sure do have a lot to say.  Blah Blah.  This is getting awfully wide, etc."
        depends="A,B,C,D,E,F,G,H,I,...,ZZ">
  ...
</target>

Obviously, I could shorten the depends attribute value by creating a tree of dependencies, but that wouldn't work in other cases, such as the description. What's the right way to handle this?

Upvotes: 6

Views: 3119

Answers (1)

JB Nizet
JB Nizet

Reputation: 691755

Insert a newline:

<target name="foo"
        description="I sure do have a lot to say.  Blah Blah.  
                     This is getting awfully wide, etc."
        depends="A,B,C,D,E,F,
                 G,H,I,...,ZZ">
  ...
</target>

Upvotes: 8

Related Questions