Skip to content

Commit 4b61ce3

Browse files
committed
If coordinates are used attempt only the artifactId if profile not found. Fixes #9759
1 parent c19db7e commit 4b61ce3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

grails-shell/src/main/groovy/org/grails/cli/profile/repository/StaticJarProfileRepository.groovy

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
package org.grails.cli.profile.repository
1717
import groovy.transform.CompileStatic
18+
import org.eclipse.aether.artifact.DefaultArtifact
19+
import org.grails.cli.profile.Profile
1820

1921
/**
2022
* A JAR file repository that resolves profiles from a static array of JAR file URLs
@@ -35,5 +37,12 @@ class StaticJarProfileRepository extends AbstractJarProfileRepository {
3537
}
3638
}
3739

38-
40+
Profile getProfile(String profileName) {
41+
def profile = super.getProfile(profileName)
42+
if(profile == null && profileName.contains(':')) {
43+
def art = new DefaultArtifact(profileName)
44+
profile = super.getProfile(art.artifactId)
45+
}
46+
return profile
47+
}
3948
}

0 commit comments

Comments
 (0)