Marcin Kuthan wrote:
Hi Lukas

Sorry for inconvenience with my example. I extracted self-contained
test project:
http://m4enterprise.googlecode.com/svn/trunk/test2/

The example is prepared to use m-site-p version 2.3-SNAPSHOT. You can
customize plugin version with com.acme.maven.corporate-pom.siteVersion
property.

I didn't specify staging location because for the default location
"target/staging" on aggregate project level the results are the same.

Please execute the following commands on the aggregate pom level (top level):
mvn clean
mvn site:site
mvn site:stage -DsiteUrl='scp://myhost/var/www'

Stage is generated into "target/staging/myhost/var/www/...." but links
to submodules point to
"../../../../localhost/var/www/modular-war-parent/....".
Instead "localhost" "myhost" should be used as I specified in the
command line property. "localhost" is defined as a default value in
the pom and should be overwritten.


Yes, this is MSITE-135. When building the modules, the siteUrl from the parent is used.

If you remove the siteUrl from your properties, then you get correct links when using a cl parameter, however, if you don't specify a cl parameter, you'll get a ${siteUrl} literal in your path. If it's just for staging, this is probably good enough. For live deploy you might want to avoid properties, or you could force to fail the build if a property is not set.

HTH,
-Lukas


For plugin version 2.2 siteUrl property is interpreted as I expected,
but the links are broken due to wrong directory depth:
mvn site:stage -DsiteUrl='scp://myhost/var/www'
-Dcom.acme.maven.corporate-pom.siteVersion='2.2'

And the link is "../../../../../myhost/var/www/...".

I hope that it would help.

Marcin


On 1 February 2011 10:04, Lukas Theussl<ltheu...@apache.org>  wrote:

Dear Marcin,

I am unable to build your project (missing dependencies, failed enforcer
rules), please provide a simple, self-contained test project if you want me
to check something for you.

However, from your description, this still sounds like MSITE-135 to me; in
4. the {very-long-name.siteUrl} property is interpolated with the parent
project value instead of the cl value.

But then, since you specify the staging location on the command line anyway,
I don't see why you don't use the stagingDirectory parameter directly,
instead of going via distributionManagement.siteUrl, see
http://maven.apache.org/plugins/maven-site-plugin/usage.html (Staging a
site).


HTH,
-Lukas


Marcin Kuthan wrote:

Hi Lukas

I don't think that my findings are related to MSITE-135. Only
2.3-SNAPSHOT is affected.

You should reproduce the issue in 10 mins:
1. Follow http://code.google.com/p/m4enterprise/wiki/GettingStarted
(only Checkout Source Code and Install Corporate POM sections)
2. Go to trunk/modular-war
3. Call:
mvn clean
mvn -Dcom.acme.maven.corporate-pom.siteVersion=2.3-SNAPSHOT
-Dcom.acme.maven.corporate-pom.enforcerRulesDisabled site:site
site:stage
4. Call:
mvn clean
mvn -Dcom.acme.maven.corporate-pom.siteVersion=2.3-SNAPSHOT
-Dcom.acme.maven.corporate-pom.enforcerRulesDisabled site:site
site:stage
-Dcom.acme.maven.corporate-pom.distributionManagement.siteUrl=scp://host/var/www

For 3) generated stage are fine, links in modular-war to submodules are
valid.
For 4) links are broken,
com.acme.maven.corporate-pom.distributionManagement.siteUrl property
is ignored

If you use
-Dcom.acme.maven.corporate-pom.distributionManagement.siteUrl=file:///home/....
results are even worse. URLs are totally broken.

Marcin

On 31 January 2011 16:32, Lukas Theussl<ltheu...@apache.org>    wrote:

This sounds like a manifestation of
http://jira.codehaus.org/browse/MSITE-135 but I'm not sure. If you can
attach a simple test project that would help, I haven't tried to fix this
yet.

-Lukas


Marcin Kuthan wrote:

Hi Lukas

I'm sorry that I didn't specify versions in the first post. I tested
my poms with version 2.2 (for Maven 2.2.1) and version 3.0-beta-3 (for
Maven 3.0.2). In both cases links are invalid.

I updated my build to 2.3-SNAPSHOT and plugin reported invalid
character in<url>      element. There was a mistake in property name, and
literal value ${prop} was used instead of interpreted value. The new
plugin versions helped me to find out this bug - great!

I checked again version 2.2, even with fixed property name links in
the project stage are still invalid.

For version 2.3-SNAPSHOT it seems to be almost ok. The depth of
directory levels in the links is now correct but it looks that
distributionManagement.site.url is not resolved correctly.

Please look at

http://code.google.com/p/m4enterprise/source/browse/trunk/corporate-pom/pom.xml.
Element distributionManagement.site.url is set as a property
"${com.acme.maven.corporate-pom.distributionManagement.siteUrl}".
Default value of the property is
"scp://sites.intranet.acme.com/var/www". In my settings.xml I
overwrite this property with "scp://sites.my-company.com/var/www".

As a result: stage is generated into
target/staging/sites.my-company.com/var/www directory, but the links
look like

"../../../../sites.intranet.acme.com/var/www/modular-war-parent/index.html"

There is no "sites.intranet.acme.com" elements in the effective pom of
the project, variables are resolved correctly to values from
settings.xml.

Could you check for differences between directory structure and links
generation for 2.3-SNAPSHOT, please? Are they generated in the similar
way?

Many Thanks,
Marcin

On 31 January 2011 14:04, Lukas Theussl<ltheu...@apache.org>      wrote:

Which version of the site plugin are you using (it's not specified in
your
poms)? Please test 2.3-SNAPSHOT, some staging issues should be fixed
with
http://jira.codehaus.org/browse/MSITE-533.

HTH,
-Lukas


Marcin Kuthan wrote:

Hi

My multi module project is structured with separate aggregate pom and
parent pom (aggregate pom is not a parent pom).
All modules are aggregated by aggragate pom (parent pom is also
submodule of aggregate pom). All submodules inherit from parent pom.

Aggregate pom:



http://code.google.com/p/m4enterprise/source/browse/trunk/modular-war/pom.xml

Parent pom:



http://code.google.com/p/m4enterprise/source/browse/trunk/modular-war/modular-war-parent/pom.xml

And other submodules:



http://code.google.com/p/m4enterprise/source/browse/trunk/modular-war/modular-war-core/pom.xml



http://code.google.com/p/m4enterprise/source/browse/trunk/modular-war/modular-war-webapp/pom.xml

For all modules<url>        are defined to reflect project structure.
When
the site is deployed (mvn site-deploy) links between modules are
valid, but for site stage (mvn site:stage or mvn site:stage-deploy)
are broken.

It looks that relative links point one directory level too high. In
the index page of aggregate pom the link to the parent module looks
like:



../../../../../my-site-url-from-dist-management-section/modular-war-parent/index.html

If I change it to (remove one directory level):



../../../../my-site-url-from-dist-management-section/modular-war-parent/index.html
link is valid.

Links to modular-war-parent from modular-war-core and
modular-war-webapp are valid, e.g: "../index.html", only links from
aggregate pom to submodules are broken.

I tried to remove trailing slashes from<url>        element but it
didn't
help, the links were unchanged.

Do you have an idea where is a mistake in my configuration? And why
links are broken only for site stage, when for regular site deployment
are valid?

Thanks,
Marcin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to