[ http://jira.codehaus.org/browse/MOJO-366?page=comments#action_63733 ]
Emanuel Bulic commented on MOJO-366:
------------------------------------
That's true. but I don't think that is applicable in my case. I don't use a
javac compiler at all in the custom artifact type I created (bndl). I
substituteed the compile-plugin in the compile and test-compile phases with the
aspectj compiler plugin. Here's the plexus configuration:
<component>
<role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
<role-hint>bndl</role-hint>
<implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
<configuration>
<phases>
<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>
<compile>org.codehaus.mojo:aspectj-maven-plugin:compile</compile>
<process-test-resources>org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources>
<test-compile>org.codehaus.mojo:aspectj-maven-plugin:test-compile</test-compile>
<test>com.dcx.NGST:maven-ajtest-plugin:test</test>
<package>com.dcx.NGST:maven-bundle-plugin:jar,com.dcx.NGST:maven-bundle-plugin:test-jar</package>
<install>org.apache.maven.plugins:maven-install-plugin:install</install>
<deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
</phases>
</configuration>
</component>
I think I have an explanation for this: I found that the
AbstractAjcCompiler.isBuildNeeded(0 method compares each source file's
timestamp to the arguments file timestamp, which seems incorrect to me, because
the args file will be touched regardless of the compilation process. Since the
args file's timestamp is updated, and I hadn't made any changes to any of the
source files before kicking off another build, the timestamp check will return
false, and compilation process will be skipped.
Tipically, most people would compile, get an error, make corrections and
compile again, in which case the timestamp comparison works, but I think it
should check each source file against it's class file. I might step away from
my desk, and come back later... I may run a build just to figure out where I
am, and not follow the normal sequence.
> aspectj:compile and testCompile fails if no source files are present
> --------------------------------------------------------------------
>
> Key: MOJO-366
> URL: http://jira.codehaus.org/browse/MOJO-366
> Project: Mojo
> Type: Bug
> Components: aspectj
> Reporter: Emanuel Bulic
> Assignee: Kaare Nilsen
> Attachments: classesbuilddef.lst
>
>
> I have several projects either without a source directory or without a
> testsrc directory. the compile fails is no source file ar present
--
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