You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Vincent Siveton (JIRA)" <ji...@codehaus.org> on 2005/07/26 14:34:57 UTC

[jira] Closed: (MNG-588) How to handle identical file names in the site structure for the static site generation?

     [ http://jira.codehaus.org/browse/MNG-588?page=all ]
     
Vincent Siveton closed MNG-588:
-------------------------------

    Resolution: Fixed

Throw an exception if two index files already exist

> How to handle identical file names in the site structure for the static site generation?
> ----------------------------------------------------------------------------------------
>
>          Key: MNG-588
>          URL: http://jira.codehaus.org/browse/MNG-588
>      Project: Maven 2
>         Type: Bug
>     Versions: 2.0-beta-1
>     Reporter: Vincent Siveton
>     Assignee: Vincent Siveton
>      Fix For: 2.0-beta-1

>
>
> Supposed that we have the following site structure:
> +- src/
>    +- site/
>       +- apt/
>       |  +- index.apt
>       |
>       +- xdoc/
>       |  +- index.xml
>       |
>       +- site.xml
> Actually, the site:site goal generates the index.html from site/xdoc/index.xml.
> It could also generate it from site/apt/index.apt.
> Throwing an exception instead of warnings?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [jira] Closed: (MNG-588) How to handle identical file names in the site structure for the static site generation?

Posted by Brett Porter <br...@apache.org>.
kenney@Neonics.com wrote:

>Well, almost. ALL files should be unique when generated.
>I.e.
>
>	src/site/apt/alpha/usage.apt  -> generated-sources/site/usage.html
>	src/site/xdoc/alpha/usage.xml -> generated-sources/site/usage.html
>
>So, not only index files but ALL files!
>
>And since the outcome (what files will be overwritten) will be either
>nondeterministic or alphabetically sorted, I think an exception, ERROR
>or build failure will suite better.
>  
>
+1. This should be a failure.

I can't think of a reason why you'd want to silently ignore these, and
it is potentially confusing.

- Brett


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


RE: [jira] Closed: (MNG-588) How to handle identical file names in the site structure for the static site generation?

Posted by ke...@Neonics.com.
On Wed, 27 Jul 2005, Vincent Siveton wrote:

Hi Vincent,

> Hi Kenney,
>
> > Well, I think it should be checked, at least. It's easy to lose oversight
> > with different directories (see maven-site/src/site/*/developers/).
>
> We could advice about duplicate files, something like:
>
> [WARNING] Some files are duplicates in the site directory or in the
> generated-site directory. Review the generation for the following files:
> alpha\index
>         ${siteDirectory}\apt\alpha\index.apt
>         ${siteDirectory}\xdoc\alpha\index.xml
> alpha\beta\index
>         ${siteDirectory}\apt\alpha\beta\index.apt
>         ${siteDirectory}\xdoc\alpha\beta\index.xml
>         ${generatedSiteDirectory}\xdoc\alpha\beta\index.xml
>
>
> Index file should be unique otherwise an exception is thrown.

Well, almost. ALL files should be unique when generated.
I.e.

	src/site/apt/alpha/usage.apt  -> generated-sources/site/usage.html
	src/site/xdoc/alpha/usage.xml -> generated-sources/site/usage.html

So, not only index files but ALL files!

And since the outcome (what files will be overwritten) will be either
nondeterministic or alphabetically sorted, I think an exception, ERROR
or build failure will suite better.

So either use your [WARNING] output but change that to [ERROR], resulting
in a build failure, OR do something like this:

[WARNING] File src/site/xdoc/alpha/usage.xml not processed because
  generated-sources/site/usage.html is already generated from
  src/site/apt/usage.xml (with nicer indentation etc..)

>
> Any comments?

Not any more... ;)

>
> Cheers,
>
> Vincent
>
> > -----Original Message-----
> > From: Kenney Westerhof [mailto:forge@neonics.com]
> > Sent: Tuesday, July 26, 2005 9:12 AM
> > To: Maven Developers List
> > Subject: RE: [jira] Closed: (MNG-588) How to handle identical file names
> > in the site structure for the static site generation?
> >
> > On Tue, 26 Jul 2005, Vincent Siveton wrote:
> >
> > Hi Vincent,
> >
> > Well, I think it should be checked, at least. It's easy to lose oversight
> > with different directories (see maven-site/src/site/*/developers/).
> >
> > Perhaps the directories could be merged, and the file extensions determine
> > the type of file it is (or using a 'magic' library) ?
> >
> > -- Kenney
> >
> > > Hi Kenney,
> > >
> > > > How about checking for src/apt/page.apt and
> > > > src/xdoc/page.xml ( i.e. -> page.html )?
> > >
> > > Actually, the exception is only for an index file (ie index.*).
> > >
> > > Do you think that we can do the same thing for all duplicate files?
> > > If you still think it's a good idea, I could implement it.
> > >
> > > Cheers,
> > >
> > > Vincent
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: dev-help@maven.apache.org
> > >
> >
> > --
> > Kenney Westerhof
> > http://www.neonics.com
> > GPG public key: http://www.gods.nl/~forge/kenneyw.key
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


RE: [jira] Closed: (MNG-588) How to handle identical file names in the site structure for the static site generation?

Posted by Vincent Siveton <vi...@gmail.com>.
Hi Kenney,

> Well, I think it should be checked, at least. It's easy to lose oversight
> with different directories (see maven-site/src/site/*/developers/).

We could advice about duplicate files, something like:

[WARNING] Some files are duplicates in the site directory or in the
generated-site directory. Review the generation for the following files:
alpha\index
        ${siteDirectory}\apt\alpha\index.apt
        ${siteDirectory}\xdoc\alpha\index.xml
alpha\beta\index
        ${siteDirectory}\apt\alpha\beta\index.apt
        ${siteDirectory}\xdoc\alpha\beta\index.xml
        ${generatedSiteDirectory}\xdoc\alpha\beta\index.xml


Index file should be unique otherwise an exception is thrown.

Any comments?

Cheers,

Vincent

> -----Original Message-----
> From: Kenney Westerhof [mailto:forge@neonics.com]
> Sent: Tuesday, July 26, 2005 9:12 AM
> To: Maven Developers List
> Subject: RE: [jira] Closed: (MNG-588) How to handle identical file names
> in the site structure for the static site generation?
> 
> On Tue, 26 Jul 2005, Vincent Siveton wrote:
> 
> Hi Vincent,
> 
> Well, I think it should be checked, at least. It's easy to lose oversight
> with different directories (see maven-site/src/site/*/developers/).
> 
> Perhaps the directories could be merged, and the file extensions determine
> the type of file it is (or using a 'magic' library) ?
> 
> -- Kenney
> 
> > Hi Kenney,
> >
> > > How about checking for src/apt/page.apt and
> > > src/xdoc/page.xml ( i.e. -> page.html )?
> >
> > Actually, the exception is only for an index file (ie index.*).
> >
> > Do you think that we can do the same thing for all duplicate files?
> > If you still think it's a good idea, I could implement it.
> >
> > Cheers,
> >
> > Vincent
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> 
> --
> Kenney Westerhof
> http://www.neonics.com
> GPG public key: http://www.gods.nl/~forge/kenneyw.key
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


RE: [jira] Closed: (MNG-588) How to handle identical file names in the site structure for the static site generation?

Posted by Kenney Westerhof <fo...@neonics.com>.
On Tue, 26 Jul 2005, Vincent Siveton wrote:

Hi Vincent,

Well, I think it should be checked, at least. It's easy to lose oversight
with different directories (see maven-site/src/site/*/developers/).

Perhaps the directories could be merged, and the file extensions determine
the type of file it is (or using a 'magic' library) ?

-- Kenney

> Hi Kenney,
>
> > How about checking for src/apt/page.apt and
> > src/xdoc/page.xml ( i.e. -> page.html )?
>
> Actually, the exception is only for an index file (ie index.*).
>
> Do you think that we can do the same thing for all duplicate files?
> If you still think it's a good idea, I could implement it.
>
> Cheers,
>
> Vincent
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


RE: [jira] Closed: (MNG-588) How to handle identical file names in the site structure for the static site generation?

Posted by Vincent Siveton <vi...@gmail.com>.
Hi Kenney,

> How about checking for src/apt/page.apt and
> src/xdoc/page.xml ( i.e. -> page.html )?

Actually, the exception is only for an index file (ie index.*). 

Do you think that we can do the same thing for all duplicate files?
If you still think it's a good idea, I could implement it.

Cheers,

Vincent
 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [jira] Closed: (MNG-588) How to handle identical file names in the site structure for the static site generation?

Posted by Kenney Westerhof <fo...@neonics.com>.
On Tue, 26 Jul 2005, Vincent Siveton (JIRA) wrote:

How about checking for src/apt/page.apt and
src/xdoc/page.xml ( i.e. -> page.html )?

>      [ http://jira.codehaus.org/browse/MNG-588?page=all ]
>
> Vincent Siveton closed MNG-588:
> -------------------------------
>
>     Resolution: Fixed
>
> Throw an exception if two index files already exist
>
> > How to handle identical file names in the site structure for the static site generation?
> > ----------------------------------------------------------------------------------------
> >
> >          Key: MNG-588
> >          URL: http://jira.codehaus.org/browse/MNG-588
> >      Project: Maven 2
> >         Type: Bug
> >     Versions: 2.0-beta-1
> >     Reporter: Vincent Siveton
> >     Assignee: Vincent Siveton
> >      Fix For: 2.0-beta-1
>
> >
> >
> > Supposed that we have the following site structure:
> > +- src/
> >    +- site/
> >       +- apt/
> >       |  +- index.apt
> >       |
> >       +- xdoc/
> >       |  +- index.xml
> >       |
> >       +- site.xml
> > Actually, the site:site goal generates the index.html from site/xdoc/index.xml.
> > It could also generate it from site/apt/index.apt.
> > Throwing an exception instead of warnings?
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>    http://jira.codehaus.org/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>    http://www.atlassian.com/software/jira
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org