37
37
import io .quarkus .maven .dependency .ArtifactCoords ;
38
38
import io .quarkus .maven .dependency .ArtifactKey ;
39
39
import io .quarkus .maven .dependency .Dependency ;
40
- import io .quarkus .maven .dependency .GACT ;
41
- import io .quarkus .maven .dependency .GACTV ;
42
40
import io .quarkus .maven .dependency .ResolvedArtifactDependency ;
43
41
import io .quarkus .runtime .LaunchMode ;
44
42
import io .smallrye .common .expression .Expression ;
@@ -59,7 +57,7 @@ public class QuarkusBootstrapProvider implements Closeable {
59
57
.concurrencyLevel (4 ).softValues ().initialCapacity (10 ).build ();
60
58
61
59
static ArtifactKey getProjectId (MavenProject project ) {
62
- return new GACT (project .getGroupId (), project .getArtifactId ());
60
+ return ArtifactKey . ga (project .getGroupId (), project .getArtifactId ());
63
61
}
64
62
65
63
public RepositorySystem repositorySystem () {
@@ -209,12 +207,13 @@ private CuratedApplication doBootstrap(QuarkusBootstrapMojo mojo, LaunchMode mod
209
207
final List <MavenProject > localProjects = mojo .mavenProject ().getCollectedProjects ();
210
208
final Set <ArtifactKey > localProjectKeys = new HashSet <>(localProjects .size ());
211
209
for (MavenProject p : localProjects ) {
212
- localProjectKeys .add (new GACT (p .getGroupId (), p .getArtifactId ()));
210
+ localProjectKeys .add (ArtifactKey . ga (p .getGroupId (), p .getArtifactId ()));
213
211
}
214
212
reloadableModules = new HashSet <>(localProjects .size () + 1 );
215
213
for (Artifact a : mojo .mavenProject ().getArtifacts ()) {
216
- if (localProjectKeys .contains (new GACT (a .getGroupId (), a .getArtifactId ()))) {
217
- reloadableModules .add (new GACT (a .getGroupId (), a .getArtifactId (), a .getClassifier (), a .getType ()));
214
+ if (localProjectKeys .contains (ArtifactKey .ga (a .getGroupId (), a .getArtifactId ()))) {
215
+ reloadableModules
216
+ .add (ArtifactKey .of (a .getGroupId (), a .getArtifactId (), a .getClassifier (), a .getType ()));
218
217
}
219
218
}
220
219
reloadableModules .add (appArtifact .getKey ());
@@ -228,7 +227,6 @@ private CuratedApplication doBootstrap(QuarkusBootstrapMojo mojo, LaunchMode mod
228
227
} catch (AppModelResolverException e ) {
229
228
throw new MojoExecutionException ("Failed to bootstrap application in " + mode + " mode" , e );
230
229
}
231
-
232
230
QuarkusBootstrap .Builder builder = QuarkusBootstrap .builder ()
233
231
.setAppArtifact (appModel .getAppArtifact ())
234
232
.setExistingModel (appModel )
@@ -237,6 +235,7 @@ private CuratedApplication doBootstrap(QuarkusBootstrapMojo mojo, LaunchMode mod
237
235
.setBuildSystemProperties (effectiveProperties )
238
236
.setProjectRoot (mojo .baseDir ().toPath ())
239
237
.setBaseName (mojo .finalName ())
238
+ .setOriginalBaseName (mojo .mavenProject ().getBuild ().getFinalName ())
240
239
.setTargetDirectory (mojo .buildDir ().toPath ())
241
240
.setForcedDependencies (forcedDependencies );
242
241
@@ -277,12 +276,12 @@ protected CuratedApplication bootstrapApplication(QuarkusBootstrapMojo mojo, Lau
277
276
return prodApp == null ? prodApp = doBootstrap (mojo , mode ) : prodApp ;
278
277
}
279
278
280
- protected GACTV managingProject (QuarkusBootstrapMojo mojo ) {
279
+ protected ArtifactCoords managingProject (QuarkusBootstrapMojo mojo ) {
281
280
if (mojo .appArtifactCoords () == null ) {
282
281
return null ;
283
282
}
284
283
final Artifact artifact = mojo .mavenProject ().getArtifact ();
285
- return new GACTV (artifact .getGroupId (), artifact .getArtifactId (),
284
+ return ArtifactCoords . of (artifact .getGroupId (), artifact .getArtifactId (),
286
285
artifact .getClassifier (), artifact .getArtifactHandler ().getExtension (),
287
286
artifact .getVersion ());
288
287
}
@@ -321,7 +320,7 @@ private ArtifactCoords appArtifact(QuarkusBootstrapMojo mojo)
321
320
}
322
321
final String groupId = coordsArr [0 ];
323
322
final String artifactId = coordsArr [1 ];
324
- String classifier = "" ;
323
+ String classifier = ArtifactCoords . DEFAULT_CLASSIFIER ;
325
324
String type = ArtifactCoords .TYPE_JAR ;
326
325
String version = null ;
327
326
if (coordsArr .length == 3 ) {
@@ -349,7 +348,7 @@ private ArtifactCoords appArtifact(QuarkusBootstrapMojo mojo)
349
348
}
350
349
}
351
350
352
- return new GACTV (groupId , artifactId , classifier , type , version );
351
+ return ArtifactCoords . of (groupId , artifactId , classifier , type , version );
353
352
}
354
353
355
354
@ Override
0 commit comments