Hi Marine,
On 07/06/2010 02:55 PM, Marine JULIAN wrote:
Hello,
To understand how the creation of xwiki component works, I followed the
tutorial at
http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents and I
previously read the Building XWiki from sources page (
http://dev.xwiki.org/xwiki/bin/view/Community/Building). My goal is to
integrate the HelloWorld component (the tutorial one) in my xwiki instance
and to be able to access it in page by velocity.
Here is what I did :
* install maven 3.0 beta and put the settings.xml files in the .m2
* download the
xwiki-archetype-velocity-component-1.0-SNAPSHOT.jar<http://platform.xwik…ar>,
install it and generate the xwiki component from it
* in the pom.xml of the component, I replace the
<platform.core.version>1.8-SNAPSHOT</platform.core.version> by
<platform.core.version>2.3-SNAPSHOT</platform.core.version>
Right now this would be 2.4-SNAPSHOT or a 2.3 release (2.3, 2.3.1, 2.3.2).
The -SNAPSHOT versions means the .jar produced by the continuous
integration server, from a snapshot of the sources, which exists and
makes sense for the trunk or "active" branches. It's not the case for
the xwiki 2.3 branch, currently the development is for the 2.4 version
(the trunk) so the "current snapshot" or "nightly build" if the term
is
more familiar to you, would be a 2.4-SNAPSHOT. If you want your
component to be used on an xwiki 2.3.x, then you should just put that
version for platform dependency, instead of "2.3-SNAPSHOT".
I hope it makes some sense...
However, be warned that the tutorial is a little outdated, you'd need to
figure out some things by yourself.
Happy hacking,
Anca
Then, I tried to install the component (with mvn
install) in order to create
a jar I can put in my WEB-INF/lib directory. But, I had the following error
:
*[INFO] Scanning for projects...*
*[INFO]*
*[INFO]
------------------------------------------------------------------------*
*[INFO] Building xwiki-essai-component 1.1-SNAPSHOT*
*[INFO]
------------------------------------------------------------------------*
*[WARNING] Missing POM for velocity-tools:velocity-tools:jar:1.4*
*[INFO]
------------------------------------------------------------------------*
*[INFO] BUILD FAILURE*
*[INFO]
------------------------------------------------------------------------*
*[INFO] Total time: 1.050s*
*[INFO] Finished at: Tue Jul 06 13:25:45 CEST 2010*
*[INFO] Final Memory: 2M/4M*
*[INFO]
------------------------------------------------------------------------*
*[ERROR] Failed to execute goal on project xwiki-essai-component: Missing:
*
*----------*
*1) org.xwiki.platform:xwiki-core-component:jar:2.3-SNAPSHOT*
* Try downloading the file manually from the project website.*
* Then, install it using the command:*
* mvn install:install-file -DgroupId=org.xwiki.platform
-DartifactId=xwiki-c*
*ore-component -Dversion=2.3-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
*
* Alternatively, if you host your own repository you can deploy the file
there:*
* mvn deploy:deploy-file -DgroupId=org.xwiki.platform
-DartifactId=xwiki-core-component -Dversion=2.3-SNAPSHOT -Dpackaging=jar
-Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]*
* Path to dependency:*
* 1) com.xpn.xwiki.products:xwiki-essai-component:pom:1.1-SNAPSHOT*
* 2) org.xwiki.platform:xwiki-core-component:jar:2.3-SNAPSHOT*
*----------*
*1 required artifact is missing.*
*for artifact:*
* com.xpn.xwiki.products:xwiki-essai-component:pom:1.1-SNAPSHOT*
*from the specified remote repositories:*
* xwiki-externals (
http://maven.xwiki.org/externals, releases=true,
snapshots=true),*
* xwiki-releases (
http://maven.xwiki.org/releases, releases=true,
snapshots=false),*
* xwiki-snapshots (
http://maven.xwiki.org/snapshots, releases=false,
snapshots=true),*
* central (
http://repo1.maven.org/maven2, releases=true, snapshots=false)
*
*-> [Help 1]*
*[ERROR]*
*[ERROR] To see the full stack trace of the errors, re-run Maven with the
-e switch.*
*[ERROR] Re-run Maven using the -X switch to enable full debug logging.*
*[ERROR]*
*[ERROR] For more information about the errors and possible solutions,
please read the following articles:*
*[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MultipleArtifactsNotFoundE…
*
I'm new in Maven so i don't understand where is the problem. But I
dowloaded, as explained, the file
missing<http://maven.xwiki.org/snapshots/org/xwiki/platform/xwiki-core-c…
install it with :
*mvn install:install-file -DgroupId=org.xwiki.platform
-DartifactId=xwiki-core-component -Dversion=2.3-20100702.153251-358
-Dpackaging=jar -Dfile=C:\Users\fnac\Desktop\May\testMVN\pom.xml*
This time, the build succeeded but I didn't have any jar file. And, when I
tried again "mvn install", I had the same error.
I also tried "mvn -nsu clean install" (I read that somewhere) and it was the
same.
Do I miss something ? Is "mvn install" the good way to have a jar ? (I tried
"mvn package" too)
Marine
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users