The problem is probably the same as in this question, but the solution offered there has become inapplicable in the last 8 years.
I have an Eclipse RCP project which is in the process of being transformed to use Tycho (version 2.3.0) instead. The project can be run with Eclipse 2019-06 and the custom target platform built for this project.
Then I have set up Tycho with the same target platform (a separate Maven module referencing the same *.target file used by Eclipse).
But then when I run Maven (version 3.6.3) with the usual "clean install" goals, I get this error message:
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:2.3.0:compile (default-compile) on project my.project.module: Compilation failure: Compilation failure:
[ERROR] C:\path\to\a\source\file\in\a\module.java:
[ERROR] /*
[ERROR] ^
[ERROR] The type org.eclipse.swt.widgets.Event cannot be resolved. It is indirectly referenced from required .class files
The target platform specifies the same environment (win32.win32.x86_64) for both Eclipse and Tycho, and both SWT .jar files (org.eclipse.swt_3.111.0.v20190605-1801.jar and org.eclipse.swt.win32.win32.x86_64_3.111.0.v20190605-1801.jar) are in one of the directories making up the target platform.
After adding
jars.extra.classpath = platform:/plugin/org.eclipse.swt.win32.win32.x86_64
to the build.properties file (as recommended here) the problem is gone.
Related
When I try to build my project with Maven 3.5.4 and Java 11.0.2, the build fails with the message:
Compilation failure: Compilation failure: [ERROR]
xx/directory/krb5/KerberosContextSource.java:[38,20] package
sun.security.krb5 is not visible [ERROR] (package sun.security.krb5
is declared in module java.security.jgss, which does not export it to
the unnamed module)
I have read from several sources that it's not necessary to modularise your project to upgrade it to Java 9+.
Why do I still run into this issue which clearly asks me to define a module-info.java? As mentioned here.
How do I get around it?
I am creating a web application using spring mvc with eclipse as my IDE and every time I build my project I keep getting getting the following :- Compilation failure: Compilation failure:
[ERROR] /C:/Users/dev1/project/GeoVision/src/main/java/com/mmi/controllers/GeoJsonToShp.java diamond operator is not supported in -source 1.5
I have changed the java build path and set it to latest JRE and even then the error won't go.
Also, I am able to run the project on server?
Please suggest what is it that I have to change to successfully build my project?
You need to configure the compile level in IDE settings
Or configure the maven file (probably this rather than eclipse)
I am trying to setup Jenkins to automate project builds and I ran to the following problem. mvn clean install works perfectly from cmd but project build from jenkins fails when maven-antrun-plugin is being used.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run
(clientgen) on project Sample:
An Ant BuildException has occured: Compile failed; see the compiler error output for
details.
[ERROR] around Ant part ...<javac fork="yes" memoryInitialSize="512m"
destdir="E:\Jenkins\workspace\Trunk Builds\Sample\target/generated-sources"
memoryMaximumSize="1024m" srcdir="E:\Jenkins\workspace\Trunk Builds\Sample\target/build"
source="1.4" classpathref="maven.plugin.classpath" executable="C:\j2sdk1.4.2_19/bin/javac"
target="1.4"/>... # 46:428 in
E:\Jenkins\workspace\Trunk Builds\Sample\target\antrun\build-main.xml
Jenkins is actually unable to check for the packages imported when I use maven-antrun-plugin.
[javac] E:/Jenkins/workspace/Trunk Builds/Sample/target/build/ClassSample.java:20:
package org.sample.package does not exist
Whenever I do not use maven-antrun-plugin Jenkin build succeeds. Any ideas why even though it works through cmd jenkins fail to build the project?
Actually I found the real problem and found a workaround. The problem is that Jenkins did not access .m2/repository for some reason so I configured Jenkins to use local to workspace repository. Now it builds normally.
I have a Maven projects and i want to build a project with Maven to create excutable JAR
I can run the project successfully but
when i run Maven build... in eclipse with the command clean package i get(this is just a sample of the log but the rest of the log just repeat the same type of errors)
[INFO] Compiling 6 source files to C:\StrockMarketAnalyzer\USB\master\integ\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] C:\xxx\xxx\xxx\xxx-parent\xxx- integ\src\main\java\com/xxx/xxx/xxx\communicationInterface\IbfAdministrator.java:[22,48] error: package com.xxx/xxx/xxx.businessObject does not exist
[ERROR] C:\xxx\xxx\xxx-parent\xxx-integ\src\main\java\com\xxx\xxx\xxx\xxx\communicationInterface\IbfAdministrator.java:[23,48] error: package com.xxx.xxx.xxx.xxx.businessObject does not exist
and this is the pom.xml of the project i want to build.
<parent>
<groupId>com.xxx.xxx.xxx.xxx</groupId>
<artifactId>parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>integ</artifactId>
I am using packages from other projects that i created when i look to the JAR's in Maven dependency i can find the other projects with a folder icone and Inside them i can find there dependency but not there packages.
I hope there're enough information for you to know what's the problem
Try to run the parent project (with the same conf.)not the project it self.
Right klik project --> update project, wait for the Workbench to build then build using maven. This is a stopgap and not a permanent solution which i myself have not found yet.
You probably "run" the previous version of a program, without building it new.
You must write the dependencies and (their) repositories you use in pom.xml, the parent tag is strange to me.
Also, if you have dependency to another project you r working on clean and build it first.
I use maven (3.2.1) to build our project. My project depends on some propretiary libraries that we have in local maven repo. Those libraries are declared with provided scope (because we don't need them in distribution). Our dependencies depends, of course, on some other libs, e.g. apache-scxml lib, but our code don't do anything with any class from apache-scxml. And in JDK8u20 we cannot build our system anymore, it fails with exception:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project <myproject>: Compilation failure
[ERROR] <myclass>.java:[47,45] error: cannot access SCXMLListener
But project builds completely fine with JDK8u5 and JDK8u11.
I tried to find some info and only thing I found is here: https://issues.jboss.org/browse/FORGE-2019
but I don't think its the same, or at least I cannot understand it. Can someone explain to me what can be the reason that it compiles with JDK8u11 and not with u20?