heroku / heroku/devcenter-java-worker

Source Option 5 Error

Aperta
#5 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
8
Fork
18
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

It appears that newer versions of Maven or Java—I haven't narrowed it down (I'm running Maven 3.8.3 and Java 16)—fail to build this project. The error says:

```
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ herokujavasample ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 2 source files to C:\Users\School\Microservices\java-worker-dyno-playground\devcenter-java-worker\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Source option 5 is no longer supported. Use 7 or later.
[ERROR] Target option 5 is no longer supported. Use 7 or later.
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.778 s
[INFO] Finished at: 2021-10-11T14:38:42-06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project herokujavasample: Compilation failure: Compilation failure:
[ERROR] Source option 5 is no longer supported. Use 7 or later.
[ERROR] Target option 5 is no longer supported. Use 7 or later.
```

It appears, however, that [adding the target version](https://stackoverflow.com/a/61941759/5432315) solves the issue.

```

1.8
1.8

```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start by locating the Maven compiler configuration that produces source and target option 5, then review the reported Java and Maven versions and the proposed compiler properties. Verify the project builds successfully without the unsupported source-option error; the issue does not name a specific file or test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
build-system
Tipo di issue
Bug
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.