Hi, Please reply all; I'm not subscribed to the users list.
I'm running into some issues with mvn Netbeans plugin (Netbeans 5.5 . I've configured the "run project" using the Netbeans plugin and it apparently does work. But it fails in execution. Two problems:
1. I can't figure out how to get a file "META-INF/faban.xml" packaged into my execution jar. I've put it into "Other Roots" right along side assemblies and I've put it into main/java. Where should I put it and how do I tell mvn to package it?
2. The command that mvn executes to run the project appears to be wrong. What it says it is executing is:
java -jar diy-1.0-SNAPSHOT.jar -Dbenchmark.config=META-INF/faban.xml (see just below)
... but this doesn't work. The -Dbenchmark.config should be reordered, like this:
java -Dbenchmark.config=META-INF/faban.xml -jar diy-1.0-SNAPSHOT.jar
Any ideas or pointers to the doc would be appreciated...
Thanks,
Craig
This is the tail end of the run:
[jar:jar]
[INFO]Building jar: /Users/clr/diy/trunk/diy/target/diy-1.0-SNAPSHOT.jar
[WARN]DEPRECATED [descriptor]: Please use descriptors instead
[assembly:directory {execution: nb}]
[INFO]Copying 27 files to /Users/clr/diy/trunk/diy/target/executable-
netbeans
[INFO]artifact org.apache.maven:maven-project: checking for updates
from netbeansIDE-repo-internal
[INFO]artifact org.apache.maven:maven-plugin-api: checking for
updates from netbeansIDE-repo-internal
[netbeans-run:run-jar][INFO]Executing "java -jar diy-1.0-SNAPSHOT.jar - Dbenchmark.config=META-INF/faban.xml " in directory /Users/clr/diy/ trunk/diy/target/executable-netbeans
[INFO]Exited with return code=0[INFO]------------------------------------------------------------------ ------
[INFO]BUILD SUCCESSFUL[INFO]------------------------------------------------------------------ ------
[INFO]Total time: 5 seconds [INFO]Finished at: Thu Apr 05 16:46:01 PDT 2007 [INFO]Final Memory: 63M/115M[INFO]------------------------------------------------------------------ ------
Here's the pom.xml: <?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http:// www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:// maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <groupId>net.java.diy</groupId> <artifactId>diy</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>Do It Yourself</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.0.4</version> <scope>runtime</scope> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.0.4</version> <scope>compile</scope> </dependency> <dependency> <groupId>javax.persistence</groupId> <artifactId>persistence-api</artifactId> <version>1.0</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.apache.openjpa</groupId> <artifactId>openjpa-all</artifactId> <version>0.9.7-incubating-SNAPSHOT</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>2.0.3</version> <scope>compile</scope> </dependency> <dependency> <groupId>faban</groupId> <artifactId>fabandriver</artifactId> <version>2006.06.30</version> <scope>compile</scope> </dependency> </dependencies> <profiles> <profile> <id>netbeans-public</id> <activation> <property> <name>netbeans.execution</name> <value>true</value> </property> </activation> <build> <plugins> <plugin> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifest> <addClasspath>true</addClasspath><classpathPrefix>lib</ classpathPrefix> <mainClass>com.sun.faban.driver.core.MasterImpl</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>nb</id>
<phase>package</phase>
<goals>
<goal>directory</goal>
</goals>
<configuration>
<descriptor>${basedir}/src/main/
assemblies/netbeans-run.xml</descriptor>
<finalName>executable</finalName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<!-- =================== -->
<!-- Build Specification -->
<!-- =================== -->
<build>
<testResources>
<testResource>
<directory>${basedir}/src/test/resources</directory>
<includes>
<include>**/*.xml</include>
</includes>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>central</id>
<url>http://www.ibiblio.org/maven2</url>
</repository>
<repository>
<id>apache-snapshots</id>
<url>http://people.apache.org/repo/m2-snapshot-repository</url>
</repository>
</repositories>
</project>
Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!
smime.p7s
Description: S/MIME cryptographic signature
