aspose-cells / Aspose.Cells-for-Java

Aspose.Cells for Java examples, plugins and showcases
https://products.aspose.com/cells/java
MIT License
146 stars 100 forks source link

gradle error #46

Open hamedisu opened 4 years ago

hamedisu commented 4 years ago

hi I used the aspose cell in form of maven and it works but now I want to merge the project with another java project using gradle (instead of maven) but after adding the jar files downloaded from your site (from this page: https://downloads.aspose.com/cells/java), I face with this error: error: package com.aspose does not exist import com.aspose.cells.* in the code I have written there is no error, but when I want to run the project (same code as the file which have worked in maven before) this error appears !

please help me! many thanks in advance.

amjad-sahi commented 4 years ago

@hamedisu,

Well, you have not provided the details about your gradle configurations, please provide us complete details about your gradle configurations and settings. We think most possible cause of your issue should be due to the configuration of your environment, you need to evaluate it and fix it. If you still could not evaluate, we need your sample project to test your issue on our end.

hamedisu commented 4 years ago

Dear Amjad Thank you for your response. this is my build.gradle code:

plugins { // Apply the java plugin to add support for Java id 'java'

// Apply the application plugin to add support for building a CLI application.
id 'application'

}

repositories { // Use jcenter for resolving dependencies. // You can declare any Maven/Ivy/file repository here. jcenter() }

dependencies { // This dependency is used by the application. implementation 'com.google.guava:guava:28.2-jre'

// Use JUnit test framework
testImplementation 'junit:junit:4.12'
implementation 'com.microsoft.azure:msal4j:1.4.0'
implementation 'com.microsoft.graph:microsoft-graph:1.6.0'
implementation 'org.slf4j:slf4j-nop:1.8.0-beta4'

// https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '2.41.0' // https://mvnrepository.com/artifact/org.apache.poi/poi compile group: 'org.apache.poi', name: 'poi', version: '4.1.2' // https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-firefox-driver compile group: 'org.seleniumhq.selenium', name: 'selenium-firefox-driver', version: '3.141.59' // https://mvnrepository.com/artifact/com.aspose/aspose-cells // compile group: 'com.aspose', name: 'aspose-cells', version: '20.6' // https://mvnrepository.com/artifact/com.aspose/aspose-cells // compile group: 'com.aspose', name: 'aspose-cells', version: '8.2.1'

}

application { // Define the main class for the application. mainClassName = 'graphtutorial.App' }

run { standardInput = System.in }

hamedisu commented 4 years ago

ok many thanks for your guide. I find out ... I should add
maven { url "https://artifact.aspose.com/repo/" } at the repository section ... thank you very much.

amjad-sahi commented 4 years ago

@hamedisu ,

Yes, you should add maven repository into your build.gradle. Anyways, we are pleased that you have sorted out your issue now.