{"action":"created","issue":{"url":"https://api.github.com/repos/sculptor/sculptor/issues/172","labels_url":"https://api.github.com/repos/sculptor/sculptor/issues/172/labels{/name}","comments_url":"https://api.github.com/repos/sculptor/sculptor/issues/172/comments","events_url":"https://api.github.com/repos/sculptor/sculptor/issues/172/events","html_url":"https://github.com/sculptor/sculptor/issues/172","id":62314686,"number":172,"title":"The imported btdesing file could not be found when trying the \"Cross Project\" feature","user":{"login":"zhongweijun","id":6158512,"avatar_url":"https://avatars.githubusercontent.com/u/6158512?v=3","gravatar_id":"","url":"https://api.github.com/users/zhongweijun","html_url":"https://github.com/zhongweijun","followers_url":"https://api.github.com/users/zhongweijun/followers","following_url":"https://api.github.com/users/zhongweijun/following{/other_user}","gists_url":"https://api.github.com/users/zhongweijun/gists{/gist_id}","starred_url":"https://api.github.com/users/zhongweijun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhongweijun/subscriptions","organizations_url":"https://api.github.com/users/zhongweijun/orgs","repos_url":"https://api.github.com/users/zhongweijun/repos","events_url":"https://api.github.com/users/zhongweijun/events{/privacy}","received_events_url":"https://api.github.com/users/zhongweijun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-17T07:14:16Z","updated_at":"2015-03-17T09:38:55Z","closed_at":null,"body":"Environment: \r\nJDK: \"1.7.0_40-ea\"\r\nMaven: 3.1.1\r\nEclipse: eclipse-dsl-luna-SR2-win32-x86_64 with Xtext SDK 2.8.0 pre-installed.\r\nSculptor: 3.0.6\r\n\r\nI tryed the \"Cross Project\" feature example which is mentioned in the \"Advanced Tutorial\". \r\n(1) I created a \"org.foo.common\" project, and defined 2 btdesign files. The org.foo.common project could be compiled successfully.\r\nThe content of file \"model.btdesign\":\r\n**********************************************************************\r\nimport \"classpath:/model-sharedtypes.btdesign\"\r\n\r\nApplication FooCommon {\r\n\tbasePackage = org.foo.common\r\n}\r\n***********************************************************************\r\nThe content of file \"model-sharedtypes.btdesign\"\r\n***********************************************************************\r\nApplicationPart CommonPart {\r\n \r\n    Module sharedtypes {\r\n        basePackage=org.foo.common.sharedtypes\r\n \r\n        BasicType Money {\r\n            String currency;\r\n            BigDecimal amount;\r\n        }\r\n    }\r\n}\r\n***********************************************************************\r\n\r\n(2) I created the other \"org.bank\" project, and defined its btdesign which is imported model-sharedtypes.btdesign. And, I included the org.foo.common project with client classifier as well, the Xtext editor doesn't report any error.\r\nThe content of model.btdesign:\r\n***********************************************************************\r\nimport \"classpath:/model-sharedtypes.btdesign\"\r\n\r\nApplication Bank {\r\n    basePackage = org.bank\r\n\r\n    Module accounting {\r\n        Entity Account {\r\n            String accountNumber key;\r\n            - @Money balance;\r\n        }\r\n    }\r\n}\r\n***********************************************************************\r\nBut when I was trying to compile the \"org.bank\" project with maven install, an error was thrown by maven. Below is the detailed info: \r\n[ERROR] Failed to execute goal org.sculptorgenerator:sculptor-maven-plugin:3.0.6:generate (code-generation) on project org.bank: Execution code-generation of goal org.sculptorgenerator:sculptor-maven-plugin:3.0.6:generate failed: org.eclipse.xtext.resource.FileNotFoundOnClasspathException: Couldn't find resource on classpath. URI was 'classpath:/model-sharedtypes.btdesign' -> [Help 1]\r\n[ERROR] \r\n\r\nIt seems that the imported \".btdesign\" file could not be found by Xtext. What's the problem? Is it an issue of migrating to Xtext 2.8.0?\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/sculptor/sculptor/issues/comments/82245344","html_url":"https://github.com/sculptor/sculptor/issues/172#issuecomment-82245344","issue_url":"https://api.github.com/repos/sculptor/sculptor/issues/172","id":82245344,"user":{"login":"tjuerge","id":2626998,"avatar_url":"https://avatars.githubusercontent.com/u/2626998?v=3","gravatar_id":"","url":"https://api.github.com/users/tjuerge","html_url":"https://github.com/tjuerge","followers_url":"https://api.github.com/users/tjuerge/followers","following_url":"https://api.github.com/users/tjuerge/following{/other_user}","gists_url":"https://api.github.com/users/tjuerge/gists{/gist_id}","starred_url":"https://api.github.com/users/tjuerge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjuerge/subscriptions","organizations_url":"https://api.github.com/users/tjuerge/orgs","repos_url":"https://api.github.com/users/tjuerge/repos","events_url":"https://api.github.com/users/tjuerge/events{/privacy}","received_events_url":"https://api.github.com/users/tjuerge/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T09:38:55Z","updated_at":"2015-03-17T09:38:55Z","body":"Sculptors cross-project feature is based on Mavens classpath dependency resolution:\r\n\r\nThe imported \"model-sharedtypes.btdesign\" has to be packaged (together with the corresponding model implementation classes) in the root folder of the JAR created from the \"org.foo.common\" project.\r\nThe importing \"org.bank\" project has to add the \"org.foo.common\" project (with the aforementioned model definition and implementation) to the list of its dependencies.\r\n\r\nIn the Eclipses project navigator view check the importing \"org.bank\" projects \"Maven Dependencies\" if here the imported  \"org.foo.common\" projects JAR is listed. Uncollapse the JARs node and check if the model.btdesign is listed as well."}}