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

dist and native-win could not be activated, no POM in directory
How to get all the specified jars mentioned in the pom.xml and transitively dependent jars?
mvn testng can't run test suite while Idea can
Put Maven plugins in nexus repository
java.lang.NoClassDefFoundError: org/glassfish/jersey/server/spi/Container
Build Best Practices to avoid Classloader leaks - OutOfMemoryError: PermGen space
mule testing, NoClassDefFoundError org.springframework.core.OrderComparator$OrderSourceProvider
Mule DevKit - transformer / Cannot load application's classes
Skip execution of a plugin based on a property
Using Maven-JarJar plugin
Mule Server 3.7.0 error: “Failure to find com.mulesoft.weave:mule-plugin-weave_2.11:jar:3.7.0”
How to configure maven multi module project and FindBugs?
Can Karaf download dependencies from maven repository on its own?
How to change maven home directory?
Will fluentlenium pom.xml dependncy download all dependancies that it requires?
Couchbase Template Version 1.4.2

Categories

HOME
image-processing
c#-4.0
office365api
fme
vmware
grep
framework7
microservices
frameworks
webpack-2
networkx
indesign
azure-storage-tables
autotools
windows-10-universal
correlation
windows-azure-storage
static-libraries
quickfix
workload-scheduler
progressive-web-apps
introduction
clickonce
core-text
realex-payments-api
tdd
spark-jobserver
virtualdub
publish
assistant
msys2
libuv
google-cloud-nl
tinymce-4
fabric8
gtrendsr
perlin-noise
asset-pipeline
x11-forwarding
broadcastreceiver
unoconv
optix
grid.mvc
reportingservices-2005
google-closure
nomethoderror
acoustics
convertapi
wptoolkit
babel-core
dotcover
pubmed
alphabet
return-value
tizen-native-app
media-player
akka-cluster
word-vba-mac
elements
azure-virtual-network
skype4py
two-factor-authentication
spim
lib.web.mvc
collapse
jqgrid-formatter
ibaction
apache-commons-fileupload
generic-programming
ami
p2
block-device
operator-precedence
c3
camanjs
nsbutton
internet-connection
meteor-velocity
soundtouch
pushbackinputstream
plasma
spring-validator
robotics-studio
factory-method
browser-detection
google-email-migration
javaspaces
errai
subgurim-maps
datareader
gamequery
ext3
avatar
phonon
zend-decorators
caching-application-block

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App