Modify

Opened 8 weeks ago

Closed 3 weeks ago

Last modified 3 days ago

#19071 closed enhancement (fixed)

[Patch] Tag2Link: obtain rules via Apache Ivy and org.webjars.npm

Reported by: simon04 Owned by: simon04
Priority: normal Milestone: 20.05
Component: Core tag2link Version:
Keywords: Cc:

Description (last modified by simon04)

GroupID = org.webjars.npm
ArtifactID = tag2link
Version = 2020.4.6

… contains the WebJar of https://github.com/JOSM/tag2link, a small project I set up some time ago to let others benefit from the concept.

Advantages: we spare two network requests when launching JOSM, we spare the cached files, we put some complexity in the external project, we spare two JOSM remotes.

Attachments (1)

19071.patch (8.9 KB) - added by simon04 8 weeks ago.

Download all attachments as: .zip

Change History (15)

Changed 8 weeks ago by simon04

Attachment: 19071.patch added

comment:1 Changed 8 weeks ago by Don-vip

Could you please move this project to the JOSM GitHub organization?

comment:2 in reply to:  1 Changed 8 weeks ago by simon04

Description: modified (diff)

Replying to Don-vip:

Could you please move this project to the JOSM GitHub organization?

Done

comment:3 in reply to:  description Changed 8 weeks ago by Don-vip

Replying to simon04:

we spare two JOSM remotes.

What do you mean? The remote were setup in place to avoid JOSM clients to contact third-party websites directly, for privacy concerns. It should still work like this, even if we externalize the script files.

comment:4 Changed 8 weeks ago by simon04

In attachment:19071.patch​ I bundle https://github.com/JOSM/tag2link/blob/master/index.json into josm.jar

We'd have to update the JSON file from time to time, but remove the need for an external resource altogether.

comment:5 Changed 6 weeks ago by simon04

Milestone: 20.0420.05

comment:6 Changed 4 weeks ago by Klumbumbus

Milestone: 20.0520.05old

Milestone renamed

comment:7 Changed 4 weeks ago by Klumbumbus

Milestone: 20.05old20.05

comment:8 Changed 3 weeks ago by simon04

Resolution: fixed
Status: assignedclosed

In 16434/josm:

fix #19071 - Tag2Link: obtain rules via Apache Ivy and org.webjars.npm

comment:9 Changed 3 weeks ago by GerdP

I see these messages when running JOSM in Eclipse:

2020-05-17 09:24:06.451 INFORMATION: Protokollierungsgrad ist bei FEIN (FINE, 500)
2020-05-17 09:24:06.792 FINE: System property 'http.agent' set to 'JOSM/1.5 (16434 SVN en) Windows 10 64-Bit'. Old value was 'null'
...
2020-05-17 09:24:13.656 FINE: Initializing Tag2Link rules
2020-05-17 09:24:13.672 INFO: GET https://josm.openstreetmap.de/wiki/StartupPage -> HTTP/1.1 200 (161 ms)
2020-05-17 09:24:13.672 FINE: RESPONSE HEADERS: {Transfer-Encoding=[chunked], Keep-Alive=[timeout=5, max=99], null=[HTTP/1.1 200 Ok], Server=[Apache/2.4.29 (Ubuntu)], Connection=[Keep-Alive], Date=[Sun, 17 May 2020 07:24:14 GMT], Strict-Transport-Security=[max-age=16070400; includeSubDomains], Cache-Control=[must-revalidate], Content-Encoding=[gzip], Vary=[Accept-Encoding], Set-Cookie=[], Expires=[Fri, 01 Jan 1999 00:00:00 GMT], X-Clacks-Overhead=[GNU Terry Pratchett], Content-Type=[text/html;charset=utf-8]}
2020-05-17 09:24:13.672 FINE: Downloading data...
2020-05-17 09:24:13.680 SEVERE: Failed to initialize tag2link rules
2020-05-17 09:24:13.750 FINE: Initializing Tag2Link rules completed in 94 ms
2020-05-17 09:24:13.750 FINE: Loading imagery preferences
2020-05-17 09:24:13.861 FINE: Parsed search expression is highway || route=ferry
2020-05-17 09:24:13.862 FINE: Parsed search expression is tourism || amenity
2020-05-17 09:24:13.863 FINE: Parsed search expression is natural=peak || natural=volcano || mountain_pass=yes || natural=water || tourism=viewpoint || amenity=drinking_water || natural=spring || place=locality
2020-05-17 09:24:13.864 FINE: Parsed search expression is information=guidepost
2020-05-17 09:24:13.865 FINE: Parsed search expression is highway || route=ferry || leisure=track
2020-05-17 09:24:13.866 FINE: Parsed search expression is information=guidepost
2020-05-17 09:24:13.749 SEVERE: java.lang.NullPointerException
java.lang.NullPointerException
	at org.glassfish.json.UnicodeDetectingInputStream.fillBuf(UnicodeDetectingInputStream.java:89)
	at org.glassfish.json.UnicodeDetectingInputStream.detectEncoding(UnicodeDetectingInputStream.java:128)
	at org.glassfish.json.UnicodeDetectingInputStream.<init>(UnicodeDetectingInputStream.java:75)
	at org.glassfish.json.JsonParserImpl.<init>(JsonParserImpl.java:95)
	at org.glassfish.json.JsonReaderImpl.<init>(JsonReaderImpl.java:73)
	at org.glassfish.json.JsonProviderImpl.createReader(JsonProviderImpl.java:136)
	at javax.json.Json.createReader(Json.java:225)
	at org.openstreetmap.josm.tools.Tag2Link.initializeFromResources(Tag2Link.java:95)
	at org.openstreetmap.josm.tools.Tag2Link.initialize(Tag2Link.java:79)
	at org.openstreetmap.josm.spi.lifecycle.InitializationTask.call(InitializationTask.java:33)
	at org.openstreetmap.josm.spi.lifecycle.InitializationTask.call(InitializationTask.java:1)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

2020-05-17 09:24:14.152 FINE: Preparing data set...
2020-05-17 09:24:14.168 FINE: Contacting Server...
2020-05-17 09:24:14.168 FINE: REQUEST HEADERS: {Accept=null, Accept-Encoding=gzip, deflate}
2020-05-17 09:24:14.246 INFO: GET https://josm.openstreetmap.de/maps?ids=Bing%2CEsriWorldImagery%2CEsriWorldImageryClarity%2CMapbox%2CMaxar-Premium%2CMaxar-Standard%2COSM_Inspector-Geometry%2COSM_Inspector-Routing%2COpenTopoMap%2CWaymarked_Trails-Cycling%2CWaymarked_Trails-MTB%2Copencylemap%2Cosm-gps%2Cosm-mapnik-black_and_white%2Cstandard%2Cstrava_both_heatmap%2Cstrava_cycling_heatmap -> HTTP/1.1 200 (78 ms)
2020-05-17 09:24:14.247 FINE: RESPONSE HEADERS: {Transfer-Encoding=[chunked], Keep-Alive=[timeout=5, max=98], null=[HTTP/1.1 200 OK], Strict-Transport-Security=[max-age=16070400; includeSubDomains], Server=[Apache/2.4.29 (Ubuntu)], Connection=[Keep-Alive], Content-Encoding=[gzip], Vary=[Accept-Encoding], Last-Modified=[Fri, 15 May 2020 08:23:15 GMT], X-Clacks-Overhead=[GNU Terry Pratchett], Date=[Sun, 17 May 2020 07:24:14 GMT], Content-Type=[text/xml;charset=utf-8]}
2020-05-17 09:24:14.247 FINE: Downloading data...

This is the first start of JOSM with an existing preferences.xml

comment:10 Changed 3 weeks ago by GerdP

Resolution: fixed
Status: closedreopened

comment:11 Changed 3 weeks ago by simon04

A new Ivy dependency has been added; have you updated accordingly?

comment:12 Changed 3 weeks ago by GerdP

Only now. Had to manually start ivy resolve in eclipse. A normal refresh after svn update was not enough...

comment:13 Changed 3 weeks ago by GerdP

Resolution: fixed
Status: reopenedclosed

comment:14 Changed 3 days ago by simon04

In 16539/josm:

see #19335, see #19071 - ant sources: include taginfo.json

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain simon04.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.