Ich habe ein Projekt, das als eine GWT-Bibliothek arbeiten soll, die ich unter Verwendung this recommended approach vorbereite. Wenn ich mein "Library" -Projekt erstelle, kann ich das resultierende JAR im Repository sehen, ich kann sogar sehen, dass es * .java-Dateien im "shared" -Ordner gibt, außerdem sehe ich das definierende XML, Library.gwt.xml.compileSourcesArtifact funktioniert nicht ...?
Aber wenn ich baue meine 'Haupt' es beschwert sich es nicht diese JAR finden:
[ERROR] Fehler Ziel org.codehaus.mojo auszuführen: GWT-Maven-Plugin: 2.8.0-beta 1: kompilieren (default) auf Projekt Web: Artefakt nicht gefunden - kann nicht gefunden werden Artefakt net.jzaruba: Bibliothek: jar: Quellen: 1.7-SNAPSHOT
Beachten Sie, dass mein JAR Bibliothek-1.7-SNAPSHOT.jar genannt wird, dh es ist kein "Quellen" JAR.
Auf der anderen Seite, wenn ich mein Bibliotheksprojekt mit dem maven-source-plugin erstelle, bekomme ich Library-1.7-SNAPSHOT-sources.jar und es wird tatsächlich vom Hauptprojekt erkannt.
Sowohl GWT als auch gwt-maven-plugin sind 2.8.0-beta1.
< build>/< Plugins>/< Plugin> in meinem 'main' Projekt:
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.version}</version>
....
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<compileSourcesArtifacts>
<compileSourcesArtifact>net.jzaruba:Library</compileSourcesArtifact>
</compileSourcesArtifacts>
...
<configuration>
Für zukünftige Sucher, Erklärung https://gwt-maven-plugin.github.io/gwt-maven-plugin/mergewebxml-mojo.html#compileSourcesArtifacts –
Und noch eine Notiz von Thomas B. über das Element : https://groups.google.com/d/msg/codehau-mojo-gwt-maven-plugin-users/IhryRoDTiIQ/YlnMHKg8TDgJ –