... the user friendly GPS tool


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Buildproblem / Encoding der Sourcen
#1
Hallo,

ich versuche im Moment vergeblich den Routeconverter-Build zum laufen zu bekommen.

Unter der IDEA habe ich das Problem, dass das Encoding nicht stimmt.
Auch wenn ich es von Hand in den Settings anpasse, so dass ein sinnvoller Text in der IDE angezeigt wird, meint der Build dazu nur:
"unmappable character for encoding UTF-8"

Beim Build über die Command-Line mit "mvn clean package", meint das System irgendwann:

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:48.986s
[INFO] Finished at: Sat Dec 03 21:47:26 CET 2011
[INFO] Final Memory: 63M/152M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.0-beta-5-SNAPSHOT:create (default) on project route-converter-build: Cannot get thebranch information from the scm repository :
[ERROR] Exception while executing SCM command. UnsupportedOperationException
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/displ...nException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

[ERROR] mvn <goals> -rf :route-converter-build


Die Frage ist also: Was übersehe ich bzw. mache ich falsch ?

Gruß
Thomas
Reply
#2
(03.12.2011, 21:55)lundefugl Wrote: Die Frage ist also: Was übersehe ich bzw. mache ich falsch ?

Hallo Thomas,

da sind zwei Fehler, oder?
  1. das Encoding von einigen Zeichen im Quelltext ist nicht UTF-8 - welche Dateien sind das?
  2. irgendetwas in den pom.xml funktioniert nicht: [ERROR] Exception while executing SCM command. UnsupportedOperationException - wie kann ich das reproduzieren?


Ich habe das .m2/repository weggeworfen und 'mvn clean install' ohne Probleme ausführen können:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10:15.043s
[INFO] Finished at: Sun Dec 04 16:29:37 CET 2011
[INFO] Final Memory: 55M/151M
[INFO] ------------------------------------------------------------------------

Was ist bei Dir anders?
--
Christian
Reply
#3
Hallo Christian,

(04.12.2011, 16:30)routeconverter Wrote: [*]irgendetwas in den pom.xml funktioniert nicht: [ERROR] Exception while executing SCM command. UnsupportedOperationException - wie kann ich das reproduzieren?
wenn ich das wüsste...
Ich bin was Git und Maven angeht ein DAU, da ich das für den RouteConverter erst installiert habe. Ich habe nur das gemacht, was in der README.txt steht.

Das Löschen des ".m2/repository"-Verzeichnisses hat bei mir leider nichts gebracht.

(04.12.2011, 16:30)routeconverter Wrote: [*]das Encoding von einigen Zeichen im Quelltext ist nicht UTF-8 - welche Dateien sind das?
Im Vergleich zu gestern hat sich wohl die automatische Buildreihenfolge geändert, da da andere Dateien betroffen waren.
Jetzt bricht er bei mir ab mit diversen Forms und RouteConverter\feedback\src\test\java\slash\navigation\feedback\domain\UsersIT.java

Betroffen sind wohl alle Files, in denen deutsche Umlaute in Stringkonstanten drin sind. Deshalb ist es wohl was grundsätzliches.
Kann man bei Git irgendwo was nutzerspezifisch konfigurieren ? Vielleicht liegts auch an meinem System. Das ist ein englisches XP auf einem Notebook. Da ist zwar das MultilanguagePack für deutsch drauf, aber das System-Encoding dürfte die deutschen Umlaute nicht kennen.

Gruß
Thomas
Reply
#4
(04.12.2011, 19:45)lundefugl Wrote: Das Löschen des ".m2/repository"-Verzeichnisses hat bei mir leider nichts gebracht.

Ok, bitte compilier mal mit

mvn clean package -Plauncher

git läßt sich auch konfigurieren und vielleicht habe ich da unbeabsichtigt eine Abhängigkeit eingebaut, weil ich etwas Konfiguration benötige, um RouteConverter von meinen Rechnern aus releasen zu können.

(04.12.2011, 19:45)lundefugl Wrote: Betroffen sind wohl alle Files, in denen deutsche Umlaute in Stringkonstanten drin sind. Deshalb ist es wohl was grundsätzliches.

Ich habe die UserIT-Klasse nach UTF-8 konvertiert. Besteht der Kompilierfehler bei Dir nun weiterhin?

(04.12.2011, 19:45)lundefugl Wrote: Kann man bei Git irgendwo was nutzerspezifisch konfigurieren ?

Ja

> git config -l
core.autocrlf=true
user.name=Christian Pesch
user.email=XXXX@XXXX.XXXX
[..]

So beginnt die git Konfiguration bei mir.

(04.12.2011, 19:45)lundefugl Wrote: Vielleicht liegts auch an meinem System. Das ist ein englisches XP auf einem Notebook. Da ist zwar das MultilanguagePack für deutsch drauf, aber das System-Encoding dürfte die deutschen Umlaute nicht kennen.

Das könnte sein. Ich habe seit Problemen unter Linux länger nichts davon gehört. Laß uns die Probleme Schritt für Schritt lösen, ok?

--
Christian
Reply
#5
(05.12.2011, 06:50)routeconverter Wrote: Ok, bitte compilier mal mit

mvn clean package -Plauncher

damit ist er bei mir durchgelaufen. (was bewirkt -Plauncher ?)
Dummerweise bricht der Build nun nach einem "git pull" mit einem anderen Fehler ab. Da scheinen irgendwelche Tests jetzt schief zu gehen...

Quote:Failed tests:
testCreateDeURL(slash.navigation.nmn.NmnUrlFormatTest): expected:<navigon[DEU]://route/?target=coo...> but was:<navigon[]://route/?target=coo...>
testCreateUsaURL(slash.navigation.nmn.NmnUrlFormatTest): expected:<navigon[USA-CA]://route/?target=coo...> but was:<navigon[]://route/?target=coo...>

Tests run: 278, Failures: 2, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] RouteConverter .................................... SUCCESS [0.140s]
[INFO] Code shared by all modules ........................ SUCCESS [4.687s]
[INFO] Encapsulate Java Architecture for XML Binding (JAXB) access under Java 1.6 SUCCESS [1.091s]
[INFO] Support for the GPX formats ....................... SUCCESS [2.043s]
[INFO] REST webservice client ............................ SUCCESS [1.412s]
[INFO] Access to the Google Maps API Geocoding service ... SUCCESS [2.444s]
[INFO] Support for the Google Earth KML formats .......... SUCCESS [10.936s]
[INFO] Read and write all supported navigation formats ... FAILURE [16.113s]
[INFO] Access to the RouteCatalog service ................ SKIPPED
[INFO] Code shared by all UI modules ..................... SKIPPED
[INFO] Access to the earthtools.org service .............. SKIPPED
[INFO] Code shared by all MapView modules ................ SKIPPED
[INFO] ElevationView based on the JFreeChart library ..... SKIPPED
[INFO] Access to the Feedback service .................... SKIPPED
[INFO] Access to the geonames.org service ................ SKIPPED
[INFO] Access to the HGT files ........................... SKIPPED
[INFO] Complete positions with data from external services SKIPPED
[INFO] MapView based on the Eclipse SWT library .......... SKIPPED
[INFO] The UI you see if you start the program ........... SKIPPED
[INFO] The command line you can use to start the program . SKIPPED
[INFO] The build license module .......................... SKIPPED
[INFO] The build parent module ........................... SKIPPED
[INFO] The platform independent part of the RouteConverter UI tool SKIPPED
[INFO] The RouteConverter command line tool .............. SKIPPED
[INFO] The RouteConverter UI tool for Linux .............. SKIPPED
[INFO] The RouteConverter UI tool for Linux (64-bit) ..... SKIPPED
[INFO] The RouteConverter UI tool for Mac OS X ........... SKIPPED
[INFO] The RouteConverter UI tool for Mac OS X (64-bit) .. SKIPPED
[INFO] The RouteConverter UI tool for Windows ............ SKIPPED
[INFO] The RouteConverter UI tool for Windows (64-bit) ... SKIPPED
[INFO] The RouteConverter UI tool for Webstart ........... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 52.347s
[INFO] Finished at: Mon Dec 05 17:31:48 CET 2011
[INFO] Final Memory: 20M/92M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.7.2:test (default-test) on project navigation-formats: There are test failures.
[ERROR]
[ERROR] Please refer to C:\work\routeconverter\RouteConverter\navigation-formats\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/displ...eException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :navigation-formats

Was die Encoding-Effekte angeht, so zeigt IntelliJ IDEA jetzt ein anderes File, als nicht UTF-8 an:

RouteConverter\geonames\src\test\java\slash\navigation\geonames\GeoNamesServiceIT.java


Bei dem abgebrochenen Kommandozeilenbuild tauchte zuvor immer wieder folgende Zeile auf:
Using 'Cp1252' encoding to copy filtered resources.
Ist diese Ausgabe normal, oder schon ein Hinweis auf Unstimmigkeiten in meinem System ?

Gruß
Thomas
Reply
#6
(05.12.2011, 17:50)lundefugl Wrote: damit ist er bei mir durchgelaufen. (was bewirkt -Plauncher ?)

Das baut die EXEs mit. Eigentlich sollte das keinen Einfluß haben. Funktioniert es jetzt ohne -Plauncher auch bei Dir?

(05.12.2011, 17:50)lundefugl Wrote: Dummerweise bricht der Build nun nach einem "git pull" mit einem anderen Fehler ab. Da scheinen irgendwelche Tests jetzt schief zu gehen...

Failed tests:
testCreateDeURL(slash.navigation.nmn.NmnUrlFormatTest): expected:<navigon[DEU]://route/?target=coo...> but was:<navigon[]://route/?target=coo...>
testCreateUsaURL(slash.navigation.nmn.NmnUrlFormatTest): expected:<navigon[USA-CA]://route/?target=coo...> but was:<navigon[]://route/?target=coo...>

Tests run: 278, Failures: 2, Errors: 0, Skipped: 0

Danke, habe ich behoben.

(05.12.2011, 17:50)lundefugl Wrote: Was die Encoding-Effekte angeht, so zeigt IntelliJ IDEA jetzt ein anderes File, als nicht UTF-8 an:
[..]

Da sind noch viel mehr. Heute abend komme ich da nicht mehr durch, die alle von Windows-1252 auf UTF-8 zu konvertieren. Ich bleibe aber dran.

(05.12.2011, 17:50)lundefugl Wrote: Ist diese Ausgabe normal, oder schon ein Hinweis auf Unstimmigkeiten in meinem System ?

Eher auf eine unschöne Abhängigkeit des Quelltextes auf das richtige Encoding - und das hängt von der voreingestellten Sprache ab. Also kann man nicht unter allen Sprachen bauen.
--
Christian
Reply
#7
Hallo Christian,

(05.12.2011, 19:49)routeconverter Wrote: Funktioniert es jetzt ohne -Plauncher auch bei Dir?

das kann ich leider noch nicht sagen.
Der Build kommt jetzt etwas weiter, aber ein weiterer Test geht schief:

Quote:Failed tests:
testIsValidLine(slash.navigation.simple.KienzleGpsFormatTest): null

Tests run: 278, Failures: 1, Errors: 0, Skipped: 0


(05.12.2011, 19:49)routeconverter Wrote:
(05.12.2011, 17:50)lundefugl Wrote: Was die Encoding-Effekte angeht, so zeigt IntelliJ IDEA jetzt ein anderes File, als nicht UTF-8 an:
[..]
Da sind noch viel mehr. Heute abend komme ich da nicht mehr durch, die alle von Windows-1252 auf UTF-8 zu konvertieren. Ich bleibe aber dran.

Das hat keine Eile. Ich wollte eh nur das Notebook für Weihnachten einrichten (für meine Versuche mit dem "Speichern unter"-Dialog).
Wenn der Build in 3 Wochen bei mir läuft, wäre es prima. Wenn nicht, so ist es auch nicht tragisch.

Da ich jeden Tag beruflich 10 Stunden vor IntelliJ IDEA sitze, habe ich abends ohnehin keine Muße noch viel zu programmieren... ;-)

Gruß
Thomas
Reply
#8
Hallo Christian,

ich habe heute noch mal einen git pull gemacht und kann Erfolg vermelden.
Der Build aus der Komandozeile (auch ohne -Plauncher) und aus IntelliJ läuft durch. Und natürlich funktioniert auch das Resultat.

Vielen Dank für Deine schnellen Anpassungen.

Gruß
Thomas
Reply
#9
Hallo Christian,

ich habe auch ein Problem mit dem Encoding und dem neuen RC 2-8:

Code:
E:\Projekt!\RC_GIT\RC2_8\RouteConverter\navigation-formats\src\test\java\slash\navigation\url\GoogleMapsUrlFormatTest.java
unmappable character for encoding UTF-8
...

E:\Projekt!\RC_GIT\RC2_8\RouteConverter\navigation-formats\src\test\java\slash\navigation\url\UrlFormatTest.java

unmappable character for encoding UTF-8
...

Grüße,
Ilmari
Reply
#10
Hallo Ilmari,

ich habe die beiden Stellen behoben. Falls es weitere Stellen gibt freue ich mich über einen Pull-Request auf github.
--
Christian
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)