Hallo Maki!
Ich dachte es liegt an der NetBeans 7.2 Konfiguration, darum habe ich das nicht angegeben:
1. Ich habe die neueste Version von Nexus auf meinem Server installiert. Alles mit den Standardvorgaben, und der Standardinstallationsanleitung.
2. Auf meinem Computer habe ich die settings.xml anhand der Nexus-Anleitung (siehe
Repository Management with Nexus: 4.2.*Configuring Maven to Use a Single Nexus Group / Documentation Sonatype.com) gebaut:
***
[xml]
<settings>
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>saNexus</id>
<mirrorOf>*</mirrorOf>
<url>http://nexus.mydomain.org:9999/nexus/content/groups/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>saNexus</id>
<!--Enable snapshots for the built in central repo to direct -->
<!--all requests to nexus via the mirror -->
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<!--make the profile active all the time -->
<activeProfile>saNexus</activeProfile>
</activeProfiles>
</settings>
[/xml]
***
3. NetBeans 7.2 habe ich frisch installiert (Standardkonfiguartion).
4. Das Projekt wurde komplett in NetBeans mit dessen Maven-Unterstützung gebaut. Der Zugriff auf das Repository (für die Dependencies) funktioniert einwandfrei. Das Projekt wird fehlerfrei 'gebaut', und das Programm funktioniert auch ordnungsgemäß.
5. Hier meine pom.xml
***[xml]
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.mydomain</groupId>
<artifactId>jr4ao</artifactId>
<version>2.1</version>
<packaging>jar</packaging>
<name>jr4ao</name>
<url>http://www.mydomain.org</url>
<scm>
<connection>scm:svn:https://svn.mydomain.org:6666/svn/jr4ao/trunk/</connection>
<developerConnection>scm:svn:https://svn.mydomain.org:6666/svn/jr4ao/trunk/</developerConnection>
</scm>
<inceptionYear>2009</inceptionYear>
<developers>
<developer>
<id>cjs</id>
<name>Christian-Josef Schrattenthaler</name>
<email>hotline@mydomain.org</email>
<url>http://www.mydomain.org</url>
<organization>My Company</organization>
<organizationUrl>http://www.mydomain.org</organizationUrl>
<roles>
<role>Developer</role>
</roles>
</developer>
</developers>
<organization>
<name>My Company</name>
<url>http://www.mydomain.org</url>
</organization>
<build>
<finalName>${project.artifactId}</finalName>
<!-- List der aktuellen Plugins unter:
Maven - Available Plugins -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<mainClass>org.mydomain.jr4ao.jr4ao</mainClass>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
</manifest>
<manifestEntries>
<Implementation-Build>${buildNumber}</Implementation-Build>
</manifestEntries>
</archive>
<excludes>
<exclude>fonts/**</exclude>
<exclude>jasper/**</exclude>
<exclude>jrxml/**</exclude>
<exclude>odbc/**</exclude>
</excludes>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- Infos zu diesem Plugin unter:
Build Number Maven Plugin - Introduction -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
<format>{0,number}</format>
<items>
<item>buildNumber0</item>
</items>
</configuration>
</plugin>
<plugin>
<!-- Mit Maven können keine Dateien kopiert werden, darum ein kleiner Ant-Task. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>process-resources</phase>
<configuration>
<target>
<copy todir="${basedir}/target/fonts">
<fileset dir="${basedir}/src/main/resources/fonts" includes="**/*" />
</copy>
<copy todir="${basedir}/target/jasper">
<fileset dir="${basedir}/src/main/resources/jasper" includes="**/*" />
</copy>
<copy todir="${basedir}/target/jrxml">
<fileset dir="${basedir}/src/main/resources/jrxml" includes="**/*" />
</copy>
<copy todir="${basedir}/target/odbc">
<fileset dir="${basedir}/src/main/resources/odbc" includes="**/*" />
</copy>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.swinglabs.swingx</groupId>
<artifactId>swingx-all</artifactId>
<version>1.6.3</version>
</dependency>
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.7</version>
<exclusions>
<exclusion>
<artifactId>bctsp-jdk14</artifactId>
<groupId>org.bouncycastle</groupId>
</exclusion>
<exclusion>
<artifactId>bcprov-jdk14</artifactId>
<groupId>bouncycastle</groupId>
</exclusion>
<exclusion>
<artifactId>bcmail-jdk14</artifactId>
<groupId>bouncycastle</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>4.6.0</version>
<exclusions>
<exclusion>
<artifactId>xmlbeans</artifactId>
<groupId>org.apache.xmlbeans</groupId>
</exclusion>
<exclusion>
<artifactId>xml-apis</artifactId>
<groupId>xml-apis</groupId>
</exclusion>
<exclusion>
<artifactId>poi-ooxml-schemas</artifactId>
<groupId>org.apache.poi</groupId>
</exclusion>
<exclusion>
<artifactId>poi-ooxml</artifactId>
<groupId>org.apache.poi</groupId>
</exclusion>
<exclusion>
<artifactId>jdtcore</artifactId>
<groupId>eclipse</groupId>
</exclusion>
<exclusion>
<artifactId>jackson-mapper-asl</artifactId>
<groupId>org.codehaus.jackson</groupId>
</exclusion>
<exclusion>
<artifactId>jackson-core-asl</artifactId>
<groupId>org.codehaus.jackson</groupId>
</exclusion>
<exclusion>
<artifactId>castor</artifactId>
<groupId>org.codehaus.castor</groupId>
</exclusion>
<exclusion>
<artifactId>jcommon</artifactId>
<groupId>jfree</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>jfree</groupId>
<artifactId>jfreechart</artifactId>
<version>1.0.12</version>
<exclusions>
<exclusion>
<artifactId>jcommon</artifactId>
<groupId>jfree</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.jgoodies</groupId>
<artifactId>jgoodies-common</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>com.jgoodies</groupId>
<artifactId>jgoodies-forms</artifactId>
<version>1.5.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.7</version>
</dependency>
<dependency>
<groupId>org.apache</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
</dependencies>
</project>
[/xml]
***
6. Ich verwende einfach 'Clean and Build', dann wird alles gelöscht, und im Ordner target alles neu gebaut. Anschließend wird automatisch die erzeugte JAR und eine POM in das lokale Repository (auf C:, das macht NetBeans bzw. dessen Maven selber) installiert.
Und genau das (Punkt 6) würde ich gerne so verbiegen, dass das auf meine Nexus Installation deployed wird.
Danke,
Christian.