I imported a sample project into my workspace and when i tried executing it, I found build path errors as
.../springframework/..3.1.0 release.jar(missing)
.
.
.
.
.//all such framework .jar files missing
I tried importing spring framework libraries all those missing libraries shown in the build path, but couldn't solve the errors.(i have imported spring release of 4.0.5 version)
If i need to only import 3.1.0 release, please do share the link from where i have to download the required libraries.
Probably the project you imported has absolute references to the Spring jars. Right click on the project and go to Properties/Java Build path/Libraries. Remove the absolute references and add the new ones.
Concerning the Spring 3.1 jars, you can download them from here: http://mvnrepository.com/artifact/org.springframework/spring-core/3.1.1.RELEASE
Add spring jar dependency into pom.xml then click on mvn clean & install.
Related
I am upgrading current system to spring boot 2.5.2 . I have custom spring boot starter which I installed to my local maven repository. But its generating plain jar. I installed plain jar but the project I am gonna use this starter looking for normal jar. When I disable plain jar and install normal jar , its looking plain jar. Is there any way to install both or is there any other way to look only plain jar or normal jar.
Java version is 11, Gradle version is 6.8.3, spring boot version is 2.5.2 , spring boot dependency management version is 1.0.8
In the custom starter one of the module added as a "api project" when I change that to "compile project" in build.gradle it worked. Because of "api project" when it generating jar and pom file it was adding classifier as a "plain" and it was searching plain-jar. After change it, everything worked for me.
sorry , I can't comment. I can't understand your mean.
depend on your message , I know you have write a starter that install to local maven, maybe like mvn install , but I don't know what is plain jar, what is normal jar.
I am trying to use loaded jar files of my class path into my module. I
know requires will accept only modules names.
my jar files are present inside the Spring Jar Files folder.
I tried to use #Configuration annotation inside my appConfig.java file and IDE could not recognize it.
Your help is much appreciated as I am new to the programming world.
Normally, I use Maven or Gradle to handle all the jars.
It seems you have just started with Spring.
I suggest you try Spring Boot with Maven or Gradle to manage the library and the code lifecycle (compile, build, test).
This is one tutorial for example: https://spring.io/guides/gs/spring-boot/
You can add a jar in Eclipse by right-clicking on the Project → Build Path → Configure Build Path. Under Libraries tab, click Add Jars or Add External JARs and give the Jar.
Example link
The above solution is obviously a "Quick" one. However, if you are working on a project where you need to commit files to the source control repository, I would recommend adding Jar files to a dedicated library folder within your source control repository and referencing few or all of them as mentioned above.
I'd suggest go for the second one if you are planning to build this as a proper project and put it in a source control repo.
I am trying to build a web application based on the project library CitySDK, but i don't know how to import it properly into my own project.
I have created a Maven Web Application and added the CitySDK library as a Dependency, and then Selected the Project, right-clicked and Selected Build with Dependencies. No errors appeared, and in the image below you can see it appeared as a dependency.
However, whenever i try to use some of the classes specific to it, in my own Web Application(called TourismApplication's TestClass.java), the compiler displays an error, that the package is unknown. Could anyone suggest ideas as to what i have missed? I have followed a few Maven tutorials, but without any effects.
The dependencies are as follows:
Ok I did some digging and I think I figured out your problem. Their POM file is incorrect based on the structure of project.
First off, I'll paraphrase what I think the steps you took to get it built in your project were, to ensure I followed the same steps to get it working. These are the steps I took:
Cloned/downloaded the sources from the link you placed in the OP
Built the project into a jar file by running the command they said to use: mvn clean package assembly:single
Installed the artifact in your local Maven repo using mvn install
Added a dependency in your project POM
I tried the same thing you did, using the library in a test source file, to no avail. I looked at the .jar file that was built using their instructions and didn't find any .class files archived into it... it was essentially empty.
Turns out, their src folder structure follows Maven standards, but their POM file indicates the sources are down a different chain of directories. If you examine the build log closely, you see "[INFO] No sources to compile"
The POM.xml file they provide specifies the source directory as
<sourceDirectory>src/citysdk/tourism/client</sourceDirectory>
However, the actual files are at
src\main\java\citysdk\tourism\client
After changing the line in the POM file from the above to (similarly for tests):
<sourceDirectory>src/main/java/citysdk/tourism/client</sourceDirectory>
<testSourceDirectory>src/test/java/citysdk/tourism/client/tests</testSourceDirectory>
rebuilt, and installed, it worked when I tried to use it in my project. Hope this helps.
FYI, I used IntelliJ as my IDE, but it should work the same with Eclipse.
I am using eclipse as my ide. I had imported some spring projects from my instructor. In those when I expand the project in server deployment list, it shows spring web library. I created some project of my own from scratch but in those i cant see any expanding icon on my project in the server deployment list. And my project isnt running as well. What can I do so that my project also shows up the library? I checked the deployment library and it shows all the libs.
Also in my marker I see this error. How to correct this.
Description Resource Path Location Type
Archive for required library: 'E:/path/to/local/repo/org/springframework/spring-expression/3.1.1.RELEASE/spring-expression-3.1.1.RELEASE.jar' in project 'SpringTemp' cannot be read or is not a valid ZIP file SpringTemp Build path Build Path Problem
Got it .
Changed the version of spring framework version in POM file from 3.1.1 to 3.2.3 and it worked.
I am trying to use Maven and JDeveloper for a week now and I'm always get stuck with the same problem. I can download and install the extensions and create new Maven projects. When I package or compile them I can see that the sources are being downloaded and added to my local repository but they are not added in my .jar and I cannot use them in my project unless I add them as lib manually in my project.
If I try to add the folder (where the downloaded jars are) as lib folder to project they are only added as jar and I cannot use them.
Is there another way to update my dependencies from JDeveloper? How can I integrate them properly to my project so I can use them? Is there a newer Hands-On maybe solving my problems? What am I doing wrong? Is there a template project to download maybe? I hope I could explain my problem good enough...