maven


How to edit the directory structure in Maven?


I am using Maven project, when i create the Maven module of jar packaging, maven auto generates directory structue as src/main/java, src/main/resources, src/test/java and src/test/resources. Can I edit the above names as per my wish? Can I add new folders to the same parent? Also when i googled, I came to know abt super POM, can anybody suggest how to edit the same with the custom directory structure. I have configured sonatype maven to my eclipse from the link http://m2eclipse.sonatype.org/sites/m2e
Assuming you have a good reason to do this, you can rename the folders and indicate to maven what is the edited one by specifying the appropriate properties/sections in pom.xml of your project. I suppose m2e will pick up the changes once made to the pom.
The relevant section in your case would be (from the superpom)
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>${project.basedir}/src/test/resources</directory>
</testResource>
</testResources>
If you want to add additional source folders or resources (not subfolders), then you can use build helper maven plugin. Again, not sure what m2e will do.

Related Links

Integration Test with failsafe
Add plugins to a maven build by adding a dependency
Copy all the files from a folder in to another by comparing files in it
Unpack jar into a folder with same name as the file
Maven 3 - Unable to find archetype
Maven 2 & 3 differences on dependency:analyze with cycle
Building FlywayDB from Source fails finding sqlline 1.1.8 dependency
To configure Maven to consult central Maven repository instead of the Nexus
How to do passed the maven task of bamboo?
Extend Maven artifact search in Intellij
How to configure Angular2 application using typescript with Maven?
Skip Build failure in maven if the integration test fails
Concordion execute Fixture different project
how to tell jenkins to restart tomcat after deployment?
Android NDK Make File and Maven Build Issues
Disable Maven Settings inheritance

Categories

HOME
ms-access
osgi
plot
relay
rsync
maven-3
packages
jxls
cross-browser
append
kentor-authservices
dax
imacros
collectd
google-cloud-ml
messages
ef-migrations
jtextfield
riot.js
facebook-access-token
react-css-modules
fopen
spring-mybatis
minitab
replaceall
compatibility
procdump
stormpath
http-status-code-503
hybridauth
subset-sum
streamreader
opshub
azure-ml
tasker
sql-server-agent
core-plot
elmah
modelmapper
s
qcombobox
skeleton-css-boilerplate
outlook-2013
upstart
tizen-native-app
mu
git-diff
mplayer
elgg
colorama
pg-dump
knpmenubundle
pdfclown
url-pattern
database-optimization
system.management
ios8-today-widget
citrus-pay
emailrelay
processmodel
cisco-ios
remobjects
dereference
lustre
codeigniter-url
codeigniter-routing
preferences
zend-route
yorick
valueconverter
kgdb
concurrent-collections
geos
commoncrypto
dataservice
buster.js
django-nonrel
seed
simba
chuck
sublist
funscript
venn-diagram
cascalog
hgsubversion
external-accessory
rfc1123
actionview
gallio
suppress
exchange-server-2003
paul-graham

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App