{"action":"created","issue":{"url":"https://api.github.com/repos/maven-nar/nar-maven-plugin/issues/156","labels_url":"https://api.github.com/repos/maven-nar/nar-maven-plugin/issues/156/labels{/name}","comments_url":"https://api.github.com/repos/maven-nar/nar-maven-plugin/issues/156/comments","events_url":"https://api.github.com/repos/maven-nar/nar-maven-plugin/issues/156/events","html_url":"https://github.com/maven-nar/nar-maven-plugin/issues/156","id":61518982,"number":156,"title":"narSystemDirectory violates 'Convention over configuration' principle","user":{"login":"ponomandr","id":1173842,"avatar_url":"https://avatars.githubusercontent.com/u/1173842?v=3","gravatar_id":"","url":"https://api.github.com/users/ponomandr","html_url":"https://github.com/ponomandr","followers_url":"https://api.github.com/users/ponomandr/followers","following_url":"https://api.github.com/users/ponomandr/following{/other_user}","gists_url":"https://api.github.com/users/ponomandr/gists{/gist_id}","starred_url":"https://api.github.com/users/ponomandr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ponomandr/subscriptions","organizations_url":"https://api.github.com/users/ponomandr/orgs","repos_url":"https://api.github.com/users/ponomandr/repos","events_url":"https://api.github.com/users/ponomandr/events{/privacy}","received_events_url":"https://api.github.com/users/ponomandr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-14T09:14:11Z","updated_at":"2015-03-16T14:55:41Z","closed_at":null,"body":"**tl;dr**\r\nChange default value of `narSystemDirectory` from `target/nar/nar-generated` to `target/generated-sources/nar`\r\n\r\n**Rationale**\r\nBy convention Maven plugins put generated sources to `target/generated-sources/<something>` directory. This value is so common that many IDEs recognize it by default and attach this directory as a source dir to the project. I'm not sure about Eclipse, but Intellij and Netbeans do this.  Intellij IDEA even warns you if you try to modify a file in the 'generated-sources' dir.\r\n\r\nOn the other hand, Intellij IDEA marks `target` directory as \"excluded\". So the content of the directory is completely ignored (except 'generated-sources' subdirectory). Because of that, `NarSystem.java` is not visible for IDE and the project cannot compile.\r\n\r\nMoreover, it's not possible to configure `narSystemDirectory` to point to `target/generated-sources'\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/maven-nar/nar-maven-plugin/issues/comments/81714113","html_url":"https://github.com/maven-nar/nar-maven-plugin/issues/156#issuecomment-81714113","issue_url":"https://api.github.com/repos/maven-nar/nar-maven-plugin/issues/156","id":81714113,"user":{"login":"ctrueden","id":556626,"avatar_url":"https://avatars.githubusercontent.com/u/556626?v=3","gravatar_id":"","url":"https://api.github.com/users/ctrueden","html_url":"https://github.com/ctrueden","followers_url":"https://api.github.com/users/ctrueden/followers","following_url":"https://api.github.com/users/ctrueden/following{/other_user}","gists_url":"https://api.github.com/users/ctrueden/gists{/gist_id}","starred_url":"https://api.github.com/users/ctrueden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctrueden/subscriptions","organizations_url":"https://api.github.com/users/ctrueden/orgs","repos_url":"https://api.github.com/users/ctrueden/repos","events_url":"https://api.github.com/users/ctrueden/events{/privacy}","received_events_url":"https://api.github.com/users/ctrueden/received_events","type":"User","site_admin":false},"created_at":"2015-03-16T14:55:41Z","updated_at":"2015-03-16T14:55:41Z","body":"I agree that `target/generated-sources` would be more consistent with standard Maven practices. And changing it would be easy; see:\r\n```\r\n$ git grep 'nar-generated'\r\nsrc/main/java/com/github/maven_nar/Library.java:    @Parameter(defaultValue = \"${project.build.dir}/nar/nar-generated\", required = true)\r\nsrc/main/java/com/github/maven_nar/Library.java:    private String narSystemDirectory = \"nar-generated\";\r\nsrc/site/apt/configuration.apt: [narSystemDirectory] Specifies the NarSystem source directory. Defaults to target/nar/nar-generated.\r\n```\r\n\r\nI also agree with @dscho that after this change, testing should be done in Eclipse, NetBeans, IntelliJ and CLI to verify that everything works in all four.\r\n\r\n@ponomandr I would also suggest being careful with your analysis of such issues; my understanding is that both NetBeans and IDEA lean heavily on Maven CLI tools to do the build, so things are supposed to work the same as on the CLI in those IDEs. If IDEA currently has problems, it would be good to have an [MCVE](http://stackoverflow.com/help/mcve) illustrating otherwise, rather than jumping straight to a proposed solution."}}