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

  • SEARCH
  • Home
  • 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 8231033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:20:18+00:00 2026-06-07T17:20:18+00:00

everyone here is the build script apply{ plugin ‘java’ } sourceCompatibility=1.5 List spring =

  • 0

everyone

here is the build script

apply{
    plugin 'java'
}

    sourceCompatibility=1.5

    List spring = ["org.springframework:spring-webmvc:$springVersion@jar",
                   "org.springframework:spring-orm:$springVersion@jar",
                   "org.springframework:spring-context-support:$springVersion@jar"]

    List spring_js = [ "org.springframework.webflow:spring-js:2.0.7.RELEASE@jar",
                       "org.apache.ibatis:com.springsource.com.ibatis:2.3.4.726@jar",
                       "com.caucho:com.springsource.com.caucho:3.2.1@jar",
                       "org.apache.axis:com.springsource.org.apache.axis:1.4.0@jar",
                       "javax.wsdl:com.springsource.javax.wsdl:1.6.1@jar"]

    configurations {
        compile {
            description = 'compile classpath'
            transitive = true
        }
        runtime {
            extendsFrom compile
        }
    }

    def localMavenRepo = 'file://' + new File(System.getProperty('user.home'), '.m2/repository').absolutePath

    repositories{
        mavenCentral()
        maven{
            url localMavenRepo
        }
    }

    dependencies{
        compile spring, spring_js, 'commons-fileupload:commons-fileupload:1.2.1','org.apache.struts:com.springsource.org.apache.struts:1.2.9',
                'javax.xml.rpc:com.springsource.javax.xml.rpc:1.1.0','org.apache.commons:com.springsource.org.apache.commons.dbcp:1.2.2.osgi',
                'commons-io:commons-io:1.3.2','hsqldb:hsqldb:1.8.0.7','org.apache.tiles:tiles-jsp:2.2.0','org.tuckey:urlrewritefilter:3.1.0',
                'org.apache.tiles:tiles-core:2.2.0'
        runtime 'javax.servlet:jstl:1.2','org.aspectj:aspectjweaver:1.6.5','javax.servlet:servlet-api:2.5','javax.servlet.jsp:jsp-api:2.1'
        testCompile 'junit:junit:4.6'
    }

The jars are present in local maven repo but when I run gradle –info clean build the build fails with errors such as

/home/anadi/Code/gradle-samples/java-proj/gradleSpringJpetStore/src/main/java/org/springframework/samples/jpetstore/web/spring/SignonInterceptor.java:17: cannot find symbol
symbol  : class HttpServletResponse
location: class org.springframework.samples.jpetstore.web.spring.SignonInterceptor
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
                                                         ^
/home/anadi/Code/gradle-samples/java-proj/gradleSpringJpetStore/src/main/java/org/springframework/samples/jpetstore/web/spring/RemoveItemFromCartController.java:9: package org.springframework.web.util does not exist
import org.springframework.web.util.WebUtils;
                                   ^

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

Total time: 4.969 secs

If I run the same build with maven it picks up all dependencies from the local repo and does a compile successfully. I also tried the –refresh-dependencies switch but no help.

  • 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-06-07T17:20:21+00:00Added an answer on June 7, 2026 at 5:20 pm

    As Benjamin said, you are probably missing a dependency declaration. Note that your use of @jar disables transitive dependency resolution. @jar means ” I want just this Jar, not any of the dependencies declared in its POM”.

    The preferred way to declare the local Maven repo is repositories { mavenLocal() }. Unless you have some other build installing into the local Maven repository and this build pulling from it, it is neither recommended nor necessary to declare mavenLocal() though. Gradle is smart enough to automatically steal Jars from the local Maven repo (to avoid downloading them) if their checksum matches.

    Your configurations block can be removed completely. All of that is already configured by the java plugin.

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

Sidebar

Related Questions

Ahoy hoy everyone :) Here is a list of links. You will need it
Hello everyone here... I need to build up a swing application related to vehicle
Hello everyone I have error which breaks up my build for no reason, here
Hello everyone here is my DAO class : public class UsersDAO extends HibernateDaoSupport {
i hope that everyone here know the php 'variable variable' syntax: $color = 'red';
I thought to share this relatively smart problem with everyone here. I am trying
I'm trying to create a web application project template for everyone to use here
First question here so hello everyone. The requirement I'm working on is a small
everyone! new to here and been pondering about this myself for some times with
Hey everyone, here is the site in question: http://www.myvintagesecret.com/ I have a bunch of

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.