# Daml codegen --root argument not working

**URL:** <https://forum.canton.network/t/daml-codegen-root-argument-not-working/6438>\
**Category:** App Development\
**Tags:** daml, codegen, features and bugs, daml-sdk\
**Created:** [April 18, 2023, 1:47am UTC](https://forum.canton.network/t/daml-codegen-root-argument-not-working/6438 "2023-04-18T01:47:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![huw](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/huw/32/2343_2.png) [@huw](https://forum.canton.network/u/huw)\
**Post date:** [April 18, 2023, 1:47am UTC](https://forum.canton.network/t/daml-codegen-root-argument-not-working/6438/1 "2023-04-18T01:47:16Z")

</div>

I have tried running daml codegen for java, as follows but the `-r` or `--root` argument seems to be ignored. I’m using sdk 2.6.0. It just does the codegen for all the templates in the DAR even with `-r` option set.

`daml codegen java -o output -r 'Only\.This\.Package\..*' /path/to/my-package.dar`
