[ANNOUNCEMENT] CSS4J 3.0.0

20 views
Skip to first unread message

admin

unread,
Sep 19, 2020, 2:22:26 PM9/19/20
to css4j
Css4j 3.0.0 was just released. Three modules (tokenproducer, carte-util and xml-dtd) were split out of the core css4j module to make easier to use the components in different contexts.

If you used css4j together with DTD classes, in Maven you now need to specify the xml-dtd module separately, like:

 <dependency>
   
<groupId>io.sf.carte</groupId>
   
<artifactId>xml-dtd</artifactId>
   
<version>${css4j.version}</version>
   
<type>jar</type>
   
<scope>compile</scope>
   
<optional>false</optional>
 
</dependency>
 
<dependency>
   
<groupId>io.sf.carte</groupId>
   
<artifactId>css4j</artifactId>
   
<version>${css4j.version}</version>
   
<type>jar</type>
   
<scope>compile</scope>
   
<optional>false</optional>
 
</dependency>

For example, the XWiki project needs to put the following jar files in the classpath: tokenproducercarte-utilxml-dtd, css4j, css4j-dom4j. The Maven config would be:

    <dependency>
     
<groupId>io.sf.carte</groupId>
     
<artifactId>xml-dtd</artifactId>
     
<version>3.0.0</version>
   
</dependency>
   
<dependency>
     
<groupId>io.sf.carte</groupId>
     
<artifactId>css4j-dom4j</artifactId>
     
<version>3.0.0</version>
   
</dependency>

Declaring css4j-dom4j as a dependency should automatically put the core css4j module (and also carte-util and tokenproducer) in the classpath or modulepath.

The relevant download links can be found at:


Vincent Massol

unread,
Sep 19, 2020, 2:33:45 PM9/19/20
to css4j
Congrats for the 3.0.0 release and than you for CSS4J and for making our lives easy:

For example, the XWiki project needs to put the following jar files in the classpath: tokenproducer, carte-util, xml-dtd, css4j, css4j-dom4j. The Maven config would be:

-Vincent

admin

unread,
Sep 19, 2020, 3:04:46 PM9/19/20
to css4j
than you for CSS4J and for making our lives easy:

You're welcome 🙂

A very small effort for me, worth the effort in potentially saving time for other people that otherwise need to look at the POM files, figure out which modules they need, etc.

Vincent Massol

unread,
Oct 4, 2020, 10:53:42 AM10/4/20
to css4j
Hi Carlos,

I've just tried using the https://css4j.github.io/maven/ repo (by adding it to our nexus repo at http://nexus.xwiki.org/nexus/#view-repositories;css4j~browsestorage) but it seems it cannot find the following deps:

<dependency>
<groupId>io.sf.carte</groupId>
<artifactId>xml-dtd</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>io.sf.carte</groupId>
<artifactId>css4j-dom4j</artifactId>
<version>3.0.0</version>
</dependency>

Do you know if it's there?

Thanks
-Vincent

Vincent Massol

unread,
Oct 4, 2020, 10:55:48 AM10/4/20
to css4j
So it seems to be there according to https://css4j.github.io/maven/io/sf/carte/css4j/maven-metadata.xml

However the repo doesn't seem to be working as a proper maven remote repo.


Thanks
-Vincent

Vincent Massol

unread,
Oct 4, 2020, 10:58:19 AM10/4/20
to css4j
ah I made a mistake.... retesting....

admin

unread,
Oct 4, 2020, 10:59:53 AM10/4/20
to cs...@googlegroups.com
Do you know if it's there?


<?xml version="1.0" encoding="UTF-8"?>
<metadata>

 
<groupId>io.sf.carte</groupId>
 
<artifactId>css4j</artifactId>

 
<versioning>
   
<release>3.0.0</release>
   
<versions>
     
<version>2.1.0</version>
     
<version>1.0.8</version>
     
<version>2.0.6</version>
     
<version>2.1.1</version>
     
<version>3.0.0</version>
   
</versions>
   
<lastUpdated>20200919171127</lastUpdated>
 
</versioning>
</metadata>

Same for xml-dtd:

<?xml version="1.0" encoding="UTF-8"?>
<metadata>

 
<groupId>io.sf.carte</groupId>
 
<artifactId>xml-dtd</artifactId>

 
<versioning>
   
<release>3.0.0</release>
   
<versions>
     
<version>3.0.0</version>
   
</versions>
   
<lastUpdated>20200919171117</lastUpdated>
 
</versioning>
</metadata>



But the server does not support directory indexes, and this may cause a problem?

Vincent Massol

unread,
Oct 4, 2020, 11:03:31 AM10/4/20
to css4j
hmm no luck, still not working (I've now added it to the public repo group which I had forgotten): http://nexus.xwiki.org/nexus/#view-repositories;public~configuration

Does it work for you?

Thanks
-Vincent

Vincent Massol

unread,
Oct 4, 2020, 11:06:50 AM10/4/20
to css4j
I see

2020-10-04 16:48:22 INFO  [p50266982-18953] - org.sonatype.nexus.proxy.maven.routing.internal.ManagerImpl - Initializing non-existing prefix file of newly added "CSS4J" [id=css4j]
2020-10-04 16:48:23 INFO  [p50266982-18953] - org.sonatype.nexus.proxy.registry.DefaultRepositoryRegistry - Added repository "CSS4J" [id=css4j][contentClass=Maven2][mainFacet=org.sonatype.nexus.proxy.maven.MavenProxyRepository]
2020-10-04 16:48:23 INFO  [p50266982-18953] - org.sonatype.nexus.configuration.application.DefaultNexusConfiguration - Applying Nexus Configuration made by vmassol...
2020-10-04 16:48:23 INFO  [p50266982-18953] - org.sonatype.nexus.configuration.application.DefaultNexusConfiguration - Applying Nexus Configuration made by vmassol...
2020-10-04 16:48:23 INFO  [pool-1-thread-1] - org.sonatype.nexus.index.tasks.UpdateIndexTask - Scheduled task (UpdateIndexTask) started :: Updating repository index "CSS4J" from path null and below.
2020-10-04 16:48:23 INFO  [pool-1-thread-1] - org.sonatype.nexus.index.DefaultIndexerManager - Trying to get remote index for repository "CSS4J" [id=css4j]
2020-10-04 16:48:23 INFO  [pool-1-thread-1] - org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage - Initializing remote transport for proxy repository "CSS4J" [id=css4j]...
2020-10-04 16:48:27 INFO  [pool-1-thread-1] - org.sonatype.nexus.index.DefaultIndexerManager - Cannot fetch remote index for repository "CSS4J" [id=css4j] as it does not publish indexes.
2020-10-04 16:48:27 INFO  [pool-1-thread-1] - org.sonatype.nexus.index.NexusScanningListener - Scanning of repositoryID="css4j" started.
2020-10-04 16:48:27 INFO  [pool-1-thread-1] - org.sonatype.nexus.index.NexusScanningListener - Scanning of repositoryID="css4j" finished: scanned=0, added=0, updated=0, removed=0, scanningDuration=0:00:00.055
2020-10-04 16:48:27 INFO  [pool-1-thread-1] - org.sonatype.nexus.index.DefaultIndexerManager - Publishing index for repository css4j
2020-10-04 16:48:27 INFO  [pool-1-thread-1] - org.sonatype.nexus.index.tasks.UpdateIndexTask - Scheduled task (UpdateIndexTask) finished :: Updating repository index "CSS4J" from path null and below. (started 2020-10-04T16:48:23+02:00, runtime 0:00:04.380)
2020-10-04 16:48:28 INFO  [pool-1-thread-1] - org.sonatype.nexus.configuration.application.DefaultNexusConfiguration - Applying Nexus Configuration due to changes in [Scheduled Tasks] made by *TASK...
2020-10-04 16:48:28 INFO  [ar-7-thread-4  ] - org.sonatype.nexus.proxy.maven.routing.internal.RemoteScrapeStrategy - Not possible remote scrape of M2Repository(id=css4j), no scraper succeeded.
2020-10-04 16:57:27 INFO  [p50266982-18779] - org.sonatype.nexus.configuration.application.DefaultNexusConfiguration - Applying Nexus Configuration due to changes in [Public Repositories] made by vmassol...

And especially the part:

2020-10-04 16:48:28 INFO  [ar-7-thread-4  ] - org.sonatype.nexus.proxy.maven.routing.internal.RemoteScrapeStrategy - Not possible remote scrape of M2Repository(id=css4j), no scraper succeeded.

So yes maybe the fact that it doesn't support dir index is an issue.

Thanks
-Vincent

admin

unread,
Oct 4, 2020, 11:10:58 AM10/4/20
to css4j
Does it work for you?

I haven't tested it myself.

Vincent Massol

unread,
Oct 4, 2020, 11:11:55 AM10/4/20
to css4j
Actually the error seems to be:

2020-10-04 16:48:27 INFO  [pool-1-thread-1] - org.sonatype.nexus.index.DefaultIndexerManager - Cannot fetch remote index for repository "CSS4J" [id=css4j] as it does not publish indexes.

-Vincent

admin

unread,
Oct 4, 2020, 11:21:53 AM10/4/20
to css4j
I'm looking at automatic index generation.

admin

unread,
Oct 4, 2020, 4:07:17 PM10/4/20
to css4j
Done: directory listings added. It was harder than expected, as the tree program that people often recommend:


adds index.html to the listing and puts a really spammy attribution section with the names of the authors. Finally found this:


which is what I wanted.

Vincent Massol

unread,
Oct 5, 2020, 1:59:17 AM10/5/20
to css4j
Thanks so much Carlos.

However I've just retested it and it seems it's still not working:

2020-10-05 07:57:39 INFO  [ool-1-thread-16] - org.sonatype.nexus.index.tasks.RepairIndexTask - Scheduled task (RepairIndexTask) started :: Repairing repository index "CSS4J" from path / and below.
2020-10-05 07:57:39 INFO  [ool-1-thread-16] - org.sonatype.nexus.index.DefaultIndexerManager - Trying to get remote index for repository "CSS4J" [id=css4j]
2020-10-05 07:57:39 INFO  [ool-1-thread-16] - org.sonatype.nexus.index.DefaultIndexerManager - Cannot fetch remote index for repository "CSS4J" [id=css4j] as it does not publish indexes.
2020-10-05 07:57:39 INFO  [ool-1-thread-16] - org.sonatype.nexus.index.NexusScanningListener - Scanning of repositoryID="css4j" started.
2020-10-05 07:57:40 INFO  [ool-1-thread-16] - org.sonatype.nexus.index.NexusScanningListener - Scanning of repositoryID="css4j" finished: scanned=1, added=1, updated=0, removed=0, scanningDuration=0:00:00.214
2020-10-05 07:57:40 INFO  [ool-1-thread-16] - org.sonatype.nexus.index.DefaultIndexerManager - Publishing index for repository css4j
2020-10-05 07:57:40 INFO  [ool-1-thread-16] - org.sonatype.nexus.index.tasks.RepairIndexTask - Scheduled task (RepairIndexTask) finished :: Repairing repository index "CSS4J" from path / and below. (started 2020-10-05T07:57:39+02:00, runtime 0:00:01.108)

Thanks
-Vincent

Vincent Massol

unread,
Oct 5, 2020, 2:31:35 AM10/5/20
to css4j
Good news! I kept trying, even though there was still the index error and suddenly it started working! :)

So it seems all is good now, which is great!

Thanks a lot Carlos.
-Vincent

Reply all
Reply to author
Forward
0 new messages