maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yoda Koda II <james.gust...@tiscali.co.uk>
Subject RE: maven-ejb-plugin & was6-maven-plugin generated jar files
Date Fri, 19 Jun 2009 12:54:01 GMT

if ( workingDirectorySubdirs.length == 1 )
        {
            // copy sources
            File generatedSources = new File( workingDirectorySubdirs[0],
getMavenProject().getBuild().getFinalName() + File.separator + "ejbModule"
);
            try
            {
                FileUtils.copyDirectory( generatedSources,
getGeneratedSourcesDirectory() );
                FileUtils.deleteDirectory( new File(
getGeneratedSourcesDirectory(), "META-INF" ) );
            }
            catch ( IOException e )
            {
            	getLog().warn( "No sources were copied: " + e.getMessage() );
            }

            List compileSourceRoots =
getMavenProject().getCompileSourceRoots();
            compileSourceRoots.add( getGeneratedSourcesDirectory().getPath()
);

            // copy generated classes
            File generatedClasses =
                new File( workingDirectorySubdirs[0],
getMavenProject().getBuild().getFinalName() + File.separator +
                    "build" + File.separator + "classes" );

            try
            {
                FileUtils.copyDirectory( generatedClasses,
getGeneratedClassesDirectory() );
                Resource resource = new Resource();
                resource.setDirectory(
getGeneratedClassesDirectory().getPath() );
                getMavenProject().getResources().add( resource );
            }
            catch ( IOException e )
            {
            	getLog().warn( "No classes were copied: " + e.getMessage() );
            }
        }
        else
        {
            getLog().warn( "No sources were generated" );
        }

        getLog().info( "ejbDeploy finished" );



Pacileo, Ken wrote:
> 
> 
> Can you post the code you used to change the exception to just log
> warnings?
> 
> Regards,
> Ken
> 
> 

-- 
View this message in context: http://www.nabble.com/maven-ejb-plugin---was6-maven-plugin-generated-jar-files-tp23061582p24110743.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message