Changeset 146


Ignore:
Timestamp:
2008-04-03 09:15:05 (5 years ago)
Author:
bruno
Message:

Unix script: put each classpath entry on a new line to improve readability

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/genscript-plugin/src/main/groovy/GenerateScriptMojo.groovy

    r143 r146  
    7676        def classPath = "" 
    7777        if (isRelease) { 
    78             for (entry in artifacts) { 
    79                 classPath += "\$M2_REPO" + "/" + new File(localRepository.pathOf(entry)).getPath() + ":" 
    80             } 
     78            artifacts.eachWithIndex( 
     79                    { entry, i -> 
     80                        classPath += "\$M2_REPO" + "/" + new File(localRepository.pathOf(entry)).getPath() 
     81                        classPath += entry.getFile().getPath(); 
     82                        if (i < artifacts.size() - 1) 
     83                            classPath += ":\\\n" 
     84                    } 
     85            ); 
    8186        } else { 
    82             for (entry in artifacts) { 
    83                 classPath += entry.getFile().getPath() + ":" 
    84             } 
     87            artifacts.eachWithIndex( 
     88                    { entry, i -> 
     89                        classPath += entry.getFile().getPath(); 
     90                        if (i < artifacts.size() - 1) 
     91                            classPath += ":\\\n" 
     92                    } 
     93            ); 
    8594        } 
    8695 
     
    97106M2_REPO=${localRepositoryLocation} 
    98107 
    99 CLASSPATH=${classPath}:\$KAURI_CLI_CLASSPATH 
     108CLASSPATH=\\ 
     109${classPath}:\\ 
     110\$KAURI_CLI_CLASSPATH 
    100111 
    101112export CLASSPATH 
Note: See TracChangeset for help on using the changeset viewer.