{"action":"opened","issue":{"url":"https://api.github.com/repos/Azure/azure-iot-sdk-java/issues/370","repository_url":"https://api.github.com/repos/Azure/azure-iot-sdk-java","labels_url":"https://api.github.com/repos/Azure/azure-iot-sdk-java/issues/370/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-iot-sdk-java/issues/370/comments","events_url":"https://api.github.com/repos/Azure/azure-iot-sdk-java/issues/370/events","html_url":"https://github.com/Azure/azure-iot-sdk-java/issues/370","id":379208747,"node_id":"MDU6SXNzdWUzNzkyMDg3NDc=","number":370,"title":"iot-device-client-{version}-with-deps.jar is missing","user":{"login":"philippegirard","id":8143308,"node_id":"MDQ6VXNlcjgxNDMzMDg=","avatar_url":"https://avatars3.githubusercontent.com/u/8143308?v=4","gravatar_id":"","url":"https://api.github.com/users/philippegirard","html_url":"https://github.com/philippegirard","followers_url":"https://api.github.com/users/philippegirard/followers","following_url":"https://api.github.com/users/philippegirard/following{/other_user}","gists_url":"https://api.github.com/users/philippegirard/gists{/gist_id}","starred_url":"https://api.github.com/users/philippegirard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philippegirard/subscriptions","organizations_url":"https://api.github.com/users/philippegirard/orgs","repos_url":"https://api.github.com/users/philippegirard/repos","events_url":"https://api.github.com/users/philippegirard/events{/privacy}","received_events_url":"https://api.github.com/users/philippegirard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-09T15:34:20Z","updated_at":"2018-11-09T15:34:20Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nHi there! thank you for discovering and submitting an issue!\r\n\r\nPlease first tell us a little bit about the environment you're running:\r\nThe commands in the comments can be run directly in a command prompt.\r\n-->\r\n\r\n- **OS and version used:** <VERSION> Windows 10 Professional Build 17134.345\r\n\r\n- **Java runtime used:** <VERSION> openjdk version \"1.8.0_181\"\r\n\r\n- **SDK version used:** <VERSION> 1.14.1\r\n\r\n\r\n# Description of the issue:\r\nRelated to https://github.com/Azure/azure-iot-sdk-java/issues/265, but on a different platform.\r\n\r\n`iot-device-client-{version}-with-deps.jar` is missing\r\n\r\nStep to reproduce: \r\n* Follow the tutorial at: https://github.com/Azure/azure-iot-sdk-java/blob/master/doc/java-devbox-setup.md#installiotsource\r\n* I run `mvn install`\r\n* Target folder afterward:\r\n![image](https://user-images.githubusercontent.com/8143308/48270477-33849b80-e408-11e8-80e8-27161709398d.png)\r\n* `iot-device-client-{version}-with-deps.jar` is missing\r\n\r\n# My Fix\r\n* Open to `{IoT SDK for Java root}/device/iot-device-client/pom.xml`\r\n* Add the following plugin in the `<plugins>` list\r\n```XML\r\n<plugin>\r\n   <artifactId>maven-assembly-plugin</artifactId>\r\n   <configuration>\r\n      <descriptorRefs>\r\n         <descriptorRef>jar-with-dependencies</descriptorRef>\r\n      </descriptorRefs>\r\n   </configuration>\r\n   <executions>\r\n      <execution>\r\n         <id>make-my-jar-with-dependencies</id>\r\n         <phase>package</phase>\r\n         <goals>\r\n            <goal>single</goal>\r\n         </goals>\r\n      </execution>\r\n   </executions>\r\n</plugin>\r\n```\r\n* Run `mvn clean install -DskipTests`\r\n* State of the the target folder afterward\r\n![image](https://user-images.githubusercontent.com/8143308/48271085-8579f100-e409-11e8-9ba7-ca1d37aa3e82.png)\r\n\r\nThen I was able to use the jar in my ecplise project without all the errors related to missing third party jars.\r\n\r\n# Code sample exhibiting the issue:\r\nI wanted to do a PR to help you fix it, but I was not able to. Maybe I am doing something wrong.\r\n![image](https://user-images.githubusercontent.com/8143308/48271636-c1fa1c80-e40a-11e8-89be-447b55f096d6.png)\r\n\r\n\r\n# Console log of the issue:\r\nTypical error I was getting when using the .jar without the dependencies in it:\r\n```\r\nException in thread \"AWT-EventQueue-0\" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory\r\n\tat com.microsoft.azure.sdk.iot.device.CustomLogger.<init>(CustomLogger.java:16)\r\n\tat com.microsoft.azure.sdk.iot.device.IotHubConnectionString.<init>(IotHubConnectionString.java:125)\r\n\tat com.microsoft.azure.sdk.iot.device.DeviceClient.<init>(DeviceClient.java:176)\r\n\tat iot.IOTInterface.<init>(IOTInterface.java:16)\r\n```\r\n\r\n\r\n# Need Support?\r\n* Have a feature request for SDKs? Please post it on [User Voice](https://feedback.azure.com/forums/321918-azure-iot) to help us prioritize.\r\n* Have a technical question? Ask on [Stack Overflow](https://stackoverflow.com/questions/tagged/azure-iot-hub) with tag “azure-iot-hub”\r\n* Need Support? Every customer with an active Azure subscription has access to support with guaranteed response time.  Consider submitting a ticket and get assistance from Microsoft support team\r\n* Found a bug? Please help us fix it by thoroughly documenting it and filing an issue on GitHub (C, Java, .NET, Node.js, Python).\r\n"}}
{"actor":{"display_login":"philippegirard"}}