- Clone code from https://github.com/Microsoft/todo-app-java-on-azure.git
- Open the cloned project.
- Verify:
- The project item is listed in sidebar.
- Click on project item
- Verify:
- It opens the corresponding POM file in editor.
- Right-click on project item
- Click
Effective POM
- Verify:
- It shows
Generating effective pom ...
in status bar during generating. - Once the operation is over, message is cleaned from status bar, and it opens the Effective POM in editor.
- It shows
- Right-click on
pom.xml
in the file explorer view. - Click on
Effective POM
- Verify that it should have the same behaviour as above.
- Right-click on project item
- Click
clean
/validate
/compile
/test
/package
/verify
/install
/site
/deploy
. - Verify:
- It opens an integrated terminal and sends the corresponding maven command to the terminal.
- The maven command works.
- Right-click on project item
- Click
Custom goals ...
- Input a valid string of goals, e.g.
clean package -DskipTests
, pressEnter
. - Verify:
- It execute the corresponding maven command.
- Open a folder with more than one maven project.
- Open command palatte.
- Select
Maven: History ...
- Verify:
- It lists recently executed maven commands for all projects in workspaces, with information of goals and pom file path.
- Select one of them, it should execute the corresponding command.
- Right-click on one of the project item, click
History...
. - Verify:
- It lists recently executed maven commands for this project, with information of goals and pom file path.
- Select one of them, it should execute the corresponding command.
- Right-click a target folder in file explorer view.
- Click
Generate from Maven Archetype
. - Select the target folder in the popup dialog.
- Verify:
- It should show a dropdown list of popular maven archetypes.
- The first item is
More ...
.
- Select one of the listed archetype.
- Verify:
- It opens an integrated terminal, and navigates to the target folder you previously selected.
- It issues the corresponding maven command (archetype:generate) with correct parameters.
- You can interactively continue to fill in missing params in the terminal to complete the task.
- Open Command Palette.
- Click
Maven: Generate from Maven Archetype
. - Select the target folder in the popup dialog.
- Verify:
- It should show a dropdown list of popular maven archetypes.
- The first item is
More ...
.
- Select one of the listed archetype.
- Verify:
- It opens an integrated terminal, and navigates to the target folder you previously selected.
- It issues the corresponding maven command (archetype:generate) with correct parameters.
- You can interactively continue to fill in missing params in the terminal to complete the task.
- Open command palatte
- Find and select
Maven: Update Maven Archetype Catalog
. - Verify:
- It shows
updating archetype catalog ...
in progress bar during updating. - Once the operation is over, progress bar is cleaned.
- The
archetypes.json
file located in$HOME/.vscode/extensions/vscjava.vscode-maven-<version>/resources
is updated.
- It shows
- Clone code https://github.com/Microsoft/todo-app-java-on-azure.git
- Test
clean
,Generate project from Maven Archetype
andEffective POM
. - Verify:
- It uses
./mvnw
in the root folder as executable, and no error occurs.
- It uses
- Clone code https://github.com/Microsoft/todo-app-java-on-azure.git
- Open
User Settings
. - Change value of
maven.executable.path
according to the maven executable absolute path.- For maven executables, use path of
mvn
/mvn.cmd
- For maven wrapper, use path of
mvnw
/mvnw.cmd
- For maven executables, use path of
- Test
clean
,Generate project from Maven Archetype
andEffective POM
. - Verify:
- Corresponding executable is used and commands can be successfully executed with no error.
The tree view of maven projects should update when any pom.xml is created/modified/deleted in the current workspace.
- Open an empty folder in VS Code.
- Create a project with a valid pom.xml file. E.g. using
Generate from Maven Archetype
command. - After the pom.xml file is successfully created, verify:
- A corresponding project item is automatically added into the sidebar.
- Open an existing maven project in VS Code.
- Find the corresponding pom.xml file, and change the value of
artifactId
. - Verify:
- The corresponding project item in the sidebar is updated with new value of artifact Id.
- Open an existing maven project in VS Code.
- Find the corresponding pom.xml file and delete it.
- Verify:
- The corresponding project item is removed from the sidebar.
- Open user settings, set a value for
maven.executable.options
, e.g. "-o". - Right click on a project to trigger a maven command.
- Verify:
- The command executed in the terminal should have the options appended.
- Install Red Hat's Java Language Support extension.
- Specify
java.home
in user settings for that extension:"java.home": "<some value>" // Red Hat Java Language Support Setting
- Add following entry in user settings:
"maven.terminal.useJavaHome": true // Use the Red Hat Java Language Support Setting for JAVA_HOME
- Trigger a maven command, in the newly created terminal, verify:
- value of env
JAVA_HOME
should be the value you just set injava.home
- value of env
- Specify a environment variable
MAVEN_OPTS
in settings, e.g.{ "maven.terminal.customEnv": [ { "environmentVariable": "MAVEN_OPTS", // variable name "value": "-Xms1024m -Xmx4096m" // value } ] }
- Trigger a maven command, in the newly created terminal, verify:
- value of env
MAVEN_OPTS
should be the value you just set in settings.
- value of env
- Make sure
mvn
is not in PATH, or you have set wrongmaven.executable.path
in VS Code. - Open VS Code, open a project, execute
Effective POM
, verify:- It shows a message box for the issue and detailed error message.
- Click
Learn more
, it previewsTroubleshooting.md
in the editor.
- Clone code from https://github.com/spring-projects/spring-hadoop-samples.git
- Clone code https://github.com/Microsoft/todo-app-java-on-azure.git
- Open both above projects in the same VSCode windows under workspace features
- Verify:
- Projects are listed properly, grouped by root folder.
- Open
User Settings
. - Check supported platforms and terminals in README
- Change value of
terminal.integrated.shell.windows/linux/osx
according to the targeted system and terminal. - Test
Custom goals ...
,Generate project from Maven Archetype
andEffective POM
. - Verify:
- Commands can be successfully executed in above tasks.
After above tests, verify corresponding entries in Application Insight portal (vscode maven telemetry test).
- For each command executed, verify:
- There are records named
vscjava.vscode-maven/commandStart
andvscjava.vscode-maven/commandEnd
with samecustomDimensions.sessionId
. - For record
vscjava.vscode-maven/commandEnd
, value (ms) ofcustomMeasurements.duration
is reasonable.
- There are records named
- For command
Generate from Maven Archetype
, verify:- values of
customDimensions.extra.finishedSteps
,customDimensions.extra.artifactId
andcustomDimensions.extra.groupId
are reasonable.- finishedSteps: The steps user goes through after triggering the command. Candidates are
TargetFolder
,ListMore
andArchetype
. - groupId: Group Id of selected archetype.
- artifactId: Artifact Id of selected archetype.
- finishedSteps: The steps user goes through after triggering the command. Candidates are
- values of