Project: springxd
Issue XD-2772: No validation for module packaging during module upload
One can upload a module which doesn't contain "config" package with module configuration artifacts (e.g. XML, groovy, properties etc.) using the "module upload" command in Spring XD shell. During stream deployment this will result in a cryptic exception: {code}Mar 02, 2015 10:45:48 PM org.springframework.shell.core.SimpleExecutionStrategy invoke SEVERE: Command failed org.springframework.xd.rest.client.impl.SpringXDException: Multiple top level module resources found :file [/opt/spring-xd/spring-xd-1.1.0.RELEASE/xd/config/jms-activemq.properties],file [/opt/spring-xd/spring-xd-1.1.0.RELEASE/xd/config/xd-container-logger.properties],file [/opt/spring-xd/spring-xd-1.1.0.RELEASE/xd/config/jms-hornetq.properties],file [/opt/spring-xd/spring-xd-1.1.0.RELEASE/xd/config/xd-singlenode-logger.properties],file [/opt/spring-xd/spring-xd-1.1.0.RELEASE/xd/config/xd-admin-logger.properties],file [/opt/spring-xd/spring-xd-1.1.0.RELEASE/xd/config/httpSSL.properties],file [/opt/spring-xd/spring-xd-1.1.0.RELEASE/xd/config/hadoop.properties]{code} Root cause is most likely the module ClassLoader setup which delegates to parent ClassLoader which in turn scans $XD_HOME/config directory and discovers a number of properties files. It would nice if Spring XD would validate the module during "module upload" command and prevent uploading of invalid modules.
Story points: 2