microsoft / microsoft/vscode-java-debug

maven-jar-plugin use app-to-import setting make debug error

Aperta
#867 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

ai-triaged bug launch
Lingua principale
TypeScript
Stelle
591
Fork
429
Merge medio
1g 9h
PR unite (30g)
19

Descrizione

[provide a description of the issue]

Environment
  • Operating System:
    Windows_NT x64 10.0.17763
  • JDK version:
    java version "1.8.0_202"
    Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
    Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)
  • Visual Studio Code version:
    version: 1.48.1 (system setup)
    commit: 3dd905126b34dcd4de81fa624eb3a8cbe7485f13
  • Java extension version:
    v0.10.0
  • Java Debugger extension version:
    v0.10.0
Steps To Reproduce
  1. [step 1]
    I have two module in a project.They are all application.The gvt-bdp-stats-scheduler module dependent on gvt-bdp-app module.
    the A module's setting like this.
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>jar</goal>
						</goals>
						<phase>package</phase>
						<configuration>
							<!--to be imported on other projects-->
							<classifier>app-to-import</classifier>
							<includes>
								<include>**/entity/*</include>
							</includes>
						</configuration>
					</execution>
				</executions>
			</plugin>

the B module's setting like this.

        <dependency>
            <groupId>com.gvt.bdp</groupId>
            <artifactId>gvt-bdp-app</artifactId>
            <version>${revision}</version>
            <classifier>app-to-import</classifier>
        </dependency>

[attach a sample project reproducing the error]
attach logs

Current Result

It's normal when I run with jar.But in debug, it cause java.lang.TypeNotPresentException: Type com.entity.OrderStatsEntity not present

Expected Result

The project work in Idea is well.

Additional Informations

When I open the run jar file of temp, the MANIFEST.MF there is no gvt-bdp-app's class-path definition in the file when I debug gvt-bdp-stats-scheduler.
image
image

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con le configurazioni del plugin Maven e delle dipendenze mostrate nell’issue, quindi riproduci l’avvio in modalità debug con il progetto a due moduli descritto. Confronta il manifest del JAR temporaneo generato durante il debug con l’esecuzione normale; il lavoro è completato quando il class path delle dipendenze è presente durante il debug e TypeNotPresentException non si verifica più.

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

Valutazione

Stack tecnologico
java
Ambito
devtools
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
20/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.