in python/rpdk/java/codegen.py [0:0]
def package(self, project, zip_file):
"""Packaging Java project"""
def write_with_relative_path(path):
relative = path.relative_to(project.root)
zip_file.write(path.resolve(), str(relative))
jar = self._find_jar(project)
write_with_relative_path(jar)
write_with_relative_path(project.root / "pom.xml")
for path in (project.root / "src").rglob("*"):
if path.is_file():
write_with_relative_path(path)
# include these for completeness...
# we'd probably auto-gen then again, but it can't hurt
for path in (project.root / "target" / "generated-sources").rglob("*"):
if path.is_file():
write_with_relative_path(path)