deploy:deploy-file doesn't take the pom from the jar, it constructs a default pom if the generatePom and pomFile parameters are not used, see http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html

Btw I checked that the pom in the jar *is* the same as the one on the repo.

HTH,
-Lukas


David Roussel wrote:
I was unable to download the pom from repo1.maven.org [1], and so I
downloaded the jar, and used "mvn deploy:deploy-file" to upload it to my
repo.  It looks like "mvn deploy:deploy-file" takes the pom from inside the
jar, and that version of the pom is wrong.

Normally in released plugins, the pom inside the jar is the same as the one
in the repo.

Thanks

David


[1] I don't know why, might be the proxy here at work causing problems.


ltheussl wrote:

[maybe the user-list would be a better place to ask this?]

I can see a dependency on doxia-book here:

http://repo1.maven.org/maven2/org/apache/maven/doxia/doxia-maven-plugin/1.0-alpha-9/doxia-maven-plugin-1.0-alpha-9.pom

which pom did you look at?

-Lukas


David Roussel wrote:

Hi,

Summary:
 doxia-maven-plugin-1.0-alpha-9.pom should list a dependency on
doxia-book.

Evidence:
 java.lang.NoClassDefFoundError:
org/apache/maven/doxia/book/BookDoxiaException

Background.

I tried to follow the "Writing Books" example given here:
http://maven.apache.org/doxia/book/index.html

I added the plugin lines to my pom, under the build section.  I added the
example boo xml in a file at src/docs/release-notes.xml and updated the
path
in the plugin configuration to match this.

I had to manually install the jar file, as there was a problem accessing
the
pom file through my web proxy from repo1.maven.org.  But I was able to
download the jar ok, so I then ran...

mvn deploy:deploy-file -DgroupId=org.apache.maven.doxia
-DartifactId=doxia-maven-plugin -Dversion=1.0-alpha-9 -Dpackaging=jar
-Dfile=C:\dev\downloads\firefox\doxia-maven-plugin-1.0-alpha-9.jar
-Durl=file:\\\myserver\maven2

(FYI I'm using maven-site-plugin 2.0-beta-5, which uses doxia
1.0-alpha-8)

I then ran a site build...

mvn site -N -DbuildVersion=1.0-DR-SNAPSHOT

This failed with the errow below.  Opening the plugin jar file I can see
the <mojos> <mojo> <goal>render-books</goal> definition, so I don't know why
it
says it couldn't find

[INFO] Scanning for projects...
[INFO]
----------------------------------------------------------------------------
[INFO] Building CTFramework
[INFO]    task-segment: [site]
[INFO]
----------------------------------------------------------------------------
-----------------------------------------------------
this realm =
app0.child-container[org.apache.maven.doxia:doxia-maven-plugin]
urls[0] =
file:/C:/dev/maven-repo/org/apache/maven/doxia/doxia-maven-plugin/1.0-alpha-9/doxia-maven-plugin-1.0-alpha-9.jar
urls[1] =
file:/C:/dev/maven-repo/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
Number of imports: 4
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]


this realm = plexus.core
urls[0] = file:/c:/apps/maven-2.0.7/bin/../lib/maven-core-2.0.7-uber.jar
urls[1] =
file:/C:/dev/maven-repo/com/euroclear/framework/codestandards/1.0/codestandards-1.0.jar
Number of imports: 4
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]
-----------------------------------------------------
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal
'org.apache.maven.doxia:doxia-maven-plugin:1.0-alpha-9:render-books':
Unable
to find the mojo 'org.apache.maven.doxia:do
xia-maven-plugin:1.0-alpha-9:render-books' in the plugin
'org.apache.maven.doxia:doxia-maven-plugin'
org/apache/maven/doxia/book/BookDoxiaException
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Thu Sep 27 10:55:09 BST 2007
[INFO] Final Memory: 10M/18M
[INFO]
------------------------------------------------------------------------

Running again with -e gave the following cause:

Caused by: java.lang.NoClassDefFoundError:
org/apache/maven/doxia/book/BookDoxiaException
       at java.lang.Class.getDeclaredConstructors0(Native Method)
       at
java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
       at java.lang.Class.getConstructor0(Class.java:2640)
       at java.lang.Class.newInstance0(Class.java:321)
       at java.lang.Class.newInstance(Class.java:303)
       at
org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:44)

I looked at the doxia-maven-plugin-1.0-alpha-9.pom and it doesn't list
any
dependencies.  I guess it should list a dependency on doxia-book where
that
class is to be found?



Reply via email to