[
http://jira.codehaus.org/browse/MPLUGIN-172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=229260#action_229260
]
Sander Rensen commented on MPLUGIN-172:
---------------------------------------
Hi Paul, Benjamin,
Thanks you for your comments. I have been using Maven 2.0.9 version. I don't
encounter the same problem and therefore the refered use case is not valid.
The problem I have is that the basedir property used by Ant seems to be a fixed
path when I run it with Maven. This is given me problems as I have to import a
file that contains the basedir property. This basedir property should then
point to the directory of where the imported file is allocated. This works fine
when called from Ant directly, but when I run it with Maven it returns the
fixed path of the directory I run the Maven task from and this should not
happen. Is there any known issue about this problem?
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