Adding artifacts to module


I want to add a new artifact to the module programatically when the module is created. So I have created a class which overrides JavaModuleBuilder and have access to the modifiableRootModel. I have used it to add libraries to the module settings, so was wondering if I can add new artifcat settings so that a jar is generated and copied to a custom location.


Original message URL:

1 comment
Comment actions Permalink

So why doesn't ArtifactManager.createModifiableModel() work for you?

A little correction: artifacts are project-level enities - so it' technically impossible "to add an artifact to a module".


Please sign in to leave a comment.