You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Stefano Bagnara (JIRA)" <ji...@codehaus.org> on 2007/04/28 13:34:26 UTC

[jira] Commented: (MSITE-228) Try and unable to resolve org.apache.maven.skins:maven-default-skin:jar:RELEASE when another skin is specified

    [ http://jira.codehaus.org/browse/MSITE-228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_94414 ] 

Stefano Bagnara commented on MSITE-228:
---------------------------------------

I found a workaround for this.
Let me explain my full scenario and how I fixed it so maybe it will more clear to you where the bug belongs.

My pom structure is:
{code}
james-parent
|- maven-skin
'- james-root
   |- james-server-root
   |  |- james-server-2.2.0
   |  '- james-server:3.0-SNAPSHOT
   |     |- module1
   |     |- module2
   |     '....
   |- jspf
   '.....
{code}

The site.xml for james-root is the one specifying the use of the maven-skin as default skin for the project.
I cannot add this directive to james-parent because james-parent is also the parent for maven-skin and it would be a recursive dependency.
I get the error above while trying to build "james-server:3.0-SNAPSHOT".

Adding a site.xml to james-parent and specifying:
{code}
  <skin>
    <groupId>org.apache.maven.skins</groupId>
    <artifactId>maven-default-skin</artifactId>
    <version>1.0</version>
  </skin>
{code}
and then placing in my local "stage" folder the jar and pom for the default skin made the trick.

Probably the bug is that maven is searching for the skin even if the parent artifacts do not need a site generation (they didn't have a site.xml at all).

I don't like too much having to place the maven-default-skin jar (that I don't use) in the james-server:3.0-SNAPSHOT dependencies stage repository, but I can live with it as a workaround.

I hope this give you enough information for fixing this issue.

> Try and unable to resolve org.apache.maven.skins:maven-default-skin:jar:RELEASE when another skin is specified
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-228
>                 URL: http://jira.codehaus.org/browse/MSITE-228
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-5
>            Reporter: Stefano Bagnara
>
> 1) My project does not use external repositories for dependencies but only for plugins.
> 2) For dependencies I have a "stage" folder that is a "legacy structured" local repository I reference this way:
> {code}<repository>
>       <id>local-james-stage-m1</id>
>       <name>Local James stage repository</name>
>       <url>file://c:/lab/void/projects/server-trunk-modular/stage</url>
>       <layout>legacy</layout>
>       <releases>
>         <enabled>true</enabled>
>         <checksumPolicy>ignore</checksumPolicy>
>       </releases>
>       <snapshots>
>         <enabled>true</enabled>
>         <checksumPolicy>ignore</checksumPolicy>
>       </snapshots>
>     </repository>{code}
> 3) in my site.xml I have this:
> {code}<skin>
>     <groupId>org.apache.james</groupId>
>     <artifactId>maven-skin</artifactId>
>     <version>1.1-SNAPSHOT</version>
>   </skin>{code}
> 4) and in my local stage repository I have the org.apache.james/poms/maven-skin-1.1-SNAPSHOT.pom and org.apache.james/jars/maven-skin-1.1-SNAPSHOT.jar files.
> If I try to build the project, package it, run tests and everything else it works, but when I try to build "mvn site" if fails with this error:
> {code}
> [DEBUG] maven-default-skin: using locally installed snapshot
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] The skin does not exist: Unable to determine the release version
> Try downloading the file manually from the project website.
> Then, install it using the command:
>     mvn install:install-file -DgroupId=org.apache.maven.skins -DartifactId=maven-default-skin \
>         -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file
>   org.apache.maven.skins:maven-default-skin:jar:RELEASE
> [INFO] ------------------------------------------------------------------------
> [DEBUG] Trace
> org.apache.maven.BuildFailureException: The skin does not exist: Unable to determine the release version
> Try downloading the file manually from the project website.
> Then, install it using the command:
>     mvn install:install-file -DgroupId=org.apache.maven.skins -DartifactId=maven-default-skin \
>         -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file
>   org.apache.maven.skins:maven-default-skin:jar:RELEASE
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:560)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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: The skin does not exist: Unable to determine the release version
> Try downloading the file manually from the project website.
> Then, install it using the command:
>     mvn install:install-file -DgroupId=org.apache.maven.skins -DartifactId=maven-default-skin \
>         -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file
>   org.apache.maven.skins:maven-default-skin:jar:RELEASE
>         at org.apache.maven.plugins.site.AbstractSiteRenderingMojo.getSkinArtifactFile(AbstractSiteRenderingMojo.java:372)
>         at org.apache.maven.plugins.site.AbstractSiteRenderingMojo.createSiteRenderingContext(AbstractSiteRenderingMojo.java:442)
>         at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:108)
>         at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:92)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
>         ... 16 more
> {code}
> I also tried adding to my stage folder the file org.apache.maven.skins/jars/maven-default-skin-1.0.jar and org.apache.maven.skins/poms/maven-default-skin-1.0.pom but it doesn't find the artifact anyway.
> Why does it need the default skin when I specified a custome skin? How can I tell maven the version of the default skin (1.0) so it doesn't lookup for "RELEASE"?
> Otherwise, how can I solve this issue without using remote repositories or changing my local stage folder to another structure (m2 repository with release number properties, I guess)?

-- 
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