Details
Description
<testCases>true</testCases> <runTestCasesAsUnitTests>true</runTestCasesAsUnitTests>
The generated test-cases are not generated in the correct dir : the dir doesn't match the package of the class files. It seems package space is partially used
Activity
Dennis Lundberg
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Key | MOJO-715 |
|
| Component/s | axistools [ 12076 ] | |
| Project | Mojo [ 11062 ] | Maven 2.x Axis Tools Plugin [ 11697 ] |
Carlos Sanchez
made changes -
| Patch Submitted | [Yes] |
David Pilato
made changes -
| Attachment | axistools-maven-plugin-1.3.CIDPATCH.jar [ 48234 ] |
David Pilato
made changes -
| Attachment | axis-19-patch.txt [ 48235 ] |
Dennis Lundberg
made changes -
| Description |
<testCases>true</testCases> <runTestCasesAsUnitTests>true</runTestCasesAsUnitTests> The generated test-cases are not generated in the correct dir : the dir doesn't match the package of the class files. It seems package space is partially used |
{code:xml}
<testCases>true</testCases> <runTestCasesAsUnitTests>true</runTestCasesAsUnitTests> {code} The generated test-cases are not generated in the correct dir : the dir doesn't match the package of the class files. It seems package space is partially used |
| Component/s | wsdl2java [ 14500 ] |
Dennis Lundberg
made changes -
| Status | Open [ 1 ] | Closed [ 6 ] |
| Assignee | Dennis Lundberg [ dennislundberg ] | |
| Fix Version/s | 1.4 [ 14915 ] | |
| Resolution | Fixed [ 1 ] |
Please find patch here. You can find below the new method that handles correctly the destination dir of generated test cases, so that mvn eclipse:eclipse will work correctly
private void migrateTestSource()
throws AxisPluginException
{
String path = StringUtils.replace(packageSpace, '.', File.separatorChar);
File testSourceDirectoryIncludingPackageName = new File(testSourceDirectory, path);
if ( !testSourceDirectoryIncludingPackageName.exists() )
{ testSourceDirectoryIncludingPackageName.mkdirs(); }Set testSources = locateTestSources();
for ( Iterator iter = testSources.iterator(); iter.hasNext(); )
{
File source = (File) iter.next();
try
{ FileUtils.copyFileToDirectory( source, testSourceDirectoryIncludingPackageName ); FileUtils.fileDelete( source.getAbsolutePath() ); }catch ( IOException ioe )
{ throw new AxisPluginException( "error copying test sources", ioe ); }}
project.addTestCompileSourceRoot( testSourceDirectory.getPath() );
}