You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mick Knutson <mk...@baselogic.com> on 2009/02/05 15:29:54 UTC

help enabling assertions in the compiler plugin.

I have tried this, but I get a compiler error:

            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    *<compilerArgument>-ea</compilerArgument>*

                </configuration>
            </plugin>

I get this error:
*Failure executing javac, but could not parse the error:
javac: invalid flag: -ea
Usage: javac <options> <source files>
use -help for a list of possible options

*

I also tried -enableassertions

---
Thank You…

Mick Knutson, President

BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233

Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Twitter: http://twitter.com/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---

Re: help enabling assertions in the compiler plugin.

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

that should of course be 'of course they are not supported' ... opps ;)

Johan Lindquist wrote:
> Of course they are - I wasn't stating otherwise ...
> 
> Johan
> 
> Jochen Wiedmann wrote:
>> On Thu, Feb 5, 2009 at 3:59 PM, Johan Lindquist <jo...@kawoo.co.uk> wrote:
> 
>>> The compilerArguments are passed directly to javac executable as far as
>>> I can tell and javac does not support these flags.
>> Obviously not. Assertions are enabled or disabled at runtime, not at
>> compile time. These flags are supported by java, not javac.
> 
>> Jochen
> 
> 
> 

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



- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJiwXZpHYnED7evioRAkY1AJ98vUD9PyL7l6FB3FBhbmon13G+IACfeEGv
+xi9KwI3al3IHMiodY7Ei+o=
=g28X
-----END PGP SIGNATURE-----

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


Re: help enabling assertions in the compiler plugin.

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Of course they are - I wasn't stating otherwise ...

Johan

Jochen Wiedmann wrote:
> On Thu, Feb 5, 2009 at 3:59 PM, Johan Lindquist <jo...@kawoo.co.uk> wrote:
> 
>> The compilerArguments are passed directly to javac executable as far as
>> I can tell and javac does not support these flags.
> 
> Obviously not. Assertions are enabled or disabled at runtime, not at
> compile time. These flags are supported by java, not javac.
> 
> Jochen
> 
> 

- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJiwUhpHYnED7evioRAqygAJ9z7gl0s5fIujF3sWCIUMwexYt4IgCbB1uF
9boXzQ/agEXpinczPDvwo2I=
=CeUi
-----END PGP SIGNATURE-----

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


Re: help enabling assertions in the compiler plugin.

Posted by Jochen Wiedmann <jo...@gmail.com>.
On Thu, Feb 5, 2009 at 3:59 PM, Johan Lindquist <jo...@kawoo.co.uk> wrote:

> The compilerArguments are passed directly to javac executable as far as
> I can tell and javac does not support these flags.

Obviously not. Assertions are enabled or disabled at runtime, not at
compile time. These flags are supported by java, not javac.

Jochen


-- 
I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure out
how to use my telephone.

    -- (Bjarne Stroustrup,
http://www.research.att.com/~bs/bs_faq.html#really-say-that
       My guess: Nokia E50)

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


Re: help enabling assertions in the compiler plugin.

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The compilerArguments are passed directly to javac executable as far as
I can tell and javac does not support these flags.

Could you use the MAVEN_OPTS environment variable to enable assertions
in within the Maven code perhaps?

Cheers,

Johan

Mick Knutson wrote:
> I have tried this, but I get a compiler error:
> 
>             <plugin>
>                 <artifactId>maven-compiler-plugin</artifactId>
>                 <configuration>
>                     *<compilerArgument>-ea</compilerArgument>*
> 
>                 </configuration>
>             </plugin>
> 
> I get this error:
> *Failure executing javac, but could not parse the error:
> javac: invalid flag: -ea
> Usage: javac <options> <source files>
> use -help for a list of possible options
> 
> *
> 
> I also tried -enableassertions
> 
> ---
> Thank You…
> 
> Mick Knutson, President
> 
> BASE Logic, Inc.
> Enterprise Architecture, Design, Mentoring & Agile Consulting
> p. (866) BLiNC-411: (254-6241-1)
> f. (415) 685-4233
> 
> Website: http://baselogic.com
> Linked IN: http://linkedin.com/in/mickknutson
> Twitter: http://twitter.com/mickknutson
> Vacation Rental: http://tahoe.baselogic.com
> ---
> 

- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJiv7RpHYnED7evioRAqZvAJ99NLnNok5JYCMDHUdGF3ZupfCA8wCfSLs/
mm8cteBNDFl0LBXyl6r/Ga4=
=mNOo
-----END PGP SIGNATURE-----

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