@Test public void shouldKeepExtensionDependencyVersion() { Map<AppArtifactKey, AppDependency> userDependencies = new HashMap<>(); final AppArtifact appArtifact = new AppArtifact("org.acme", "common", "0.0.1-SNAPSHOT"); AppDependency extensionDependency = new AppDependency(appArtifact, "runtime", false); final AppDependency dependency = QuarkusModelHelper.alignVersion(extensionDependency, userDependencies); Assertions.assertEquals(extensionDependency, dependency); }
static AppDependency alignVersion(AppDependency dependency, Map<AppArtifactKey, AppDependency> versionMap) { AppArtifactKey appKey = new AppArtifactKey(dependency.getArtifact().getGroupId(), dependency.getArtifact().getArtifactId()); if (versionMap.containsKey(appKey)) { return versionMap.get(appKey); } return dependency; }
QuarkusModelHelper { static AppDependency alignVersion(AppDependency dependency, Map<AppArtifactKey, AppDependency> versionMap) { AppArtifactKey appKey = new AppArtifactKey(dependency.getArtifact().getGroupId(), dependency.getArtifact().getArtifactId()); if (versionMap.containsKey(appKey)) { return versionMap.get(appKey); } return dependency; } }
QuarkusModelHelper { static AppDependency alignVersion(AppDependency dependency, Map<AppArtifactKey, AppDependency> versionMap) { AppArtifactKey appKey = new AppArtifactKey(dependency.getArtifact().getGroupId(), dependency.getArtifact().getArtifactId()); if (versionMap.containsKey(appKey)) { return versionMap.get(appKey); } return dependency; } private  QuarkusModelHelper(); }
QuarkusModelHelper { static AppDependency alignVersion(AppDependency dependency, Map<AppArtifactKey, AppDependency> versionMap) { AppArtifactKey appKey = new AppArtifactKey(dependency.getArtifact().getGroupId(), dependency.getArtifact().getArtifactId()); if (versionMap.containsKey(appKey)) { return versionMap.get(appKey); } return dependency; } private  QuarkusModelHelper(); static void exportModel(QuarkusModel model); static Path serializeAppModel(QuarkusModel model); static Path serializeQuarkusModel(QuarkusModel model); static QuarkusModel deserializeQuarkusModel(Path modelPath); static Path getClassPath(WorkspaceModule model); static AppModel convert(QuarkusModel model, AppArtifact appArtifact); static AppDependency toAppDependency(Dependency dependency); static PathsCollection toPathsCollection(Collection<File> files); static Properties resolveDescriptor(final Path path); }
QuarkusModelHelper { static AppDependency alignVersion(AppDependency dependency, Map<AppArtifactKey, AppDependency> versionMap) { AppArtifactKey appKey = new AppArtifactKey(dependency.getArtifact().getGroupId(), dependency.getArtifact().getArtifactId()); if (versionMap.containsKey(appKey)) { return versionMap.get(appKey); } return dependency; } private  QuarkusModelHelper(); static void exportModel(QuarkusModel model); static Path serializeAppModel(QuarkusModel model); static Path serializeQuarkusModel(QuarkusModel model); static QuarkusModel deserializeQuarkusModel(Path modelPath); static Path getClassPath(WorkspaceModule model); static AppModel convert(QuarkusModel model, AppArtifact appArtifact); static AppDependency toAppDependency(Dependency dependency); static PathsCollection toPathsCollection(Collection<File> files); static Properties resolveDescriptor(final Path path); final static String SERIALIZED_QUARKUS_MODEL; final static String[] DEVMODE_REQUIRED_TASKS; final static String[] TEST_REQUIRED_TASKS; final static List<String> ENABLE_JAR_PACKAGING; }