[ 
https://issues.apache.org/jira/browse/MPLUGIN-172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Osipov closed MPLUGIN-172.
----------------------------------
    Resolution: Auto Closed

This issue has been auto closed because it has been inactive for a long period 
of time. If you think this issue still applies, retest your problem with the 
most recent version of Maven and the affected component, reopen and post your 
results.

> The basedir property is not changed when called from an imported file. 
> -----------------------------------------------------------------------
>
>                 Key: MPLUGIN-172
>                 URL: https://issues.apache.org/jira/browse/MPLUGIN-172
>             Project: Maven Plugin Tools
>          Issue Type: Bug
>          Components: maven-plugin-tools-ant
>         Environment: Windows XP professional edition
>            Reporter: Sander Rensen
>            Priority: Major
>         Attachments: Temp.zip, settings.xml, 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 was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to