Maven 2.x and 3.x Site Plugin

Urls rewritten when they contain the project urls' hostname

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Testcase included:
    yes
  • Number of attachments :
    3

Description

Urls in the site.xml file are being rewritten if they contain the hostname of the project url. For example:

pom.xml:
<url>http://208.75.85.243</url>

...
<site>
<id>test.site</id>
<url>file:///srv/www/test/site</url>
</site>
...

site.xml:
<item name="About" href="http://208.75.85.243/index.html" />

Results in the following link for the About page which is incorrect and includes the deployment location instead of the url:
http://208.75.85.243/test/site/index.html

Issue Links

Activity

Hide
Dennis Lundberg added a comment -

The rewriting of URLs is intended. However the links do not contain the deploy location. If you have a look at the source of the generated html files you will see that the URLs have been rewritten so that they are relative.

Show
Dennis Lundberg added a comment - The rewriting of URLs is intended. However the links do not contain the deploy location. If you have a look at the source of the generated html files you will see that the URLs have been rewritten so that they are relative.
Hide
Cameron Jones added a comment -

Yeah but the problem is that i don't want the urls to be relative. I have the following environments which i want to link to in the site:

build - http://localhost/build
staging - http://localhost/staging
prod - http://localhost/prod

And i want to deploy my site under:

http://localhost/project/test/site

I want the environment links to be static as they aren't related to the site itself and are there only for navigation but instead they are rewritten to:

http://localhost/project/test/site/build
http://localhost/project/test/site/staging
http://localhost/project/test/site/prod

I've included a test project which displays this.

Show
Cameron Jones added a comment - Yeah but the problem is that i don't want the urls to be relative. I have the following environments which i want to link to in the site: build - http://localhost/build staging - http://localhost/staging prod - http://localhost/prod And i want to deploy my site under: http://localhost/project/test/site I want the environment links to be static as they aren't related to the site itself and are there only for navigation but instead they are rewritten to: http://localhost/project/test/site/build http://localhost/project/test/site/staging http://localhost/project/test/site/prod I've included a test project which displays this.
Hide
Dennis Lundberg added a comment -

Please make any comments you might have regarding this in MSITE-159 instead.

Show
Dennis Lundberg added a comment - Please make any comments you might have regarding this in MSITE-159 instead.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: