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 7660723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:30:15+00:00 2026-05-31T13:30:15+00:00

So I have a maven project which produces a jar package containing some ant

  • 0

So I have a maven project which produces a jar package containing some ant tasks.

When I run my ant build script somewhere else with jpda open, and debug the tasks, say MyTask with NetBeans, the Apple Code Changes button doesn’t work. Here is the output of the netbeans console:

cd /trunks/tasks; JAVA_HOME=/opt/jdk /opt/netbeans-7.0/java/maven/bin/mvn -Djpda.stopclass=com.abc.ant.MyTask compile
Scanning for projects...

------------------------------------------------------------------------
Building tasks 1.0-SNAPSHOT
------------------------------------------------------------------------

[resources:resources]
Using 'UTF-8' encoding to copy filtered resources.
Copying 1 resource to com/abc/ant

[compiler:compile]
Compiling 1 source file to /trunks/tasks/build/classes
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 1.548s
Finished at: Fri Mar 09 17:45:24 CST 2012
Final Memory: 11M/149M
------------------------------------------------------------------------
NetBeans: classes to reload: []
NetBeans: No class to reload

So Netbeans does successfully tell Maven what class needs to be compiled. However, NetBeans won’t reload the compiled class. Is it because my ant process is using the jar package produced by the Maven project, or because of other reasons?

Note: I have some custom configurations, like where to output the compiled classes, and where to put the jar package. Could that be a reason?


Update 2:

OK I found the reason by myself.

It’s because I added the following line under <build> in the pom.xml:

<directory>${my.custom.work.dir}/build</directory>

So maven will output the compiled class files to this directory, rather than the default ${basedir}/target. However, Netbeans seems to be too stupid to recognize that — it just tries the default directory.

Now the question could be much easier: is there any way to make the IDE recognize that by adding configuration in the pom?

  • 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-05-31T13:30:16+00:00Added an answer on May 31, 2026 at 1:30 pm

    In [your_home_path]/.netbeans/7.0/maven/conf you will find a setting.xml file.
    Here you can set ${my.custom.work.dir} in <profiles> tag
    You can find examples here (in section Properties)

    Edit :

    It works for me with this kind of POM (in Netbeans 7.0.1) :

     <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
        </plugins>
        <directory>${my.custom.work.dir}/build</directory>
    </build>
    <properties>
    <my.custom.work.dir>/home/alain/Bureau</my.custom.work.dir>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    

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

Sidebar

Related Questions

I have a non-trivial maven build which produces a jar fille and I want
I have a maven project built in '/some/where' which I wish to run/execute from
I have a maven project A which uses jar files of another project B
I have a project in which I used maven fail-safe plugin to run the
I have a Maven project which generates a 413.06 KB jar file. I have
I have a maven project which uses the shade plugin to create a jar
I have a maven project which is build and tested in Jenkins. On my
We have created a jar(Spring project) which we are including using Maven in another
I have maven project X which depends on project Y. when I run the
I have a maven project which generates a jar via the maven assembly plugin

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.