Jörn Nettingsmeier schrieb: > hi *! > > i'm trying to update the Instantiator class. i have it working, but > there are a number of hard-coded strings in there i'd like to get rid > of. so i'd like to do:
Hi Jörn, you're hitting a fundamental problem which I always wanted to tackle, but IMO can be deferred until 1.4 is out. In 1.2, publications were a static concept. You configure your publications in the file system and start the server. In 1.4, publication templating and instantiation introduced the dynamic addition of publications. But the publication concept was never updated to be dynamic, so we have something in between now. IMO we should (someday) extend the API so that publications can be created and configured using Java code and not by copying and manipulating the configuration files. The location and contents of the config file is an implementation detail, that's why its not part of the API and you can't access it in the Instantiator. Until we have extended the publication interface, I'd say we leave the hard-coded strings as they are. What do the others think? Thanks for bringing this up, -- Andreas > public class Instantiator extends AbstractLogEnabled implements > org.apache.lenya.cms.publication.templating.Instantiator, Serviceable { > > protected static final String[] sourcesToCopy = { > org.apache.lenya.cms.publication.PublicationConfiguration.CONFIGURATION_FILE, > > > > instead of spelling out "config/publication.xconf". > > problem is, it does not build: > > compile-src: > Compiling 1 source file to /build/trunk-rework-pubconf/build/lenya/pubs > /build/trunk-rework-pubconf/build/lenya/java/pubs/org/apache/lenya/defaultpub/cms/publication/templating/Instantiator.java:47: > cannot find symbol > symbol : class PublicationConfiguration > location: package org.apache.lenya.cms.publication > import org.apache.lenya.cms.publication.PublicationConfiguration; > ^ > /build/trunk-rework-pubconf/build/lenya/java/pubs/org/apache/lenya/defaultpub/cms/publication/templating/Instantiator.java:63: > cannot find symbol > symbol : class PublicationConfiguration > location: package org.apache.lenya.cms.publication > > org.apache.lenya.cms.publication.PublicationConfiguration.CONFIGURATION_FILE, > > ^ > 2 errors > > > looks like there is a dependency problem... can anyone suggest a way to > fix this? > > tia, > > jörn --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]