IDE support for TestJars: maven projects in the workspace only
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2024 Broadcom, Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* https://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Broadcom, Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.springframework.ide.vscode.commons.java;
|
||||
|
||||
import org.springframework.ide.vscode.commons.protocol.java.Gav;
|
||||
|
||||
public interface IGav {
|
||||
|
||||
String getGroupId();
|
||||
|
||||
String getArtifactId();
|
||||
|
||||
String getVersion();
|
||||
|
||||
static IGav create(Gav gav) {
|
||||
return new IGav() {
|
||||
|
||||
@Override
|
||||
public String getVersion() {
|
||||
return gav.version();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGroupId() {
|
||||
return gav.groupId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArtifactId() {
|
||||
return gav.artifactId();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2022 VMware, Inc.
|
||||
* Copyright (c) 2022, 2024 VMware, Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
@@ -12,13 +12,17 @@ package org.springframework.ide.vscode.commons.java;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
import org.springframework.ide.vscode.commons.protocol.java.Gav;
|
||||
|
||||
public interface IProjectBuild {
|
||||
|
||||
String getType();
|
||||
|
||||
URI getBuildFile();
|
||||
|
||||
static IProjectBuild create(String type, URI buildFile) {
|
||||
IGav getGav();
|
||||
|
||||
static IProjectBuild create(String type, URI buildFile, Gav gav) {
|
||||
return new IProjectBuild() {
|
||||
|
||||
@Override
|
||||
@@ -30,6 +34,10 @@ public interface IProjectBuild {
|
||||
public URI getBuildFile() {
|
||||
return buildFile;
|
||||
}
|
||||
|
||||
public IGav getGav() {
|
||||
return IGav.create(gav);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user