Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 623675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:07:06+00:00 2026-05-13T19:07:06+00:00

I’m just transitioning from .NET to JAVA and have to start JAVA project with

  • 0

I’m just transitioning from .NET to JAVA and have to start JAVA project with Spring 3.0.0. and Hibernate.

Can someone please explain to me step_by_step how to download spring dependencies with Maven. I just spent whole day with absolutely no success.

PS. I have Java 1.5.06 and have already downloaded spring (with no dependencies) and installed Maven.

edit:

c0mrade:

I think as of spring 3.0.0. they are
considered to be optional dependencies
so they need to be included separately
each dependency, this is just a guess
I’m not sure about this, if Pascal or
someone more experienced confirms my
statement then its true, so far I’ve
worked with spring 2.5.5

Yes… They are definitely optional so this is what I did. I simply copy/pasted hibernate dependencies from spring-orm pom file to myproject pom file, meaning that now I have spring and hibernate dependencies in my pom file defined together. Then I ran “mvn install” on myproject and after that just hand copied all spring and hibernate jars to my project’s lib folder.

So now I have a Java project with spring and hibernate. 🙂

I’m learning Java and this is just my second day so so please tell me if I did something horribly wrong.

update:

rlovtang:

When using maven you don’t manually
download any dependencies (like
spring), neither do you hand copy any
jars to your projects lib folder. All
this is taken care of automatically by
maven when you run ‘mvn install’. How
do you package your application, is it
war?

I understand that. And it’s clear to me that Maven automatically manages classpath for dependencies in my local repository so my project can work normally on my local machine. And I also red that you have an option to pack your dependencies jars in your WAR or EAR, but what if I want to pack my application as JAR together with all dependencies JARs inside output (target) folder?
You see, I don’t want to deploy my JAR file with pom.xml only, but all the JARs that are needed for my application to run.


It still does not work:

this is my pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<dependencies>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring</artifactId>
        <version>3.0.0.</version>
    </dependency>
</dependencies>

When I hit “mvn install” I get this exception:

[INFO] Scanning for projects…
[INFO] ————————————————————————
[ERROR] FATAL ERROR
[INFO] ————————————————————————
[INFO] null
[INFO] ————————————————————————
[INFO] Trace
java.lang.NullPointerException
at org.apache.maven.artifact.versioning.DefaultArtifactVersion.parseVersion(DefaultArtifactVersion.jav
a:136)
at org.apache.maven.artifact.versioning.DefaultArtifactVersion.(DefaultArtifactVersion.java:47)
at org.apache.maven.artifact.versioning.VersionRange.createFromVersion(VersionRange.java:219)
at org.apache.maven.project.artifact.ProjectArtifactFactory.create(ProjectArtifactFactory.java:37)
at org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.
java:1017)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:8
80)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProject
Builder.java:508)
at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:604)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:487)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:391)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:272)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ————————————————————————
[INFO] Total time: < 1 second
[INFO] Finished at: Thu Feb 18 11:19:44 CET 2010
[INFO] Final Memory: 1M/2M
[INFO] ————————————————————————

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:07:07+00:00Added an answer on May 13, 2026 at 7:07 pm

    Actually, your POM is wrong, it’s missing essential parts. You need at least something like this (this is a minimal POM):

    <project>
      <modelVersion>4.0.0</modelVersion>
      <groupId>com.mycompany.myproject</groupId>
      <artifactId>my-app</artifactId>
      <version>1.0-SNAPSHOT</version>
      <name>My App</name>
    </project>
    

    To add a spring dependency, I then suggest to use the following:

    <project>
      <modelVersion>4.0.0</modelVersion>
      <groupId>com.mycompany.myproject</groupId>
      <artifactId>my-app</artifactId>
      <version>1.0-SNAPSHOT</version>
      <name>My App</name>
    
      <properties>
        <org.springframework.version>3.0.0.RELEASE</org.springframework.version>
      </properties>
    
      <dependencies>
    
        <!--
            Core utilities used by other modules.
            Define this if you use Spring Utility APIs (org.springframework.core.*/org.springframework.util.*)
        -->
        <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-core</artifactId>
          <version>${org.springframework.version}</version>
        </dependency>
    
      </dependencies>
    </project>
    

    For a full list of Spring artifacts, have a look at Obtaining Spring 3 Artifacts with Maven and pick up what you need.

    Update: Just FYI, there are numerous repository search engines that can help you to find artifacts. This might be helpful if you’re not used to Maven. Also note that you can get some IDE support for this (Idea, Eclipse, NetBeans, I think they all offer a repository search feature). Actually, in your case I’d suggest to use SpringSource Tools Suite (STS) which is an integrated version of Eclipse (bundling some plugins for Spring projects development, including Maven support). STS is a fully integrated environment, very close to what you can get in the .NET world IMO. You’ll like it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 451k
  • Answers 451k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can control the passed name via the constructor. public… May 15, 2026 at 8:44 pm
  • Editorial Team
    Editorial Team added an answer The command sent to SQL Server is sent is a… May 15, 2026 at 8:44 pm
  • Editorial Team
    Editorial Team added an answer Your query is right there is no need for putting… May 15, 2026 at 8:44 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.