19

I've inherited a web project (Servlets) which is currently build inside eclipse.

I want to add maven around it. But the project's source directory is not following the maven convention. Instead of being inside src/main/java, it's src/package/name/...

I don't want to change anything right now because they are working at full speed towards a milestone. Can I configure maven to accept src/ as the java source directory ? Thanks

Rich Seller
  • 83,208
  • 23
  • 172
  • 177
ashitaka
  • 3,928
  • 7
  • 38
  • 43

1 Answers1

32

Just add this to your pom in the build section.

<sourceDirectory>${basedir}/src</sourceDirectory>

Here's the relevant section of the POM doc on configuring the directories.

sblundy
  • 60,628
  • 22
  • 121
  • 123