I am creating an application with Springboot that would merge fields and convert doc/docx to pdf. However, I am having an error in dependency when installing Aspose.Words for Java using Gradle. Is this the right way on how to install it to my project? Here’s what I added to my build.gradle file:
compile('com.aspose:aspose-words:20.5:jdk17')
Here’s the error I got:
Could not resolve: com.aspose:aspose-words:20.5
@marksantosph,
Please try adding the following configurations to your build.gradle file:
maven {
url "https://repository.aspose.com/repo/" }
and
compile (
group: 'com.aspose',
name: 'aspose-words',
version: '20.5',
classifier: 'jdk17')
Hope, this helps.
Thanks @awais.hafeez . It worked like a charm. Cheers!
Hi,
Could you confirm it is correct to use compile rather than implementation in Gradle config - my understanding is that compile is deprecated in Gradle build.gradle - What's the difference between implementation, api and compile in Gradle? - Stack Overflow
@chrisbeecham2,
We have checked ‘compile’ and ‘implementation’ in Gradle config and both of them are working fine on our end. Sure, you may change ‘compile’ to ‘implementation’ like this:
maven {
url "https://repository.aspose.com/repo/" }
implementation (
group: 'com.aspose',
name: 'aspose-words',
version: '21.3',
classifier: 'jdk17')