You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Ted Husted <hu...@apache.org> on 2006/07/12 02:18:06 UTC

[maven] URIs on sub-sites

I don't know what I'm doing wrong, but the menu URIs on the subsites
are not rendering correctly for me.

For some reason, they seem to be stripping
"http://struts.apache.org/" out of all the URIs, so that a reference
to "http://struts.apache.org/1.x" becomes "1.x", and a reference to
just "http://struts.apache.org/" becomes an empty string.  Likewise
for the image references.

Is this a "feature"? Is there a base location being set someplace that
tells Maven to do this?

Also, on the subsites, I'm getting two sets of the "Apache | Struts 1
| Struts 2 " links on the upper right.

-Ted.

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


Re: [maven] URIs on sub-sites

Posted by Ted Husted <hu...@apache.org>.
On 7/11/06, Don Brown <mr...@twdata.org> wrote:
> So basically we'd add an empty directory in all cases?

No, I meant:

Website:
struts.apache.org/1.x -> struts.apache.org/struts1
struts.apache.org/2.0  > struts.apache.org/struts2

Repository:
struts/struts1/apps -> struts/struts1/struts-apps
struts/struts1/tiles -> struts/struts1/struts-tiles

It's just a straight rename so that we are using a single set of
naming conventions in both places.

-Ted.

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


Re: [maven] URIs on sub-sites

Posted by Don Brown <mr...@twdata.org>.
Ted Husted wrote:
> I'd really prefer that we use one set of naming conventions. If it's
> more typing, then so be it. I've already typed a year's worth of URIs
> in this email message :)
>
> My suggestion is that we make it a straight-line correlation
>
> Website
> /s/1.x/struts1
> /s/2.0/struts2
>
> Repository
> /s/apps/struts-apps
> ...
> /s/tiles/struts-tiles
Ok, now you lost me.  Are you saying that:

struts.apache.org/1.x -> struts.apache.org/1.x/struts1
struts.apache.org/2.0  > struts.apache.org/2.0/struts2

struts/struts1/apps -> struts/struts1/apps/struts-apps
struts/struts1/tiles -> struts/struts1/tiles/struts-tiles

So basically we'd add an empty directory in all cases?  If so, I don't 
like that idea because first, I personally don't think the extra 
directories is worth it, and second, we finally have the repo and 
website fully renamed, and, even if it is imperfect, I think we should 
move on.   The Subversion repository and website are two different 
things, and while we have to do silly naming things to keep Maven happy 
in svn, I don't think we should let those hacks leak into our public 
website.

Don

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


Re: [maven] URIs on sub-sites

Posted by Ted Husted <hu...@apache.org>.
On 7/11/06, Don Brown <mr...@twdata.org> wrote:
> I dunno: /repos/asf/struts/struts1/struts-core  ... that's a lot of Struts and
> too much typing, IMO.  The only reason the artifact id's have "struts-" in them
> is for the jar names.  Otherwise, I'd say the group id having Struts in it would
> be fine.

I'm having a lot of trouble dealing with all these inconsistencies
between the repository and the website. It's said that consistency is
the hobgoblin of small minds, and with everything else er have to do,
my mind is shrinking rapidly :)

I'd really prefer that we use one set of naming conventions. If it's
more typing, then so be it. I've already typed a year's worth of URIs
in this email message :)

My suggestion is that we make it a straight-line correlation

Website
/s/1.x/struts1
/s/2.0/struts2

Repository
/s/apps/struts-apps
...
/s/tiles/struts-tiles

-Ted.

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


Re: [maven] URIs on sub-sites

Posted by Don Brown <mr...@twdata.org>.
I dunno: /repos/asf/struts/struts1/struts-core  ... that's a lot of Struts and 
too much typing, IMO.  The only reason the artifact id's have "struts-" in them 
is for the jar names.  Otherwise, I'd say the group id having Struts in it would 
be fine.

Don

Wendy Smoak wrote:
> On 7/11/06, Ted Husted <hu...@apache.org> wrote:
> 
>> Do we want to go with the flow and change the directory names then?
>>
>> If we are using "struts-scripting" on the website, it makes more sense
>> to me to use "struts-scripting" in the repository.
> 
> Changing the directory names in the svn repo isn't going to fix the
> issues with the website.
> 
> It would make life easier for Continuum and Maven-in-general, though.
> 
> +0 -- I'm booked solid with projects right now, and this can wait.
> 


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


Re: [maven] URIs on sub-sites

Posted by Wendy Smoak <ws...@gmail.com>.
On 7/11/06, Ted Husted <hu...@apache.org> wrote:

> Do we want to go with the flow and change the directory names then?
>
> If we are using "struts-scripting" on the website, it makes more sense
> to me to use "struts-scripting" in the repository.

Changing the directory names in the svn repo isn't going to fix the
issues with the website.

It would make life easier for Continuum and Maven-in-general, though.

+0 -- I'm booked solid with projects right now, and this can wait.

-- 
Wendy

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


Re: [maven] URIs on sub-sites

Posted by Don Brown <mr...@twdata.org>.
Oh, you are talking about svn.  Ignore me :)

Don

Don Brown wrote:
> The web site directory already matches the artifact id, IIRC.  I
> thought your original complaint was about how Maven dealt with the
> /1.x prefix.
> 
> Don
> 
> On 7/11/06, Ted Husted <hu...@apache.org> wrote:
>> On 7/11/06, Wendy Smoak <ws...@gmail.com> wrote:
>> > It's (somehow) related to the <distributionManagement>/<site>/<url> in
>> > the pom.  It took me a few tries to get the links on the Tiles 2 site
>> > to work.  If the directory name on the site matches the artifactId in
>> > the pom, it works as designed.  If not, you have to add <url> elements
>> > to force values at different levels.
>>
>> Do we want to go with the flow and change the directory names then?
>>
>> If we are using "struts-scripting" on the website, it makes more sense
>> to me to use "struts-scripting" in the repository.
>>
>> If anyone doesn't like it, we can just blame Maven :)
>>
>> -Ted.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
> 


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


Re: [maven] URIs on sub-sites

Posted by Don Brown <do...@gmail.com>.
The web site directory already matches the artifact id, IIRC.  I
thought your original complaint was about how Maven dealt with the
/1.x prefix.

Don

On 7/11/06, Ted Husted <hu...@apache.org> wrote:
> On 7/11/06, Wendy Smoak <ws...@gmail.com> wrote:
> > It's (somehow) related to the <distributionManagement>/<site>/<url> in
> > the pom.  It took me a few tries to get the links on the Tiles 2 site
> > to work.  If the directory name on the site matches the artifactId in
> > the pom, it works as designed.  If not, you have to add <url> elements
> > to force values at different levels.
>
> Do we want to go with the flow and change the directory names then?
>
> If we are using "struts-scripting" on the website, it makes more sense
> to me to use "struts-scripting" in the repository.
>
> If anyone doesn't like it, we can just blame Maven :)
>
> -Ted.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

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


Re: [maven] URIs on sub-sites

Posted by Ted Husted <hu...@apache.org>.
On 7/11/06, Wendy Smoak <ws...@gmail.com> wrote:
> It's (somehow) related to the <distributionManagement>/<site>/<url> in
> the pom.  It took me a few tries to get the links on the Tiles 2 site
> to work.  If the directory name on the site matches the artifactId in
> the pom, it works as designed.  If not, you have to add <url> elements
> to force values at different levels.

Do we want to go with the flow and change the directory names then?

If we are using "struts-scripting" on the website, it makes more sense
to me to use "struts-scripting" in the repository.

If anyone doesn't like it, we can just blame Maven :)

-Ted.

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


Re: [maven] URIs on sub-sites

Posted by Ted Husted <hu...@apache.org>.
On 7/11/06, Wendy Smoak <ws...@gmail.com> wrote:
> It's (somehow) related to the <distributionManagement>/<site>/<url> in
> the pom.  It took me a few tries to get the links on the Tiles 2 site
> to work.  If the directory name on the site matches the artifactId in
> the pom, it works as designed.  If not, you have to add <url> elements
> to force values at different levels.

OK, making progress.

First, it's important to update the URI for the subsite. They were
using the the top-level s.a.o site for their own URI. This was causing
the image loads to fail, since it resoved

Using fully qualified URIs, including the "index.html", seems to help.
Or at least the URIs make more sense when you look at them :)

Though, I still think I'm missing a setting on my local system. The
old Struts Tiles page had some absolute references, and all of mine
are relative.

Would using the deploy target make a difference? I've been building
each as I went along.

-Ted.

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


Re: [maven] URIs on sub-sites

Posted by Ted Husted <hu...@apache.org>.
Clean with the -Papps switch did the trick.

I'll finish up on the Tiles stufff, deploy the applications, and post
a new all-snapshot.

I also need to put the menubar references back for scripting and
tiles. Evidentally, beta4 doesn't inherit these, but beta5 does. But
overall, it looks like b4 is working better for us.

If nothing else comes up, I'll announce an intent to tag the
reposititory for STRUTS_1_3_5 on Sunday, and roll a non-snapshot
distributioin.

If we can't adjust the build to create the -docs, -lib, -src, and
-webapps archives, I'll just create them by hand.

-Ted.

On 7/12/06, Wendy Smoak <ws...@gmail.com> wrote:
> A test failed because you changed _site_ plugin versions?!
>
> This works fine here with 2.0-beta-4:
>
> $ mvn clean -Papps
> $ mvn install site -Papps,pre-assembly; cd assembly; mvn assembly:assembly
>
> (The -all assembly is now 47 MB, probably because of extra dependencies.)
>
> --
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>


-- 
HTH, Ted.
* http://www.husted.com/struts/

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


Re: [maven] URIs on sub-sites

Posted by Wendy Smoak <ws...@gmail.com>.
On 7/12/06, Ted Husted <hu...@apache.org> wrote:
> On 7/12/06, Wendy Smoak <ws...@gmail.com> wrote:
> > On 7/12/06, Ted Husted <hu...@apache.org> wrote:
> >
> > > Is there something we want in beta5, aside from site:run, or can we
> > > use beta4 for this release?
> >
> > Not that I know of.  Yes, maven-site-plugin 2.0-beta4 should be fine.
>
> Sigh. I tried to build an assembly with beta4, and a test failed.

A test failed because you changed _site_ plugin versions?!

This works fine here with 2.0-beta-4:

$ mvn clean -Papps
$ mvn install site -Papps,pre-assembly; cd assembly; mvn assembly:assembly

(The -all assembly is now 47 MB, probably because of extra dependencies.)

-- 
Wendy

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


Re: [maven] URIs on sub-sites

Posted by Ted Husted <hu...@apache.org>.
On 7/12/06, Wendy Smoak <ws...@gmail.com> wrote:
> On 7/12/06, Ted Husted <hu...@apache.org> wrote:
>
> > Is there something we want in beta5, aside from site:run, or can we
> > use beta4 for this release?
>
> Not that I know of.  Yes, maven-site-plugin 2.0-beta4 should be fine.

Sigh. I tried to build an assembly with beta4, and a test failed.

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.struts.apps.AppsTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.121 sec <<< FA
ILURE!

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

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: There are test failures.
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:555)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:475)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:454)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:306)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:273)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:140)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures
.
        at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugi
n.java:403)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:412)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:534)
        ... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7 minutes 11 seconds
[INFO] Finished at: Wed Jul 12 11:45:04 EDT 2006
[INFO] Final Memory: 35M/63M
[INFO] ------------------------------------------------------------------------

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


Re: [maven] URIs on sub-sites

Posted by Wendy Smoak <ws...@gmail.com>.
On 7/12/06, Ted Husted <hu...@apache.org> wrote:

> Is there something we want in beta5, aside from site:run, or can we
> use beta4 for this release?

Not that I know of.  Yes, maven-site-plugin 2.0-beta4 should be fine.

> PS: I filed http://jira.codehaus.org/browse/MSITE-159

Thanks. :)

-- 
Wendy

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


Re: [maven] URIs on sub-sites

Posted by Ted Husted <hu...@apache.org>.
On 7/12/06, Wendy Smoak <ws...@gmail.com> wrote:
> Try going back to maven-site-plugin 2.0-beta4 by changing the plugin
> version in the parent pom, and see if that helps.

Yes, that does help. The <UL> issue also goes away.

Is there something we want in beta5, aside from site:run, or can we
use beta4 for this release?

-Ted.

PS: I filed http://jira.codehaus.org/browse/MSITE-159

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


Re: [maven] URIs on sub-sites

Posted by Ted Husted <hu...@apache.org>.
On 7/12/06, Wendy Smoak <ws...@gmail.com> wrote:
> If we're going to split it up, I think we should drop the -all
> distribution.  Upload what you want them to look like and I'll see
> about adjusting the assembly descriptors to match.

Just make each subdirectory in the "all" assembly a separate archive,
and include the NOTICE.txt and LICENSE.txt in each.

struts-1.3.5-docs.zip
struts-1.3.5-lib.zip
struts-1.3.5-src.zip
struts-1.3.5-webapp.zip

I don't see the harm in keep the all distribution.

Today, we have -all and -lib. We're just finishing the job with -docs,
-src, and -webapp. :)

Ideally, I'd say we could keep each set under the subdirectory, so if
you unzipped them all to the same location, you'd end up with an exact
copy of the "all" distribution.

struts-1.3.5-docs.zip
/docs
LICENSE.txt
NOTICE.TXT

struts-1.3.5-webapps.zip
/webapps
LICENSE.txt
NOTICE.txt

Or, not. Using no subdirectory, as we already do with
struts-1.3.5-SNAPSHOT-lib.zip, works too.

-Ted.

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


Re: [maven] URIs on sub-sites

Posted by Wendy Smoak <ws...@gmail.com>.
On 7/12/06, Ted Husted <hu...@apache.org> wrote:

> BUT, for the 4 Jul snapshot we didn't need to do this, so why do I
> have to do it now?
>
> (I actually like doing it, since it's our URI, so we can afford to be
> specific, and being specific saves a redirect. But why is my snapshot
> different?)

Try going back to maven-site-plugin 2.0-beta4 by changing the plugin
version in the parent pom, and see if that helps.

(I have a feeling using such a specific URL will break the automatic
construction of URLs for sub-modules.  But, what redirect? )

> In the meantime, I'll post updated snapshots later today, including
> separate downloads for docs, src, and webapps (along with the "all"
> and lib, that we already had).

If we're going to split it up, I think we should drop the -all
distribution.  Upload what you want them to look like and I'll see
about adjusting the assembly descriptors to match.

-- 
Wendy

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


Re: [maven] URIs on sub-sites

Posted by Ted Husted <hu...@apache.org>.
On 7/11/06, Wendy Smoak <ws...@gmail.com> wrote:
> It's (somehow) related to the <distributionManagement>/<site>/<url> in
> the pom.  It took me a few tries to get the links on the Tiles 2 site
> to work.  If the directory name on the site matches the artifactId in
> the pom, it works as designed.  If not, you have to add <url> elements
> to force values at different levels.

The links in the assembly I'm generating locally are different than
the links in the 4 July SNAPSHOT.

In my snapshots, links that begin with "http://struts.apache.org/" are
being forced to relative links. (The "www.apache.org" link is okay.)
In the 4 Jul snapshot, all the absolute references stayed absolute. It
feels like a feature that I need to turn off.

If I change the struts1/pom.xml

-   <url>http://struts.apache.org</url>
+  <url>http://struts.apache.org/index.html</url>

Then, we're OK. It leaves the other "http://struts.apache.org" alone.

BUT, for the 4 Jul snapshot we didn't need to do this, so why do I
have to do it now?

(I actually like doing it, since it's our URI, so we can afford to be
specific, and being specific saves a redirect. But why is my snapshot
different?)

For now, I will mop up whatever else I can and spend the rest of the
day boning up on Maven 2. I'd like to spend the rest of the week
working on Struts 2, but I can get back to this on Sunday.

In the meantime, I'll post updated snapshots later today, including
separate downloads for docs, src, and webapps (along with the "all"
and lib, that we already had).

-Ted.

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


Re: [maven] URIs on sub-sites

Posted by Wendy Smoak <ws...@gmail.com>.
On 7/11/06, Wendy Smoak <ws...@gmail.com> wrote:
> If the directory name on the site matches the artifactId in
> the pom, it works as designed.

s/designed/desired.  I assume it's working as designed, even if I'm
not quite sure what the design is...

-- 
Wendy

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


Re: [maven] URIs on sub-sites

Posted by Wendy Smoak <ws...@gmail.com>.
On 7/11/06, Ted Husted <hu...@apache.org> wrote:

> I don't know what I'm doing wrong, but the menu URIs on the subsites
> are not rendering correctly for me.
>
> For some reason, they seem to be stripping
> "http://struts.apache.org/" out of all the URIs, so that a reference
> to "http://struts.apache.org/1.x" becomes "1.x", and a reference to
> just "http://struts.apache.org/" becomes an empty string.  Likewise
> for the image references.
>
> Is this a "feature"? Is there a base location being set someplace that
> tells Maven to do this?

It's (somehow) related to the <distributionManagement>/<site>/<url> in
the pom.  It took me a few tries to get the links on the Tiles 2 site
to work.  If the directory name on the site matches the artifactId in
the pom, it works as designed.  If not, you have to add <url> elements
to force values at different levels.

> Also, on the subsites, I'm getting two sets of the "Apache | Struts 1
> | Struts 2 " links on the upper right.

See if they're re-defined in the site.xml for the modules.  I'm fairly
sure the links are inherited, so you should only need them in the top
level site.xml.  There are more site.xml inheritance mysteries that I
haven't figured out yet.

Good luck. :)

-- 
Wendy

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