Changeset 268


Ignore:
Timestamp:
2008-05-30 08:12:24 (5 years ago)
Author:
bruno
Message:

runtime scripts: build classpath the same way for dev and release mode, don't know if there's a good reason not to.

File:
1 edited

Legend:

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

    r199 r268  
    7575 
    7676        def classpath = "" 
    77         if (isRelease) { 
    78             artifacts.eachWithIndex( 
    79                     { entry, i -> 
    80                         classpath += "\$M2_REPO" + "/" + new File(localRepository.pathOf(entry)).getPath() 
    81                         if (i < artifacts.size() - 1) 
    82                             classpath += ":\\\n" 
    83                     } 
    84             ); 
    85         } else { 
    86             artifacts.eachWithIndex( 
    87                     { entry, i -> 
    88                         classpath += entry.getFile().getPath(); 
    89                         if (i < artifacts.size() - 1) 
    90                             classpath += ":\\\n" 
    91                     } 
    92             ); 
    93         } 
     77        artifacts.eachWithIndex( 
     78                { entry, i -> 
     79                    classpath += "\$M2_REPO" + "/" + new File(localRepository.pathOf(entry)).getPath() 
     80                    if (i < artifacts.size() - 1) 
     81                        classpath += ":\\\n" 
     82                } 
     83        ); 
     84 
     85        def allCliArgs = '"\$@"'; // defining this here because IDEA gives error when embedding this in a GString (yes, lame) 
    9486 
    9587        def script = """\ 
     
    113105KAURI_LOG_OPTS="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog -Dorg.apache.commons.logging.simplelog.defaultlog=error" 
    114106 
    115 "\$JAVA_HOME/bin/java" \$KAURI_JAVA_OPTIONS \$KAURI_LOG_OPTS ${mainClass} "\$@" 
     107"\$JAVA_HOME/bin/java" \$KAURI_JAVA_OPTIONS \$KAURI_LOG_OPTS ${mainClass} ${allCliArgs} 
    116108""" 
    117109 
     
    130122 
    131123        def classpath = "" 
    132         if (isRelease) { 
    133             for (entry in artifacts) { 
    134                 classpath += "%M2_REPO%" + "\\" + new File(localRepository.pathOf(entry)).getPath() + ";" 
    135             } 
    136         } else { 
    137             for (entry in artifacts) { 
    138                 classpath += entry.getFile().getPath() + ";" 
    139             } 
     124        for (entry in artifacts) { 
     125            classpath += "%M2_REPO%" + "\\" + new File(localRepository.pathOf(entry)).getPath() + ";" 
    140126        } 
    141127 
Note: See TracChangeset for help on using the changeset viewer.