Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8780221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:59:13+00:00 2026-06-13T19:59:13+00:00

I start learning packaging for several distros (currently Cygwin and Debian). They have requirement

  • 0

I start learning packaging for several distros (currently Cygwin and Debian).

They have requirement to build system to allow out-of-tree build (synonym out-of-source build):

http://wiki.debian.org/UpstreamGuide#Out-of-Tree_Builds

To work-around “dumb” build system for example cygport recommend use lndir (from xutils project):

  lndir ${S} ${B}
  cd {B}
  ...build-commands...

I read mvn(1) man page but doesn’t found anything appropriated. Next I just try:

  $ mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
  ...
  $ pwd
  /maven/simple
  $ ls 
  my-app
  $ mvn -f my-app/pom.xml compile
  ...
  [INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ my-app ---
  [INFO] Compiling 1 source file to /maven/simple/my-app/target/classes

As you can see target directory created in source root hierarchy while I look for a way to avoid this.

Is it possible out-of-tree build with maven? And how?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T19:59:14+00:00Added an answer on June 13, 2026 at 7:59 pm

    It might be as simple as having a

    <build>
        <directory>/your/build/directory</directory>
    </build>
    

    in your pom.xml. /your/build/directory need not be in the source tree and can be parameterized using the usual ${...} syntax.

    Cheers,

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to start learning OO JS and have one quick question (i
I want to start learning OpenGL but I don't really want to have to
I'm about to start learning HTML5 and I'd like to pick an editor. Currently
I'm trying to start learning C++ and I have a problem. I'm trying to
I want to start learning Android but have the following doubts : (1) What
I am having trouble finding a good place to start learning assembly. I have
I have installed Xampp version 1.7.7 for windows and i want to start learning
I just start learning C++. When I execute my code it's jumping out of
I have recently started having a need to start learning Java Script. My application
I want to start learning to program for OSX but have only programmed for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.