Parcourir la source

Fix Archetype validation script to use correct path for pom files

Change-Id: I0402807724c8ec911c0af3192f883a49f08d60ac
tags/7.6.0.alpha3
Teemu Suo-Anttila il y a 9 ans
Parent
révision
17fda4abbc
2 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 4
    3
      scripts/BuildArchetypes.py
  2. 0
    1
      scripts/BuildHelpers.py

+ 4
- 3
scripts/BuildArchetypes.py Voir le fichier

import subprocess, sys import subprocess, sys
from BuildHelpers import mavenValidate, copyWarFiles, getLogFile, mavenCmd, updateRepositories, getArgs, removeDir, parser, resultPath from BuildHelpers import mavenValidate, copyWarFiles, getLogFile, mavenCmd, updateRepositories, getArgs, removeDir, parser, resultPath
from DeployHelpers import deployWar from DeployHelpers import deployWar
from os.path import join


## DEFAULT VARIABLES ## ## DEFAULT VARIABLES ##


try: try:
log = getLogFile(archetype) log = getLogFile(archetype)
generateArchetype(archetype, artifactId, args.repo) generateArchetype(archetype, artifactId, args.repo)
updateRepositories(artifactId)
updateRepositories(join(resultPath, artifactId))
mavenValidate(artifactId, logFile=log) mavenValidate(artifactId, logFile=log)
warFiles = copyWarFiles(artifactId, name=archetype) warFiles = copyWarFiles(artifactId, name=archetype)
for war in warFiles: for war in warFiles:
print("War %s failed to deploy: %s" % (war, e)) print("War %s failed to deploy: %s" % (war, e))
archetypesFailed = True archetypesFailed = True
except Exception as e: except Exception as e:
print("Archetype %s build failed" % (archetype, e))
print("Archetype %s build failed:" % (archetype), e)
archetypesFailed = True archetypesFailed = True
removeDir(artifactId)
# removeDir(artifactId)
print("") print("")
if archetypesFailed: if archetypesFailed:
sys.exit(1) sys.exit(1)

+ 0
- 1
scripts/BuildHelpers.py Voir le fichier

# pom.xml namespace workaround # pom.xml namespace workaround
root = ElementTree.parse(pomFile).getroot() root = ElementTree.parse(pomFile).getroot()
nameSpace = root.tag[1:root.tag.index('}')] nameSpace = root.tag[1:root.tag.index('}')]
print("Using namespace: %s" % (nameSpace))
ElementTree.register_namespace('', nameSpace) ElementTree.register_namespace('', nameSpace)


# Read the pom.xml correctly # Read the pom.xml correctly

Chargement…
Annuler
Enregistrer