Discussion:
pom.basedir blanked out with Netbeans 6?
Lally Singh
2007-10-09 18:48:59 UTC
Permalink
Hey all,

I'm having trouble with ${pom.basedir} in my project. I have a few
XML files used by DBUnit, but DBUnit won't find the files when run in
netbeans (runs great on the command line).

The relevant parts:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>dbunit-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.0.5</version>
</dependency>
</dependencies>
<configuration>
<driver>com.mysql.jdbc.Driver</driver>
<format>flat</format>
<url>jdbc:mysql://localhost/quickstart</url>
<username>--</username>
<password>--</password>
<dataTypeWarning>true</dataTypeWarning>
</configuration>
<executions>
<execution>
<id>testdata_upload_vto</id>
<phase>test-compile</phase>
<goals><goal>operation</goal></goals>
<configuration>
<type>CLEAN_INSERT</type>
<src>${pom.basedir}/src/test/data/db_vto.xml</src>
<url>jdbc:mysql://localhost/vto</url>
</configuration>
...


I get this back:

------------------------------------------------------------------------
[ERROR]BUILD ERROR
------------------------------------------------------------------------
src/test/data/db_vto.xml (No such file or directory)


Any ideas why ${pom.basedir} is apparently blank?

Where do I find documentation on the builtin properties like ${pom.basedir}?

And yeah, the file's still there :-)

Thanks in advance,

-Lally
--
H. Lally Singh
Ph.D. Candidate, Computer Science
Virginia Tech
Milos Kleint
2007-10-10 06:07:10 UTC
Permalink
I didn't hear about "pom.basedir" so far, I always use just "basedir".
if pom.basedir was introduced in 2.0.5+ then it won't be recognized in
the netbeans, because it's currently using a maven embedder version
that is very close to 2.0.4 version. After upgrading to upcoming 2.1,
the issue will go away.

Milos Kleint
Post by Lally Singh
Hey all,
I'm having trouble with ${pom.basedir} in my project. I have a few
XML files used by DBUnit, but DBUnit won't find the files when run in
netbeans (runs great on the command line).
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>dbunit-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.0.5</version>
</dependency>
</dependencies>
<configuration>
<driver>com.mysql.jdbc.Driver</driver>
<format>flat</format>
<url>jdbc:mysql://localhost/quickstart</url>
<username>--</username>
<password>--</password>
<dataTypeWarning>true</dataTypeWarning>
</configuration>
<executions>
<execution>
<id>testdata_upload_vto</id>
<phase>test-compile</phase>
<goals><goal>operation</goal></goals>
<configuration>
<type>CLEAN_INSERT</type>
<src>${pom.basedir}/src/test/data/db_vto.xml</src>
<url>jdbc:mysql://localhost/vto</url>
</configuration>
...
------------------------------------------------------------------------
[ERROR]BUILD ERROR
------------------------------------------------------------------------
src/test/data/db_vto.xml (No such file or directory)
Any ideas why ${pom.basedir} is apparently blank?
Where do I find documentation on the builtin properties like ${pom.basedir}?
And yeah, the file's still there :-)
Thanks in advance,
-Lally
--
H. Lally Singh
Ph.D. Candidate, Computer Science
Virginia Tech
---------------------------------------------------------------------
Loading...