I'm using Documents4j to convert an rtf file to pdf file. I don't have MS word or anything on my computer, so it seems that I will need to use a remote converter. Information here: http://documents4j.com/#/.
My project is setup with spring-boot. I went through and set up shading for maven using maven-shade-plugin based on some issues on GitHub. However, I cannot run the command that Documents4j suggests to get the server running:
java -jar documents4j-server-standalone-shaded.jar http://localhost:9998
I get:
Error: Unable to access jarfile documents4j-server-standalone-shaded.jar
.
My pom.xml file brings in the shade plugin.
Here is the plugin in my pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
</configuration>
</execution>
</executions>
</plugin>
Here are the dependencies I am using in regards to Documents4j: (perhaps something important is missing?)
<dependency>
<groupId>com.documents4j</groupId>
<artifactId>documents4j-api</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>com.documents4j</groupId>
<artifactId>documents4j-client</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>com.documents4j</groupId>
<artifactId>documents4j-server-standalone</artifactId>
<version>1.0.3</version>
</dependency>
Based on what I read on the Documents4j page, it seems that the command should just work, so I assume that the jar file isn't being created.
I can't seem to find that jarfile anywhere... so I have been unable to run the java -jar command with a path instead of just a name.
Also, I was unsure about what "configuration" I may need in the plugin. Perhaps there's a trick to getting the maven shading to work? Maybe I'm misunderstanding what the Documents4j page is saying? Maybe it works differently for Macs? Maybe Documents4j isn't a good choice?
I greatly appreciate all assistance.