Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

TeamCity - package javax.servlet does not exist

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I'm trying to build this https://github.com/marekbruchaty/SimpleJavaWebApp project with teamcity. But I get the error package javax.servlet does not exist

Where exactly should I place the servlet-api.jar for teamcity - Intellij IDEA type runner to look for it and compile it?

Teamcity and gitlab are hosted on a centos server. Tomcat is also installed on the centos server.

I tried copying servlet-api.jar to buildAgent/lib and /opt/teamcity/TeamCity/.BuildServer/lib/ but still I get the error.  Or does it have to be in the gitlab along with source code?


This is the first time I'm using teamcity or building a project.


 
Saloon Keeper
Posts: 13384
295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not familiar with TeamCity, but most CI tools use the build tools that are natural to the language you've written your application in. When building locally, do you use Maven or Ant? TeamCity probably has an interface to configure these build tools. I imagine that for Maven you don't really need to do anything else, but if you build you application with Ant you probably need to configure the directory where the build dependencies are located.
 
John Herrington
Greenhorn
Posts: 20
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Figured it out.

I had to paste the path to servlet-api.jar into Build Step -> Project SDKs -> JDK Jar files patters.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic