I am trying to create a Confluence rest Plugin which offers the possibility to upload a file to the server,. currently I am using atlas-run for testing.
My attempts to use parts of the many samples on how to achieve this with jax-rs and jersey,
didnt work out with fulfilling the packaging dependencies.
@FormDataParam seems to need jersey-multipart package:
<dependency> <groupId>com.sun.jersey.contribs</groupId> <artifactId>jersey-multipart</artifactId> <version>1.9</version> </dependency>
using this in my pom.xml, leads to more needed
com.sun.packages and ongoing “missing requirements” messages like
missing requirement [261.0] osgi.wiring.package; (osgi.wiring.package=com.sun.net.server) and more …
but looking at the packages from atlassian:
import com.atlassian.plugins.rest.common.multipart.MultipartForm; import com.atlassian.plugins.rest.common.multipart.MultipartFormParam; import com.atlassian.plugins.rest.common.multipart.fileupload; import com.atlassian.plugins.rest.common.multipart.jersey;
everything should already be there by using
<dependency> <groupId>com.atlassian.plugins.rest</groupId> <artifactId>atlassian-rest-common</artifactId> <version>3.0.14</version> <scope>provided</scope> </dependency>
at least the apache felix web management console display all necessary packages.
I am pretty much stuck here and I could use some help on how to achieve this.
there must be a way …
Thanx in advance!