0

I have this groovy plugin to replace my project.basedir with \\ to /. This work fine in my console.

<plugin>
   <groupId>org.codehaus.groovy.maven</groupId>
   <artifactId>gmaven-plugin</artifactId>
  <executions>
     <execution>
        <id>set-unixy_build_directory!</id>
        <phase>compile</phase>
            <goals>
                <goal>execute</goal>
            </goals>
            <configuration>
               <properties>
                   <download>${project.basedir}</download>
               </properties>
               <classpath>
                  <element>
                     <groupId>commons-lang</groupId>
                     <artifactId>commons-lang</artifactId>
                     <version>2.4</version>
                   </element>
               </classpath>
               <source>
                  println project.properties['download']
                  project.properties['download'] = 
                  project.properties['download'].replace('\\', '/');
                  println project.properties['download']
                </source>
            </configuration>
        </execution>
      </executions>
    </plugin>

But, when I access this variable in my .properties file, I get unmodified value. This is how I access this property:

${download}

chrome.additional.capabilities={"prefs":
{"download.default_directory":"${download}","disable-popup-blocking":"true"}}}

Any suggestions?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.