Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config Java Language Servce with Maven Profile #2989

Closed
Nonlone opened this issue Mar 9, 2023 · 4 comments
Closed

Config Java Language Servce with Maven Profile #2989

Nonlone opened this issue Mar 9, 2023 · 4 comments
Labels

Comments

@Nonlone
Copy link

Nonlone commented Mar 9, 2023

[provide a description of the issue]

Environment
  • Operating System: mac os 13.2.1
  • JDK version: 1.8 ~ 17
  • Visual Studio Code version: 1.76.0
  • Java extension version: v1.15.0
Steps To Reproduce
  1. my project pom defined my pom parent to our private gitlab server
  2. my pom does not defined any profile
  3. profile config in ~/.m2/settings.xml,but I don't config activate because I had some project dosen't to point to our private gitlab server

[Please attach a sample project reproducing the error]
Please attach logs

log in client.log
message: Project build error: Non-resolvable parent POM for xxxxx:1.0.0: xxxx:commons-app-parent:pom:1.2.0 was not found in https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM; code: 0; resource: /xxxxx/pom.xml; line: 6\n

Current Result

show the project is not valid java project

Expected Result

run with maven profile options

Additional Informations
@fbricon
Copy link
Collaborator

fbricon commented Mar 9, 2023

I don't understand your issue with regard to profiles. Can you provide a sample project demonstrating the issue?

@Nonlone
Copy link
Author

Nonlone commented Mar 14, 2023

I create a sample project to simulate my real project , here is repository address : https://github.com/Nonlone/NotAValidJavaProjectSample, any possible to provide multi configuration for maven profile in settings.xml

@rgrunber
Copy link
Member

rgrunber commented Jan 23, 2024

I don't think we have a way to activate certain profiles. We do have both java.configuration.maven.userSettings & java.configuration.maven.globalSettings and you could supply a settings.xml to one of those where the necessary profile is activated. Would that work ?

This seems similar to #3213 & #1263 (comment)

@jdneo
Copy link
Collaborator

jdneo commented Jun 3, 2024

With the latest Language Support for Java(TM) by Red Hat (1.31.0) and latest Extension Pack for Java (0.27.0). You can now change the Maven active profile with a GUI with following steps:

  1. Click the java status bar
    image
  2. Select Open Project Settings
    image
  3. Go to the Maven tab, and type the profile names (comma separated) which you want to enable. For example: profile1,profile2
    image
  4. Click Apply Settings at the bottom of the Project Settings page
    image

@jdneo jdneo closed this as completed Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants