[ http://jira.codehaus.org/browse/MOJO-336?page=all ]
Kaare Nilsen closed MOJO-336:
-----------------------------
Resolution: Duplicate
> goal compile throws exception when src/main/java doesn't exist
> --------------------------------------------------------------
>
> Key: MOJO-336
> URL: http://jira.codehaus.org/browse/MOJO-336
> Project: Mojo
> Type: Bug
> Components: aspectj
> Environment: linux
> Reporter: M. van der Plas
> Assignee: Kaare Nilsen
>
>
> I've create a profile in our companies generic root pom to use aspectj.
> In the configuration of the aspectj plugin I've added the goals compile and
> test-compile.
> Sometimes a project only consists of test classes, with the src/main/java
> directory non-existent.
> When the profile for these projects is activated, I get the exception listed
> below.
> Is it possible to ignore this exception ?
> ERROR] FATAL ERROR
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] basedir D:\workspace\tracetest\src\main\java does not exist
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Trace
> java.lang.IllegalStateException: basedir D:\workspace\tracetest\src\main\java
> does not exist
> at
> org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:542)
> at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1402)
> at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1368)
> at
> org.codehaus.mojo.aspectj.AjcHelper.getBuildFilesForSourceDirs(AjcHelper.java:137)
> at
> org.codehaus.mojo.aspectj.AbstractAjcCompiler.execute(AbstractAjcCompiler.java:272)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
> at java.lang.reflect.Method.invoke(Method.java:391)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
--
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