directory « Development « Maven/Ant Q&A

Home
Maven/Ant Q&A
1.Ant
2.artifact
3.dependency
4.deploy
5.Development
6.eclipse
7.glassfish
8.hudson
9.integration
10.jetty
11.junit
12.m2eclipse
13.module
14.netbeans
15.package
16.plugin
17.POM
18.repository
19.svn
Maven/Ant Q&A » Development » directory 

1. Handling unconventional source directory for a web project in maven    stackoverflow.com

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 ...

2. Maven compile with multiple src directories    stackoverflow.com

Is there a way to compile multiple java source directories in a single maven project?

3. What are some additional directory conventions for Maven projects?    stackoverflow.com

Maven 2 uses a standard directory layout for projects, documented here: http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html What I'm wondering is: are there recommended conventions for other projects besides the plain-vanilla Java library, JEE and WebApp ...

4. What are the benefits of sticking with maven's default project directory structure?    stackoverflow.com

Simply put, if you're using maven, should you treat the maven layout as the gold standard, or should you convert your layout to fit your tooling (WASD, myEclipse, RAD, etc.)? ...

5. Maven2 property that indicates the parent directory    stackoverflow.com

I have a multi-modules project, like this one:

main-project/
    module1/
    module2/
        sub-module1/
        ...

6. Maven2 compiler custom execution source directory and target directory    stackoverflow.com

I want to run the maven compiler plugin in a different phase and with different sourceDirectories and destinationDirectories such that code from directories other than src/main/java and src/test/java can be used. I ...

7. Maven - Add directory to classpath while executing tests    stackoverflow.com

The Junits I have in my project need to load property files from the classpath. How can I specify the directory of those property files so that Maven will set that ...

8. How to remove generated build artefacts from Maven's target directory?    stackoverflow.com

How to remove generated build artefacts from Maven's target directory? Maven generates a jar or war file to target directory. I'd like to remove that file after maven has installed the ...

9. Setting the generated source directory for annotation processors in Maven    stackoverflow.com

I'm trying to move a build which generates sources using an annotation processor to Maven. I've tried configuring the maven-compiler-plugin as follows:

 <plugins>
  <plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-compiler-plugin</artifactId>
 ...

10. maven use a different directory for site source files than src/site    stackoverflow.com

I need to configure where my Maven 2 project's site files are located, by default they are src/site/, I'd like to point them to src-documentation/site, how would I override Maven's default ...

11. Change output directory for apt-maven-plugin    stackoverflow.com

I am using apt-maven-plugin to process some Beehive Netui annotations before building a war. The output of the apt processing is a _pageflow directory which contains struts config files (xml text) and ...

12. Problems with maven output directory    stackoverflow.com

I'm using almost same POM for both my projects, they are on the same workspace but they are not related at all, they are related however because in both I use ...

13. Maven - how to include empty directories    stackoverflow.com

By default during the build process maven is removing the empty directories.
Do you know if a parameter can be specified in the pom to instruct maven to include empty directories in ...

14. How to configure IntelliJ IDEA and/or Maven to automatically add directories with Java source code generated using jaxb2-maven-plugin?    stackoverflow.com

In our project we are using jaxb2-maven-plugin to generate Java source code from XML Schema, which causes that our Maven module requires additional source code directory (in our case target/generated/main/java). Up ...

15. In a Maven project, what are reasons for either a nested or a flat directory layout?    stackoverflow.com

As my Maven project grows, I'm trying to stay on top of the project structure. So far, I have a nested directory layout with 2-3 levels, where there's a POM on ...

16. delete the 'target' directory after build    stackoverflow.com

i know this is probably frowned upon by maven lovers, but the whole 'target' directory is a waste of space in the context of our program and it's deployment. we have ...

17. Upload/Download entire directory to Nexus through Maven    stackoverflow.com

Is it possible to upload/download an entire directory and all of the sub-directories within it to/from a Nexus repository server?

18. Setting up a standard directory layout using Maven    stackoverflow.com

I'm new to Maven and have skimmed over the documentation as I am following the Hibernate tutorial at http://docs.jboss.org/hibernate/stable/core/reference/en/html_single/#tutorial-firstapp-mvn. I have installed Maven and successfully setup a web-app but this ...

19. Wrong working directory used when tagging Maven release    stackoverflow.com

When I run release:prepare on my Maven project, it fails when attempting the scm-tag phase. My Maven project uses Bazaar for its SCM. My plugin versions are maven-release-plugin 2.0 and maven-scm-plugin 1.4

[INFO] ...

20. Is there a way to run tests with Maven, without copying all my test resources to the target directory?    stackoverflow.com

We have over 800 MB of test case resource files that are Excel format. Every time I run the "mvn clean test" command, they get re-copied to the target directory, and ...

21. Maven: How to change path to target directory from command line?    stackoverflow.com

Maven: How to change path to target directory from command line? (I want to use another target directory in some cases)

22. Maven directory structure    stackoverflow.com

I'm new to Maven and I've been reading all morning tutorials (amazing tool). This new Java project I started looking at however doesn't use the default directory structure. Instead of src/main/java for ...

23. create directory when needed in maven    stackoverflow.com

I am using maven-exec-plugin to generae java sources of Thrift. It invokes the external Thrift compiler and using -o to specify the output directory, "target/generated-sources/thrift". The problem is neither maven-exec-plugin nor ...

24. Convert existing web-app file structure to maven file structure?    stackoverflow.com

I have an existing web application that creates a .war file. I want to convert the directory structure to maven's conventions. And I'm a bit lost. In particular, the current .war, created ...

25. Need a good "home" directory for web-app during Maven build    stackoverflow.com

I have a Java web application that uses JNDI to determine its "home" directory where various configuration files and logging takes place. During a Maven build, we set the home ...

26. Add .mf & .xml files in META-INF directory inside a Maven built EAR    stackoverflow.com

I have arbitrary .xml & .mf files that i have to add in the META-INF folder inside the ear itself. Build is done using maven2.2.1. Simply adding those files under ${basedir}/src/main/application/META-INF/ ...

27. Name the root directory of project generated with Maven Archetype    stackoverflow.com

How can I control the name of the top directory of the maven module created by my maven archetype? Currently it creates a new folder named$artifactId. Or even more directly, is ...

28. YUI source directory filter    stackoverflow.com

I am using YUI maven plugin and I want to know how to compress a specific directory and exclude all others. In maven I declare src/main/webapp/javascript to get all .js files in ...

29. Where should I place java and test folders in webapp maven project?    stackoverflow.com

There is an archetype for webapp:

mvn archetype:generate -DgroupId=com.company \
                       ...

30. Strange Maven behaviour with different project directory paths    stackoverflow.com

I have a fresh git clone of my Java project located at C:\dev\1234567890 (don't worry about the name yet) and commanding mvn clean compile ends with BUILD SUCCESS. How ever Maven ...

31. Using maven using non standard directory layout    stackoverflow.com

I am trying to apply maven to an existing project which already a directory structure in place. All I can find from previous question is the following. Maven directory structure However, my ...

32. Publish compiled Flex application and other resources to directory in Maven?    stackoverflow.com

I just got all set up and compiling in Maven with Flex-Mojos, and now my next question is how I would "publish" my compiled application to an arbitrary directory along with ...

33. In the Maven Standard Directory Layout where do I put Rules Engine files?    stackoverflow.com

In the Maven Standard Directory Layout where do I put Rules Engine files? Specifically, I'm using JBoss Rules (Drools), if that matters.

34. .hgignore file is not ignoring the maven target/site directory    stackoverflow.com

I've created a basic maven/mercurial setup. I've created a .hgignore in the working directory. I have added the following to the .hgignore file (as per the instructions in http://mercurial.selenic.com/wiki/.hgignore

/target$
/.DS_Store$
.DS_Store$
I ...

35. How to traverse up the directory structure and kick off mvn build in vimscript?    stackoverflow.com

I'm a new vim user who is looking for a little help with a script that would allow me to call mvn build. Currently I map this as follows

map <F3> :! mvn ...

36. Maven download or fetch the wsdl from the url to project directory    stackoverflow.com

We developed a web service client application using the wsdls from the url location. I don't want the webservice client to go and validate the actual wsdls everytime , so wanted to ...

37. How to build from my checkout directory ... with a twist    stackoverflow.com

We're using Maven 3 with Git as our SCM system. We are using the latest version of the scm plugin (1.5). Our project is in Grails 1.2.1 (Java 1.5). ...

38. Where to to keep the img or css directory conforming to maven project structure?    stackoverflow.com

Maven suggests 'resources' to be placed in

src/main/resources
directory. For webapps sources, it suggests
src/main/webapp
I find it a little confusing. My web-app would need images and css files. Should I place them ...

39. Maven exec:java : how to open and read a file in the resources directory?    stackoverflow.com

here is the structure of my project.

proj
  ---src
    ----main
        ----java
           ...

40. Specifying directory for checkout    stackoverflow.com

I'm not sure if the following is possible or not: I have uploaded my Maven project test-app to my repository. I would now like to go onto a different machine and checkout ...

41. Maven resource files, put java class files and property files in same directory    stackoverflow.com

I have java class files and property files in the same directory. src/main/java/com/berlin/Test.class src/main/java/com/berlin/Test.properties With the maven jar I build and the maven target, I want these to appear in the same directory. ...

42. How to rename a directory with the artifactId when using a Maven archetype?    stackoverflow.com

How can I rename a directory in a custom Maven archetype to be the contents of ${artifactId}? I have a directory named service/App1 that I want to customize to be service/${artifactId}. This ...

43. How to run maven from another directory (without cd to project dir)?    stackoverflow.com

Supposing my maven project is located in /some/location/project and my current location is /another/location/ how can I run maven build without changing to project location cd /some/location/project?

44. Can i move files out of maven directory files by maven assembly?    stackoverflow.com

Right, is it possible do such a horrible move? :) I can still copy only to jars/run-bin/run directory. However i don't get any problems if i set directory where i copy ...

45. How do I make my archetype from a multimodule project use directories that are based on the artifactId?    stackoverflow.com

I have create an archetype using archetype:create-from-project out of a multi module project. The archetype-metadata.xml is like below, what I would want is that the "dir" can be modified when I run ...

46. maven: change the directory in which tests are executed    stackoverflow.com

In my code I have set to create some files in ./ directory, because when the software will be deployed in the installation machine, all the configuration files will be created ...

47. Correct way to build "live" directory structure after maven build?    stackoverflow.com

I have a multi module maven project which looks something like:

  • main
    • component_one
      • subcomponent_bob
      • subcomponent_mike
      • subcomponent_joe
    • component_one_aggregate
    • component_two
      • subcomponent_tim
      • subcomponent_lary
    • component_two_aggregate
The aggregate projects create parent jars for each of the components containing all of their subcomponents. I have a pom in each ...

48. Which Maven source directory should contain application.xml? - src/main/config or src/main/resources    stackoverflow.com

Which Maven source directory should contain application.xml? - src/main/config or src/main/resources

49. Can resource directory be a subdirectory of sources in maven?    stackoverflow.com

I am trying to create a maven build for one of our legacy projects. Since one of the requirements is to be still compatible with the legacy ant build script I ...

50. maven-antrun-plugin does not copy required files to the specified directory    stackoverflow.com

I have seperate "application.properties" files for each environment like "application-dev.properties", "application-qa.properties", "application-prod.properties". Which have the environment specific properties specified and has to overwrite the default "application.properties". My pom.xml has the below snippet ...

51. How do I set directory permissions in maven output?    stackoverflow.com

I am using the maven-assembly-plugin to package my build. I am able to perform some copying of file sets and modify file permissions fine, but I am unable to modify directory permissions. ...

52. How to run java class in JAR file in maven target directory?    stackoverflow.com

I would like to run my Izpack installer after maven build, but I am getting following output after executing "mvn test":

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building RS IzPack installer
[INFO]   ...

53. Maven directory structure: good place for SQL (DDL, ...) scripts    stackoverflow.com

What's the "best" place for SQL, DDL, ... scripts in the Maven standard directory structure? See http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html I bet almost every web project uses a DB and some kind of SQL ...

54. Inject the Mercurial working directory changeset id such as (838cb9c0367e) into properties file via Maven?    stackoverflow.com

We use Maven for our builds and Mercurial for our changesets. While our software has a major version handled already we would really like to be able to know what ...

55. How do I include an empty directory in a maven assembly?    stackoverflow.com

In what must be a common occurence, I need to include an empty directory in an assembly. In my case it is logs/. I've tried different variations in the assembly descriptor like:

<fileSet>
 ...

56. How can I strip the version from the output directory of maven-dependency-plugin:unpack?    stackoverflow.com

I need to unpack an artifact, and I need to use it's unpacked location in several places (in multiple files). I don't want to have to update all the copies ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.