NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
smozely
Joined: 06 Oct 2009 Posts: 29
|
Posted: Thu Apr 01, 2010 2:25 am Post subject: Changing Maven 'Test' Binding |
|
|
Hi all,
What I would like to do is be able to right-click on a file in a maven project and run a maven goal with a profile and pass in the class that has been clicked on ... i.e.
mvn verify -P test -Dtest=${className}
I've been following the instructions from this page
http://wiki.netbeans.org/MavenBestPractices
I first tried adding a new Custom action but this didn't work because custom goals seem to only be bindable to the Project level. Not an individual file.
So I thought I could override the "Test File" action, and this works fine .... but only the first time I run it the next time it breaks. I think it is because Netbeans treats test file in a special way.
Just wondering if anyone could offer advice on how I could achieve my goals (pun)
- Steve |
|
| Back to top |
|
 |
Milos Kleint Posted via mailing list.
|
Posted: Thu Apr 01, 2010 1:11 pm Post subject: Changing Maven 'Test' Binding |
|
|
On Thu, Apr 1, 2010 at 4:25 AM, smozely <address-removed ([email]address-removed[/email])> wrote:
| Quote: | Hi all,
What I would like to do is be able to right-click on a file in a maven project and run a maven goal with a profile and pass in the class that has been clicked on ... i.e.
mvn verify -P test -Dtest=${className}
I've been following the instructions from this page
http://wiki.netbeans.org/MavenBestPractices
I first tried adding a new Custom action but this didn't work because custom goals seem to only be bindable to the Project level. Not an individual file.
|
nice enhancement I guess.. it could generally work on the maven side, there's just no UI now to show goal execution action on a file (except for the generic ones)
| Quote: |
So I thought I could override the "Test File" action, and this works fine .... but only the first time I run it the next time it breaks. I think it is because Netbeans treats test file in a special way.
|
probably related to "compile on save" combo.. when you disable it, you should be getting exactly what you want.
Milos
| Quote: | Just wondering if anyone could offer advice on how I could achieve my goals (pun)
|
|
|
| Back to top |
|
 |
smozely
Joined: 06 Oct 2009 Posts: 29
|
Posted: Mon Apr 05, 2010 9:40 pm Post subject: |
|
|
Hi Milos,
Thanks very much for the response. It now works as we want it to.
-Steve |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|