Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing Groovy in POM file for delimiter switching works differently for different developers
    primarykey
    data
    text
    <p>We are using a small segment of Groovy code within our POM file to replace the backslash delimiters in the main base directory with forward slash delimiters. For more information on this, see this post: <a href="https://stackoverflow.com/questions/3872355/how-to-convert-file-separator-in-maven">How to convert file separator in maven</a></p> <p>However, the problem we have is that the suggested groovy from that link works fine on one developers machine, but not on another.</p> <p>What works for the first developer is this: (The code mentioned in the linked post)</p> <pre><code>pom.properties['main.basedir']=project.basedir.absolutePath.replace('\\','/'); </code></pre> <p>What works for the other developer is the following:</p> <pre><code>pom.properties['main.basedir']=project.basedir.absolutePath.replace('\','/'); </code></pre> <p>(Note the single backslash)</p> <p>The errors that the second developer sees when using the double backslash are:</p> <pre><code>[INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1:15.096s [INFO] Finished at: Tue Sep 03 16:54:18 BST 2013 [INFO] Final Memory: 36M/298M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.gmaven:gmaven-plugin:1.5:execute (setproperty) on project bonus-wallet-amq-tests: startup failed, script1378223658221.groovy: 1: expecting ''', found '&lt;EOF&gt;' @ line 1, column 79. [ERROR] 1 error </code></pre> <p>We can't work out why the second developer only needs the single backslash. Both developers are using Eclipse Juno, Java 1.6 Update 45 and the version of groovy must be the same as it is defined as a dependency in the POM file. (Version 1.6.9)</p> <p>The only thing we found was the versions of maven being different. Developer 1 has version 3.0.3 and developer 2 has version 3.0.5. However we have been unable to find any documentation that may relate to this.</p> <p>Any help would be most beneficial.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload