You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Gonfi den Tschal <go...@gmail.com> on 2013/07/25 00:40:35 UTC

Maven / javac does not compile classes to target folder

I have a maven multi-module project where a module ends in SUCCESS, but the
generated jar file is empty, and then the next module fails of course
because of missing classes.

The culprit is that the compilation puts nothing into the target folder,
even though it says it compiles the 217 classes. No error whatsoever. Maybe
the words "Stale source detected" ring some bells?

I've explained the case in detail here:
http://stackoverflow.com/questions/17838714/maven-javac-does-not-compile-classes-to-target-folder

Any hint what to try next or an idea for a workaround much appreciated
*sigh*

Re: Maven / javac does not compile classes to target folder

Posted by Olivier Lamy <ol...@apache.org>.
2013/7/26 Wayne Fay <wa...@gmail.com>:
>> wayne, thanks a lot for your response, it helped to figure out what's going
>> on.
>
> I'm very glad to hear it!
>
>> i was wondering if maven could detect that javac does not end successfully,
>> and then abort and blame the compilation directly instead of building an
>
> I agree this sounds like a reasonable change to Maven. I'm a bit
> surprised it is not already handled -- you'd think javac would error
> with a status indicating "error" which Maven would pick up and report
> back to the user. If you have a few minutes, could I convince you to
> post a JIRA defect against hmmm maven-compiler-plugin or perhaps
> plexus-compiler? This assumes you have a Xircles account etc.
>
>> i've found a workaround for my compilation, so for me the case is closed.
>> thanks again!

A bit weird a sample project could help
BTW did you read
http://maven.apache.org/plugins/maven-compiler-plugin/ the first
sentence regarding using javac?

>
> Could you let us know the workaround, so if/when someone else has this
> trouble, they know what to do about it?
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>



-- 
Olivier Lamy
Ecetera: http://ecetera.com.au
http://twitter.com/olamy | http://linkedin.com/in/olamy

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


Re: Maven / javac does not compile classes to target folder

Posted by Wayne Fay <wa...@gmail.com>.
> wayne, thanks a lot for your response, it helped to figure out what's going
> on.

I'm very glad to hear it!

> i was wondering if maven could detect that javac does not end successfully,
> and then abort and blame the compilation directly instead of building an

I agree this sounds like a reasonable change to Maven. I'm a bit
surprised it is not already handled -- you'd think javac would error
with a status indicating "error" which Maven would pick up and report
back to the user. If you have a few minutes, could I convince you to
post a JIRA defect against hmmm maven-compiler-plugin or perhaps
plexus-compiler? This assumes you have a Xircles account etc.

> i've found a workaround for my compilation, so for me the case is closed.
> thanks again!

Could you let us know the workaround, so if/when someone else has this
trouble, they know what to do about it?

Wayne

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


Re: Maven / javac does not compile classes to target folder

Posted by Gonfi den Tschal <go...@gmail.com>.
wayne, thanks a lot for your response, it helped to figure out what's going
on.

it's indeed javac that aborts (yes aborts, no error, it just quits).
something with annotations in enum constructors, it's not reported to the
javac mailing list
http://mail.openjdk.java.net/pipermail/compiler-dev/2013-July/006902.html

i was wondering if maven could detect that javac does not end successfully,
and then abort and blame the compilation directly instead of building an
empty jar and going on, which takes longer to find the real issue. but then
again i seem to be the only person affected by this ...

i've found a workaround for my compilation, so for me the case is closed.
thanks again!




On Thu, Jul 25, 2013 at 3:45 AM, Wayne Fay <wa...@gmail.com> wrote:

> > Any hint what to try next or an idea for a workaround much appreciated
> > *sigh*
>
> In the future, sighs are unnecessary.
>
>
> > The culprit is that the compilation puts nothing into the target folder,
> > even though it says it compiles the 217 classes. No error whatsoever.
> Maybe
> > the words "Stale source detected" ring some bells?
>
> Can you please try "mvn -X compile" and then copy/paste the javac line
> that Maven shows you to see if this works/compiles fine with javac or
> not? If it works with javac with no issues, then we probably have a
> Maven issue somewhere. But if javac doesn't like it, then you can't
> really expect Maven to do much for you.
>
> You said it works in IntelliJ but this does not necessarily tell me
> that it works in plain command-line javac. There are "lots" of things
> that IDEs do to "help" people out. Please test that first.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Maven / javac does not compile classes to target folder

Posted by Wayne Fay <wa...@gmail.com>.
> Any hint what to try next or an idea for a workaround much appreciated
> *sigh*

In the future, sighs are unnecessary.


> The culprit is that the compilation puts nothing into the target folder,
> even though it says it compiles the 217 classes. No error whatsoever. Maybe
> the words "Stale source detected" ring some bells?

Can you please try "mvn -X compile" and then copy/paste the javac line
that Maven shows you to see if this works/compiles fine with javac or
not? If it works with javac with no issues, then we probably have a
Maven issue somewhere. But if javac doesn't like it, then you can't
really expect Maven to do much for you.

You said it works in IntelliJ but this does not necessarily tell me
that it works in plain command-line javac. There are "lots" of things
that IDEs do to "help" people out. Please test that first.

Wayne

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