Skip to content

Commit abbe241

Browse files
committed
Attempt at fixing publish
1 parent e70e92d commit abbe241

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/snapshot_release.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,16 @@ jobs:
3131
# (right after <artifactId>), so it no longer inherits dev.langchain4j
3232
sed -i '/<artifactId>langchain4j-spring-boot-starter<\/artifactId>/a\ <groupId>com.bridge</groupId>' \
3333
langchain4j-spring-boot-starter/pom.xml
34-
# Remove the central-publishing-maven-plugin from the parent POM
34+
# Remove the entire central-publishing-maven-plugin <plugin> block from the parent POM
3535
# (it has extensions=true which hijacks the deploy phase away from maven-deploy-plugin)
36-
sed -i '/<groupId>org.sonatype.central<\/groupId>/,/<\/plugin>/d' pom.xml
36+
python3 -c "
37+
import re
38+
with open('pom.xml', 'r') as f:
39+
content = f.read()
40+
content = re.sub(r'\s*<plugin>\s*<groupId>org\.sonatype\.central</groupId>.*?</plugin>', '', content, flags=re.DOTALL)
41+
with open('pom.xml', 'w') as f:
42+
f.write(content)
43+
"
3744
3845
- name: snapshot_release
3946
env:

0 commit comments

Comments
 (0)