I use the cargo maven plugin to donwload jboss as a dist and deploy our ear. The JBoss we use is 7.1.0
My problem is, that we need an additional module in JBoss. How can I copy a module to the JBoss in the target directory?
I tried it with this config:
<configuration>
<type>standalone</type>
<files>
<file>
<file>${project.basedir}/modules/springframework</file>
<todir>../../installs/jboss-as-dist-7.1.1.Final/jboss-as-7.1.1.Final/modules</todir>
</file>
</files>
</configuration>
But this gives me this error: [ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.2.1:start (start-container) on project gevomanagementservice_test_integration: Execution start-container of goal org.codehaus.cargo:cargo-maven2-plugin:1.2.1:start failed: Failed to copy source file [C:\\blabla/modules/springframework] to [C:\\blabla\\target\\cargo\\configurations\\jboss71x/../../installs/jboss-as-dist-7.1.1.Final/jboss-as-7.1.1.Final/modules/springframework]: C:\\blabla\\modules\\springframework (The system cannot find the file specified) -> [Help 1]
It looks like I can only copy files with this config. Is there a possiblity to copy whole directories?
I came across this problem as well. But I only need to copy a handful of files so that's not an issue for me. I haven't actually tried below solution myself but in theory it may work.
Assuming you want to deploy your artifact by cargo and run integration test. I think you may choose to bind your cargo:install goal to, say, package phrase. Then have another plugin, ie maven-antrun-plugin to do the folder copying task, in package phrase as well. Then in pre-integration-test phrase, you can bind cargo:start (or deploy. See cargo reference ) to start your jboss instance. The maven life cycle will look like:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.