Hi Marine,
On 07/06/2010 04:38 PM, Marine Julian wrote:
Hi Anca,
Anca Luca wrote:
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.
Indeed, I didn't grasp the meaning of "SNAPSHOT" and it makes sense now !
Thanks !
Like I use a xwiki 2.3.1, I put the "2.3.1" version for platform dependency.
Unfortunately, I always had the same error... I.e :
[ERROR] Failed to execute goal on project xwiki-essai-component: Missing:
----------
1) org.xwiki.platform:xwiki-core-component:jar:2.3.1
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-core-component -Dversion=2.3.1 -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.1 -Dpackaging=jar
-Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) com.xpn.xwiki.platform:xwiki-essai-component:pom:1.1
2) org.xwiki.platform:xwiki-core-component:jar:2.3.1
----------
1 required artifact is missing.
for artifact:
com.xpn.xwiki.platform:xwiki-essai-component:pom:1.1
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),
The required dependency should have been found at
http://maven.xwiki.org/releases/org/xwiki/platform/xwiki-core-component/2.3…
but as you can see there's no jar there. The reason is that the
xwiki-core-component module was split in multiple submodules. You need
to edit you pom and change the dependency from xwiki-core-component to
xwiki-core-component-api like this:
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-core-component-api</artifactId>
<version>${pom.version}</version>
</dependency>
Hope this helps,
Marius
xwiki-snapshots (
http://maven.xwiki.org/snapshots,
releases=false,
snapshots=true),
central (
http://repo1.maven.org/maven2, releases=true, snapshots=false)
-> [Help 1]
Do you think it's due to the fact that the tutorial is outdated ? Because, I
didn't do something special : just download the archetype, modify the
version for platform dependency in the pom file and try to install it in
order to have a jar...