[SPIN API] "Unresolved compilation problem" after upgrade to 1.3.0 with Maven

103 visningar
Hoppa till det första olästa meddelandet

pu...@xml.lt

oläst,
1 feb. 2013 10:01:102013-02-01
till topbrai...@googlegroups.com
Hey list,

I updated my project to include the long anticipated SPIN 1.3.0 API as a Maven dependency. It compiles fine, but when I try to run it, I get:

java.lang.Error: Unresolved compilation problem:
    The method create(Function) of type SPINFunctionDrivers must override a superclass method

    at org.topbraid.spin.arq.SPINFunctionDrivers.create(SPINFunctionDrivers.java:47)
    at org.topbraid.spin.system.SPINModuleRegistry.registerARQFunction(SPINModuleRegistry.java:250)
    at org.topbraid.spin.system.SPINModuleRegistry.register(SPINModuleRegistry.java:204)
 ....

Never seen this before, but from StackOverflow I get the impression that this is related to Java versions:
http://stackoverflow.com/questions/1678122/must-override-a-superclass-method-errors-after-importing-a-project-into-eclips

Seems that in Java 1.6 @Override is allowed on both interfaces and superclasses, while 1.5 only allows it on superclasses. SPINFunctionDrivers seems to override interface method:

public interface SPINFunctionDriver {

    SPINFunctionFactory create(Function function);
}

public class SPINFunctionDrivers implements SPINFunctionDriver {
...
    @Override
    public SPINFunctionFactory create(Function function) {
...

However spin-1.3.0.pom seems to specify Java version as 1.5:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
    <version>2.3.2</version>
        <configuration>
            <debug>true</debug>
            <debuglevel>source,lines,vars</debuglevel>
            <optimize>true</optimize>
            <source>1.5</source>
            <target>1.5</target>
            <encoding>UTF-8</encoding>
        </configuration>
    </plugin>

Could that be the source of the problem? My own project uses <source>1.7</source><target>1.7</target> to take advantage of the improvements in Locale.

Does anyone know a solution to this problem? Hopefully it takes no more than a change in POM...

Martynas
graphity.org

Holger Knublauch

oläst,
1 feb. 2013 22:37:152013-02-01
till topbrai...@googlegroups.com
Hi Martynas,

you are ahead of the pack ;) The maven site is not even announced yet
and I appreciate your instant feedback. Yes, it looks like we need to
increase the required Java version to 1.6 - I am surprised it didn't
complain when I ran the build. I believe we also need to include the
source code more easily.

We can hopefully deliver the final version with this fixed early next
week and then I will announce it too ;)

Thanks,
Holger
> --
> -- You received this message because you are subscribed to the Google
> Group "TopBraid Suite Users", the topics of which include Enterprise
> Vocabulary Network (EVN), TopBraid Composer, TopBraid Live,
> TopBraid Ensemble, SPARQLMotion, SPARQL Web Pages and SPIN.
> To post to this group, send email to
> topbrai...@googlegroups.com
> To unsubscribe from this group, send email to
> topbraid-user...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/topbraid-users?hl=en
> ---
> You received this message because you are subscribed to the Google
> Groups "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to topbraid-user...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Holger Knublauch

oläst,
4 feb. 2013 17:11:102013-02-04
till topbrai...@googlegroups.com
Hi Martynas,

we have meanwhile updated the 1.3.0 version on Maven to use Java 1.6.
Could you retry and confirm if it works? We can then start snapshot
releases towards 1.3.1.

Thanks,
Holger


On 2/2/2013 1:01, pu...@xml.lt wrote:

Peter Ansell

oläst,
4 feb. 2013 17:39:152013-02-04
till topbrai...@googlegroups.com
Hi Holger

Once things have stabilised, would you be open to publishing artifacts
to Maven Central?

Cheers,

Peter

pu...@xml.lt

oläst,
6 feb. 2013 08:30:382013-02-06
till topbrai...@googlegroups.com
I confirm, now it works. Thank you Holger :)

Martynas
Svara alla
Svara författaren
Vidarebefordra
0 nya meddelanden