microsoft / microsoft/vscode-java-debug

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

Open
#867 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ai-triaged bug launch
Dominant language
TypeScript
Stars
591
Forks
429
Avg merge
1d 9h
Merged PRs (30d)
19

Description

[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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Maven plugin and dependency configurations shown in the issue, then reproduce the debug launch with the two-module project described. Compare the debug-generated temporary JAR manifest with the normal run; done means the dependency class path is present during debugging and TypeNotPresentException no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.