Issue
I have problem with a build native build and compilation application by maven. I cant solve error:
package com.victorlaerte.asynctask does not exist
i dont know how to deal with it, libray is added by maven and working properly when i run program by intelij.
compile errors:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project PROJECT_NAME: Compilation failure: Compilation failure:
[ERROR] /C:/Users/xxxx/dir/APP_NAME/src/main/java/api/request/UpdateDownload.java:[6,34] package com.victorlaerte.asynctask does not exist
[ERROR] /C:/Users/xxxx/dir/APP_NAME/src/main/java/api/request/UpdateDownload.java:[18,37] cannot find symbol
[ERROR] symbol: class AsyncTask
[ERROR] /C:/Users/xxxx/dir/APP_NAME/src/main/java/api/request/LicenseCheckStatus.java:[5,34] package com.victorlaerte.asynctask does not exist
[ERROR] /C:/Users/xxxx/dir/APP_NAME/src/main/java/api/request/LicenseCheckStatus.java:[17,41] cannot find symbol
[ERROR] symbol: class AsyncTask
[ERROR] /C:/Users/xxxx/dir/APP_NAME/src/main/java/controller/PreloaderWindowController.java:[4,34] package com.victorlaerte.asynctask does not exist
[ERROR] /C:/Users/xxxx/dir/APP_NAME/src/main/java/api/request/LicenseRegister.java:[7,34] package com.victorlaerte.asynctask does not exist
[ERROR] /C:/Users/xxxx/dir/APP_NAME/src/main/java/api/request/LicenseRegister.java:[19,38] cannot find symbol
Solution
The following pom.xml works for me:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.victorlaerte</groupId>
<artifactId>asynctask</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>12.0.1</version>
</dependency>
<dependency>
<groupId>com.victorlaerte</groupId>
<artifactId>jfx-asynctask</artifactId>
<version>1.0.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.2</version>
<configuration>
<mainClass>HelloFX</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>
Java:
import com.victorlaerte.asynctask.AsyncTask;
public class Test extends AsyncTask {
public void onPreExecute() {
}
public Object doInBackground(Object[] objects) {
return null;
}
public void onPostExecute(Object o) {
}
public void progressCallback(Object[] objects) {
}
}
Answered By - Victor Laerte
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.