You should add a new profile run-with-netbeans in your pom that declares the additional dependencies (use the provided scope to not include them in the release).
Then you'll have to add the new profile to your IDE to run the pom with the -P run-with-netbeans option in the command line.
<properties>
<!-- provided by default -->
<my-dynamic-scope>provided</my-dynamic-scope>
</properties>
<profiles>
<profile>
<id>run-with-netbeans</id>
<properties>
<!-- compile when running in IDE -->
<my-dynamic-scope>compile</my-dynamic-scope>
</properties>
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
</dependencies>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>${commons-lang.version}</version>
<scope>${my-dynamic-scope}</scope>
</dependency>
</dependencies>
The snippet above add log4j only when running with the run-with-netbeans profile. It also sets a property my-dynamic-scope that can be used in your dependency block to change the scope.
HIH
M.