Discussion:
[tycho-user] Java Annotations problem
Ed Willink
2017-10-12 17:57:03 UTC
Permalink
Hi

I'm migrating from Buckminster where I was forced to use both an old JDT
(on Hudson) and current JDT interactively. My code has no errors on either.

Using Tycho 0.26.0 I get two errors about unsafe nulls; well I can
probably workaround 2.

Using Tycho 1.0.0 I get over a thousand errors. It appears that my
custom Java annotations correcting the not-designed-for null on
List<T>.get are being ignored. e.g.

/[INFO] Compiling 1035 source files to
E:\GIT\org.eclipse.ocl\plugins\org.eclipse.ocl.pivot\target\classes//
//[WARNING]
E:\GIT\org.eclipse.ocl\plugins\org.eclipse.ocl.pivot\src\org\eclipse\ocl\pivot\internal\manager\FlowAnalysis.java:[97]
//
//    OCLExpression asExpression = toBeDeduced.get(alreadyDeducedIndex++);//
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^//
//Unsafe interpretation of method return type as '@NonNull' based on the
receiver type '@NonNull List<@NonNull OCLExpression>'. Type 'List<E>'
doesn't seem to be designed with null type annotations in mind//
//[WARNING]
E:\GIT\org.eclipse.ocl\plugins\org.eclipse.ocl.pivot\src\org\eclipse\ocl\pivot\internal\manager\FlowAnalysis.java:[356]
//
//    OCLExpression pathElement = callPath.get(pathIndex++);//
//                                ^^^^^^^^^^^^^^^^^^^^^^^^^//
//Unsafe interpretation of method return type as '@NonNull' based on the
receiver type '@NonNull List<@NonNull OCLExpression>'. Type 'List<E>'
doesn't seem to be designed with null type annotations in mind/

What is the underlying JDT in 0.26.0 / 1.0.0?

Is it controllable?

Is there some configuration magic for Java annotation paths?

Is there a problem with the "annotations" folder being differently
special for Java / Maven ?

    Regards

        Ed Willink



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Sievers, Jan
2017-10-13 07:08:22 UTC
Permalink
What is the underlying JDT in 0.26.0 / 1.0.0?

https://github.com/eclipse/tycho/blob/tycho-0.26.0/pom.xml#L95
https://github.com/eclipse/tycho/blob/tycho-1.0.0/pom.xml#L95


Is it controllable?

you can override the default JDT/APT artifacts used (although I don't think this is the solution to the problem at hand). Make sure they match though. See e.g.
https://github.com/eclipse/eclipse.platform.releng.aggregator/blob/2df84b9e959fdc0476113913dd1aa4db1a14b0d4/eclipse-platform-parent/pom.xml#L436-L446


Is there some configuration magic for Java annotation paths?

not that I know of, unless you are talking about annotation processing to generate sources, see
https://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#annotationProcessors
https://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#generatedSourcesDirectory


The point that you are getting different errors/warnings may be simply related to your compiler errors/warnings configuration.
Since 1.0.0 .settings/org.eclipse.jdt.core.prefs is used by default, see announcement
https://wiki.eclipse.org/Tycho/Release_Notes/1.0.0

Jan
Ed Willink
2017-10-13 10:02:28 UTC
Permalink
Hi

Thanks. The bleeding edge of JDT annotations is pretty bloody.

It appears that

Buckmister / Tycho 0.26.0 predate the custom annotation support /
nullable-non-null return checks. No problems.

Tycho 1.0.0 is in the middle of experimental functionality. Spurious
problems.

Oxygen JDT is useable. Only minor problems.

---

I have succeeded in setting cbi-jdt-version/cbi-jdt-apt-version in so
far as I get errors reporting that the override versions are not found.

I can force the correct versions to be pulled from the Oxygen release
but it appears that Tycho insists on using versions that come from (but
are not in) Maven central. The platform is ignored.

i.e. my repo shows a -SNAPSHOT for my explicit forced load but a
-V2017... for the failed Maven access.

Any clues?

-----

How about a use platform JDT configuration option?

    Regards

        Ed Willink
Post by Ed Willink
What is the underlying JDT in 0.26.0 / 1.0.0?
https://github.com/eclipse/tycho/blob/tycho-0.26.0/pom.xml#L95
https://github.com/eclipse/tycho/blob/tycho-1.0.0/pom.xml#L95
Is it controllable?
you can override the default JDT/APT artifacts used (although I don't think this is the solution to the problem at hand). Make sure they match though. See e.g.
https://github.com/eclipse/eclipse.platform.releng.aggregator/blob/2df84b9e959fdc0476113913dd1aa4db1a14b0d4/eclipse-platform-parent/pom.xml#L436-L446
Is there some configuration magic for Java annotation paths?
not that I know of, unless you are talking about annotation processing to generate sources, see
https://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#annotationProcessors
https://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#generatedSourcesDirectory
The point that you are getting different errors/warnings may be simply related to your compiler errors/warnings configuration.
Since 1.0.0 .settings/org.eclipse.jdt.core.prefs is used by default, see announcement
https://wiki.eclipse.org/Tycho/Release_Notes/1.0.0
Jan
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Sievers, Jan
2017-10-13 10:25:53 UTC
Permalink
unfortunately JDT binaries are not on maven central, details see [1]
If you want newer JDT maven artifacts, I guess you will have to add an eclipse.org maven repo to your pom.xml or settings.xml

At least that's what eclipse platform seems to be doing

https://github.com/eclipse/eclipse.platform.releng.aggregator/blob/2df84b9e959fdc0476113913dd1aa4db1a14b0d4/eclipse-platform-parent/pom.xml#L193-L202


Regards
Jan


[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=510198

On 13.10.17, 12:02, "tycho-user-***@eclipse.org on behalf of Ed Willink" <tycho-user-***@eclipse.org on behalf of ***@willink.me.uk> wrote:

Hi
Thanks. The bleeding edge of JDT annotations is pretty bloody.
It appears that
Buckmister / Tycho 0.26.0 predate the custom annotation support / nullable-non-null return checks. No problems.

Tycho 1.0.0 is in the middle of experimental functionality. Spurious problems.

Oxygen JDT is useable. Only minor problems.

---
I have succeeded in setting cbi-jdt-version/cbi-jdt-apt-version in so far as I get errors reporting that the override versions are not found.
I can force the correct versions to be pulled from the Oxygen release but it appears that Tycho insists on using versions that come from (but are not in) Maven central. The platform is ignored.

i.e. my repo shows a -SNAPSHOT for my explicit forced load but a -V2017... for the failed Maven access.

Any clues?

-----

How about a use platform JDT configuration option?

Regards
Ed Willink


On 13/10/2017 08:08, Sievers, Jan wrote:


What is the underlying JDT in 0.26.0 / 1.0.0?

https://github.com/eclipse/tycho/blob/tycho-0.26.0/pom.xml#L95https://github.com/eclipse/tycho/blob/tycho-1.0.0/pom.xml#L95


Is it controllable?

you can override the default JDT/APT artifacts used (although I don't think this is the solution to the problem at hand). Make sure they match though. See e.g.
https://github.com/eclipse/eclipse.platform.releng.aggregator/blob/2df84b9e959fdc0476113913dd1aa4db1a14b0d4/eclipse-platform-parent/pom.xml#L436-L446


Is there some configuration magic for Java annotation paths?

not that I know of, unless you are talking about annotation processing to generate sources, see
https://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#annotationProcessorshttps://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#generatedSourcesDirectory


The point that you are getting different errors/warnings may be simply related to your compiler errors/warnings configuration.
Since 1.0.0 .settings/org.eclipse.jdt.core.prefs is used by default, see announcement
https://wiki.eclipse.org/Tycho/Release_Notes/1.0.0

Jan


_______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user



<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
Virus-free.
www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
Sievers, Jan
2017-10-13 10:43:59 UTC
Permalink
I published Oxygen.1a JDT binaries onmaven central for use with Tycho.

should be available soon on

http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.eclipse.tycho%20a%3Aorg.eclipse.jdt.core

Jan

On 13.10.17, 12:26, "tycho-user-***@eclipse.org on behalf of Sievers, Jan" <tycho-user-***@eclipse.org on behalf of ***@sap.com> wrote:

unfortunately JDT binaries are not on maven central, details see [1]
If you want newer JDT maven artifacts, I guess you will have to add an eclipse.org maven repo to your pom.xml or settings.xml

At least that's what eclipse platform seems to be doing

https://github.com/eclipse/eclipse.platform.releng.aggregator/blob/2df84b9e959fdc0476113913dd1aa4db1a14b0d4/eclipse-platform-parent/pom.xml#L193-L202


Regards
Jan


[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=510198

On 13.10.17, 12:02, "tycho-user-***@eclipse.org on behalf of Ed Willink" <tycho-user-***@eclipse.org on behalf of ***@willink.me.uk> wrote:

Hi
Thanks. The bleeding edge of JDT annotations is pretty bloody.
It appears that
Buckmister / Tycho 0.26.0 predate the custom annotation support / nullable-non-null return checks. No problems.

Tycho 1.0.0 is in the middle of experimental functionality. Spurious problems.

Oxygen JDT is useable. Only minor problems.

---
I have succeeded in setting cbi-jdt-version/cbi-jdt-apt-version in so far as I get errors reporting that the override versions are not found.
I can force the correct versions to be pulled from the Oxygen release but it appears that Tycho insists on using versions that come from (but are not in) Maven central. The platform is ignored.

i.e. my repo shows a -SNAPSHOT for my explicit forced load but a -V2017... for the failed Maven access.

Any clues?

-----

How about a use platform JDT configuration option?

Regards
Ed Willink


On 13/10/2017 08:08, Sievers, Jan wrote:


What is the underlying JDT in 0.26.0 / 1.0.0?

https://github.com/eclipse/tycho/blob/tycho-0.26.0/pom.xml#L95https://github.com/eclipse/tycho/blob/tycho-1.0.0/pom.xml#L95


Is it controllable?

you can override the default JDT/APT artifacts used (although I don't think this is the solution to the problem at hand). Make sure they match though. See e.g.
https://github.com/eclipse/eclipse.platform.releng.aggregator/blob/2df84b9e959fdc0476113913dd1aa4db1a14b0d4/eclipse-platform-parent/pom.xml#L436-L446


Is there some configuration magic for Java annotation paths?

not that I know of, unless you are talking about annotation processing to generate sources, see
https://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#annotationProcessorshttps://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#generatedSourcesDirectory


The point that you are getting different errors/warnings may be simply related to your compiler errors/warnings configuration.
Since 1.0.0 .settings/org.eclipse.jdt.core.prefs is used by default, see announcement
https://wiki.eclipse.org/Tycho/Release_Notes/1.0.0

Jan


_______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user



<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
Virus-free.
www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


_______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
Ed Willink
2017-10-13 11:43:07 UTC
Permalink
Hi

https://repo.eclipse.org/ seems to be the way to go. Maven central will
never be up to date.

Unfortunately it makes no difference, but at least I have the same
plugins interactively and cached.

The custom Java annotations are configured in the .classpath file

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
        <attributes>
            <attribute name="annotationpath"
value="/org.eclipse.ocl.pivot/annotations"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
        <attributes>
            <attribute name="annotationpath"
value="/org.eclipse.ocl.pivot/annotations"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="src" path="emf-gen"/>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="output" path="bin"/>
</classpath>

If I comment out the <attributes> clauses, I see similar diagnostics in
the JDT editor as in the Tycho compile. It would appear that the
attributes are ignored by a Tycho compile, or do they too have to come
from Maven central?

    Regards

        Ed Willink
Post by Sievers, Jan
unfortunately JDT binaries are not on maven central, details see [1]
If you want newer JDT maven artifacts, I guess you will have to add an eclipse.org maven repo to your pom.xml or settings.xml
At least that's what eclipse platform seems to be doing
https://github.com/eclipse/eclipse.platform.releng.aggregator/blob/2df84b9e959fdc0476113913dd1aa4db1a14b0d4/eclipse-platform-parent/pom.xml#L193-L202
Regards
Jan
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=510198
Hi
Thanks. The bleeding edge of JDT annotations is pretty bloody.
It appears that
Buckmister / Tycho 0.26.0 predate the custom annotation support / nullable-non-null return checks. No problems.
Tycho 1.0.0 is in the middle of experimental functionality. Spurious problems.
Oxygen JDT is useable. Only minor problems.
---
I have succeeded in setting cbi-jdt-version/cbi-jdt-apt-version in so far as I get errors reporting that the override versions are not found.
I can force the correct versions to be pulled from the Oxygen release but it appears that Tycho insists on using versions that come from (but are not in) Maven central. The platform is ignored.
i.e. my repo shows a -SNAPSHOT for my explicit forced load but a -V2017... for the failed Maven access.
Any clues?
-----
How about a use platform JDT configuration option?
Regards
Ed Willink
What is the underlying JDT in 0.26.0 / 1.0.0?
https://github.com/eclipse/tycho/blob/tycho-0.26.0/pom.xml#L95https://github.com/eclipse/tycho/blob/tycho-1.0.0/pom.xml#L95
Is it controllable?
you can override the default JDT/APT artifacts used (although I don't think this is the solution to the problem at hand). Make sure they match though. See e.g.
https://github.com/eclipse/eclipse.platform.releng.aggregator/blob/2df84b9e959fdc0476113913dd1aa4db1a14b0d4/eclipse-platform-parent/pom.xml#L436-L446
Is there some configuration magic for Java annotation paths?
not that I know of, unless you are talking about annotation processing to generate sources, see
https://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#annotationProcessorshttps://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#generatedSourcesDirectory
The point that you are getting different errors/warnings may be simply related to your compiler errors/warnings configuration.
Since 1.0.0 .settings/org.eclipse.jdt.core.prefs is used by default, see announcement
https://wiki.eclipse.org/Tycho/Release_Notes/1.0.0
Jan
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
Virus-free.
www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Sievers, Jan
2017-10-13 15:22:08 UTC
Permalink
..classpath is an IDE-specific and derived file so it's not taken into account by the headless Tycho build (as opposed to e.g. build.properties).

tycho is using the batch compiler CLI so you should be able to pass in an "-annotationpath" argument

https://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-using_batch_compiler.htm

https://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#compilerArgs

sth like

<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<compilerArgs>
<arg>-annotationpath</arg>
<arg>PATH/TO/ANNOTATIONS</arg>
</compilerArgs>
</configuration>
</plugin>

you may want to use maven variables ${project.basedir} or similar for the path.

Regards,
Jan






On 13.10.17, 13:43, "tycho-user-***@eclipse.org on behalf of Ed Willink" <tycho-user-***@eclipse.org on behalf of ***@willink.me.uk> wrote:

Hi

https://repo.eclipse.org/ seems to be the way to go. Maven central will
never be up to date.

Unfortunately it makes no difference, but at least I have the same
plugins interactively and cached.

The custom Java annotations are configured in the .classpath file

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="annotationpath"
value="/org.eclipse.ocl.pivot/annotations"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
<attributes>
<attribute name="annotationpath"
value="/org.eclipse.ocl.pivot/annotations"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="emf-gen"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

If I comment out the <attributes> clauses, I see similar diagnostics in
the JDT editor as in the Tycho compile. It would appear that the
attributes are ignored by a Tycho compile, or do they too have to come
from Maven central?

Regards

Ed Willink
Post by Sievers, Jan
unfortunately JDT binaries are not on maven central, details see [1]
If you want newer JDT maven artifacts, I guess you will have to add an eclipse.org maven repo to your pom.xml or settings.xml
At least that's what eclipse platform seems to be doing
https://github.com/eclipse/eclipse.platform.releng.aggregator/blob/2df84b9e959fdc0476113913dd1aa4db1a14b0d4/eclipse-platform-parent/pom.xml#L193-L202
Regards
Jan
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=510198
Hi
Thanks. The bleeding edge of JDT annotations is pretty bloody.
It appears that
Buckmister / Tycho 0.26.0 predate the custom annotation support / nullable-non-null return checks. No problems.
Tycho 1.0.0 is in the middle of experimental functionality. Spurious problems.
Oxygen JDT is useable. Only minor problems.
---
I have succeeded in setting cbi-jdt-version/cbi-jdt-apt-version in so far as I get errors reporting that the override versions are not found.
I can force the correct versions to be pulled from the Oxygen release but it appears that Tycho insists on using versions that come from (but are not in) Maven central. The platform is ignored.
i.e. my repo shows a -SNAPSHOT for my explicit forced load but a -V2017... for the failed Maven access.
Any clues?
-----
How about a use platform JDT configuration option?
Regards
Ed Willink
What is the underlying JDT in 0.26.0 / 1.0.0?
https://github.com/eclipse/tycho/blob/tycho-0.26.0/pom.xml#L95https://github.com/eclipse/tycho/blob/tycho-1.0.0/pom.xml#L95
Is it controllable?
you can override the default JDT/APT artifacts used (although I don't think this is the solution to the problem at hand). Make sure they match though. See e.g.
https://github.com/eclipse/eclipse.platform.releng.aggregator/blob/2df84b9e959fdc0476113913dd1aa4db1a14b0d4/eclipse-platform-parent/pom.xml#L436-L446
Is there some configuration magic for Java annotation paths?
not that I know of, unless you are talking about annotation processing to generate sources, see
https://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#annotationProcessorshttps://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#generatedSourcesDirectory
The point that you are getting different errors/warnings may be simply related to your compiler errors/warnings configuration.
Since 1.0.0 .settings/org.eclipse.jdt.core.prefs is used by default, see announcement
https://wiki.eclipse.org/Tycho/Release_Notes/1.0.0
Jan
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
Virus-free.
www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

_______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
Ed Willink
2017-10-13 15:54:26 UTC
Permalink
Hi

Thanks. JDT https://bugs.eclipse.org/bugs/show_bug.cgi?id=526011 raised.

    Regards

        Ed Willink
Post by Sievers, Jan
..classpath is an IDE-specific and derived file so it's not taken into account by the headless Tycho build (as opposed to e.g. build.properties).
tycho is using the batch compiler CLI so you should be able to pass in an "-annotationpath" argument
https://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-using_batch_compiler.htm
https://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#compilerArgs
sth like
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<compilerArgs>
<arg>-annotationpath</arg>
<arg>PATH/TO/ANNOTATIONS</arg>
</compilerArgs>
</configuration>
</plugin>
you may want to use maven variables ${project.basedir} or similar for the path.
Regards,
Jan
Hi
https://repo.eclipse.org/ seems to be the way to go. Maven central will
never be up to date.
Unfortunately it makes no difference, but at least I have the same
plugins interactively and cached.
The custom Java annotations are configured in the .classpath file
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="annotationpath"
value="/org.eclipse.ocl.pivot/annotations"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
<attributes>
<attribute name="annotationpath"
value="/org.eclipse.ocl.pivot/annotations"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="emf-gen"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
If I comment out the <attributes> clauses, I see similar diagnostics in
the JDT editor as in the Tycho compile. It would appear that the
attributes are ignored by a Tycho compile, or do they too have to come
from Maven central?
Regards
Ed Willink
Post by Sievers, Jan
unfortunately JDT binaries are not on maven central, details see [1]
If you want newer JDT maven artifacts, I guess you will have to add an eclipse.org maven repo to your pom.xml or settings.xml
At least that's what eclipse platform seems to be doing
https://github.com/eclipse/eclipse.platform.releng.aggregator/blob/2df84b9e959fdc0476113913dd1aa4db1a14b0d4/eclipse-platform-parent/pom.xml#L193-L202
Regards
Jan
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=510198
Hi
Thanks. The bleeding edge of JDT annotations is pretty bloody.
It appears that
Buckmister / Tycho 0.26.0 predate the custom annotation support / nullable-non-null return checks. No problems.
Tycho 1.0.0 is in the middle of experimental functionality. Spurious problems.
Oxygen JDT is useable. Only minor problems.
---
I have succeeded in setting cbi-jdt-version/cbi-jdt-apt-version in so far as I get errors reporting that the override versions are not found.
I can force the correct versions to be pulled from the Oxygen release but it appears that Tycho insists on using versions that come from (but are not in) Maven central. The platform is ignored.
i.e. my repo shows a -SNAPSHOT for my explicit forced load but a -V2017... for the failed Maven access.
Any clues?
-----
How about a use platform JDT configuration option?
Regards
Ed Willink
What is the underlying JDT in 0.26.0 / 1.0.0?
https://github.com/eclipse/tycho/blob/tycho-0.26.0/pom.xml#L95https://github.com/eclipse/tycho/blob/tycho-1.0.0/pom.xml#L95
Is it controllable?
you can override the default JDT/APT artifacts used (although I don't think this is the solution to the problem at hand). Make sure they match though. See e.g.
https://github.com/eclipse/eclipse.platform.releng.aggregator/blob/2df84b9e959fdc0476113913dd1aa4db1a14b0d4/eclipse-platform-parent/pom.xml#L436-L446
Is there some configuration magic for Java annotation paths?
not that I know of, unless you are talking about annotation processing to generate sources, see
https://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#annotationProcessorshttps://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#generatedSourcesDirectory
The point that you are getting different errors/warnings may be simply related to your compiler errors/warnings configuration.
Since 1.0.0 .settings/org.eclipse.jdt.core.prefs is used by default, see announcement
https://wiki.eclipse.org/Tycho/Release_Notes/1.0.0
Jan
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
Virus-free.
www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
Loading...