You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Sander Rensen (JIRA)" <ji...@codehaus.org> on 2010/08/04 10:11:32 UTC

[jira] Commented: (MPLUGIN-172) The basedir property is not changed when called from an imported file.

    [ http://jira.codehaus.org/browse/MPLUGIN-172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=230812#action_230812 ] 

Sander Rensen commented on MPLUGIN-172:
---------------------------------------

Hi Paul,

I have been away and could not respond earlier. I have updated my pom maven-plugin-plugin to version 2.6 and did a clean install followed by the command mvn testcompile:testcompile. The same issue occurs. 

I hope you can help me futher with the issue.

Many Thanks

Sander

> The basedir property is not changed when called from an imported file. 
> -----------------------------------------------------------------------
>
>                 Key: MPLUGIN-172
>                 URL: http://jira.codehaus.org/browse/MPLUGIN-172
>             Project: Maven 2.x Plugin Tools
>          Issue Type: Bug
>         Environment: Windows XP professional edition
>            Reporter: Sander Rensen
>         Attachments: settings.xml, Temp.zip, test-auto-compile.zip
>
>
> Dear Maven developers,
> I want to call an ant script from maven using mojos. The issue I am facing is that the basedir property does not change the moment this property is used within an imported file. This needs to happen as the basedir from the imported file is allocated in a different directory then the directory I am calling the maven mojo from. Let me explain with an example I have attached. 
> 1. Please first extract the zip file test-auto-compile.zip. Install the mojo plugin (mvn clean install). 
> 2. Make sure in the maven repository the settings xml file is changed. I have attached this file separately.  I have included a  <pluginGroup>test-auto-compile</pluginGroup> in the settings.xml file.
> 3. Make sure the files ant-sca-package.xml and ant-sca-compile.xml are copied in C:/Temp. For this please extract the zip file Temp.zip.
> 4. run the test-auto-compile project typing: mvn testcompile:testcompile. 
> 5. The error is: Cannot find D:\SopraGroup\Development\PoC\Mavin\test-auto-compile/ant-sca-compil
> e.xml imported from C:\Temp\ant-sca-package.xml. 
> The file ant-sca-package.xml is imported from the build.xml file. This file ant-sca-package.xml imports the ant-sca-compile file. This file is imported using: <import file="${basedir}/ant-sca-compile.xml"/>
> The basedir should be the directory from where the ant-sca-package is imported. In this case c:/Temp. However it tries to find the ant-sca-compile.xml file in the maven directory as his basedir. 
> When I am calling the same ant script directly from ant then the basedir changes and the ant script is completed successfully. 
> The solution to this issue is very simple by changing the import statement in the ant-sca-compile file. However I am not aloud to change this file!! 
> I hope you can assist with this bug.
> Many Thanks
> Sander Rensen 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira