abuerki / gwtai

Automatically exported from code.google.com/p/gwtai
3 stars 2 forks source link

Don't throw UnableToCompleteException if @Archive Annotation is present and jarlinker isn't used #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Used current branch version (0.4.1)
Currently an Exception in AppletProxyCreator::create is thrown if no jarlinker 
is configured.

the jarlinker is not necessary if the @Archive Annotation is used

Possible Fix:

    @Override
    public String create(TreeLogger logger, GeneratorContextExt context) throws UnableToCompleteException {
        Archive archiveAttribute = serviceIntf.getAnnotation(Archive.class);
        if (null == archiveAttribute) {
            jarname = getJarName(context);
            if (jarname == null) {
                logger.log(TreeLogger.Type.ERROR, "jarlinker.name missing from config.");
                throw new UnableToCompleteException();
            }
        }

        return super.create(logger, context);
    }

Original issue reported on code.google.com by Andy.2...@gmail.com on 6 Jul 2012 at 11:41

GoogleCodeExporter commented 9 years ago
I agree that jarlinker is not needed when the @Archive annotation is used, 
provided that ALL the applet classes, and their dependencies, are located in 
the jar files listed in the @Archive annotation.  I do believe a warning should 
still be displayed, because any applet implementation code included in the 
project will not be placed in a jar, and may result in errors when trying to 
run the applet.

Original comment by dros...@live.com on 19 Nov 2013 at 7:03

GoogleCodeExporter commented 9 years ago

Original comment by dros...@live.com on 21 Nov 2013 at 8:15

GoogleCodeExporter commented 9 years ago
This has been fixed in revision r216 in branch_0.4.1.

Original comment by dros...@live.com on 29 Nov 2013 at 5:49