[xwiki-users] WritingComponents, First Try
Hi, I experiment http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents I'm at "The component explained". I try "mvn install" (which is not in the tutorial, I'm crazy). I get that : Missing: ---------- 1) org.xwiki.platform:xwiki-core-component:jar:1.5-SNAPSHOT Try downloading the file manually from the project website. ... and etc. Here is pom.xml with the snapshot : <properties> <!-- TODO: remove this if you inherit a project that has the core version set --> <platform.core.version>1.5-SNAPSHOT</platform.core.version> </properties> <dependencies> <dependency> <groupId>org.xwiki.platform</groupId> <artifactId>xwiki-core-component</artifactId> <version>${platform.core.version}</version> </dependency> <dependency> <groupId>junit</groupId> As I understand things, I don't inherit a project, so I suppose it's the automatic settings of platform.core.version which is false. What is the good one ? Thanks.
Hi Hervé Hervé Agnoux wrote:
Hi,
I experiment http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents
I'm at "The component explained".
I try "mvn install" (which is not in the tutorial, I'm crazy).
I get that :
Missing: ---------- 1) org.xwiki.platform:xwiki-core-component:jar:1.5-SNAPSHOT
Try downloading the file manually from the project website.
... and etc.
Here is pom.xml with the snapshot :
<properties> <!-- TODO: remove this if you inherit a project that has the core version set --> <platform.core.version>1.5-SNAPSHOT</platform.core.version> </properties> <dependencies> <dependency> <groupId>org.xwiki.platform</groupId> <artifactId>xwiki-core-component</artifactId> <version>${platform.core.version}</version> </dependency> <dependency> <groupId>junit</groupId>
As I understand things, I don't inherit a project, so I suppose it's the automatic settings of platform.core.version which is false.
Right, 1.5-SNAPSHOT was the latest snapshot version at the moment the tutorial has been written. AFAIK our policy is to keep snapshot versions on the maven repository for trunk + the latest branch, being currently 1.7 and 1.8 for the platform (would be too disk-hungry to keep them all). So 1.5-SNAPSHOT is definitely not available any longer. You can depend on more recent snapshots, like 1.7-SNAPSHOT or 1.8-SNAPSHOT. You can always check what snapshots are available visiting http://maven.xwiki.org The alternative is you depend on a released version. That's probably a better practice for components developed out of the XWiki project, since you can rely on the fact the artifacts behavior are not going to change without you noticing :) Recent released versions are 1.7.1 (stable branch) and 1.8-milestone-2 (bleeding edge). Note that your dependency is xwiki-core-component is needed only if your code uses classes from the component manager (typically, if you have a Composable component that lookup other components against the component manager). If you don't do that, you can remove this dependency. Hope this helps, Have fun! Jerome.
What is the good one ?
Thanks.
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Le mardi 17 février 2009, Jerome Velociter a écrit :
Right, 1.5-SNAPSHOT was the latest snapshot version at the moment the tutorial has been written. AFAIK our policy is to keep snapshot versions on the maven repository for trunk + the latest branch, being currently 1.7 and 1.8 for the platform (would be too disk-hungry to keep them all). So 1.5-SNAPSHOT is definitely not available any longer. You can depend on more recent snapshots, like 1.7-SNAPSHOT or 1.8-SNAPSHOT. You can always check what snapshots are available visiting http://maven.xwiki.org
The alternative is you depend on a released version. That's probably a better practice for components developed out of the XWiki project, since you can rely on the fact the artifacts behavior are not going to change without you noticing :) Recent released versions are 1.7.1 (stable branch) and 1.8-milestone-2 (bleeding edge).
Thanks. But nothing work. I try 1.7.1, I get : [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Unnamed - monGroupeID:monComponentArtifactID:jar:maComponentVersion [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. Downloading: http://repo1.maven.org/maven2/org/xwiki/platform/xwiki-core- component/1.7.1/xwiki-core-component-1.7.1.pom Downloading: http://repo1.maven.org/maven2/org/xwiki/platform/xwiki-core- component/1.7.1/xwiki-core-component-1.7.1.jar [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact. Missing: ---------- 1) org.xwiki.platform:xwiki-core-component:jar:1.7.1 ==> With 1.8-milestone-2 and 1.7-SNAPSHOT : Missing: ---------- 1) org.xwiki.platform:xwiki-core-component:jar:1.8-milestone-2 Missing: ---------- 1) org.xwiki.platform:xwiki-core-component:jar:1.7-SNAPSHOT ==> In Guest Star a special case with 1.8-SNAPSHOT : [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error building POM (may not be this project's POM). Project ID: org.xwiki.platform:xwiki-core-component:jar:null Reason: Cannot find parent: com.xpn.xwiki.platform:xwiki-core-parent for project: org.xwiki.platform:xwiki-core-component:jar:null for project org.xwiki.platform:xwiki-core-component:jar:null
Hervé Agnoux wrote:
Le mardi 17 février 2009, Jerome Velociter a écrit :
Right, 1.5-SNAPSHOT was the latest snapshot version at the moment the tutorial has been written. AFAIK our policy is to keep snapshot versions on the maven repository for trunk + the latest branch, being currently 1.7 and 1.8 for the platform (would be too disk-hungry to keep them all). So 1.5-SNAPSHOT is definitely not available any longer. You can depend on more recent snapshots, like 1.7-SNAPSHOT or 1.8-SNAPSHOT. You can always check what snapshots are available visiting http://maven.xwiki.org
The alternative is you depend on a released version. That's probably a better practice for components developed out of the XWiki project, since you can rely on the fact the artifacts behavior are not going to change without you noticing :) Recent released versions are 1.7.1 (stable branch) and 1.8-milestone-2 (bleeding edge).
Thanks. But nothing work.
I try 1.7.1, I get :
[INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Unnamed - monGroupeID:monComponentArtifactID:jar:maComponentVersion [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. Downloading: http://repo1.maven.org/maven2/org/xwiki/platform/xwiki-core- component/1.7.1/xwiki-core-component-1.7.1.pom Downloading: http://repo1.maven.org/maven2/org/xwiki/platform/xwiki-core- component/1.7.1/xwiki-core-component-1.7.1.jar [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact.
Missing: ---------- 1) org.xwiki.platform:xwiki-core-component:jar:1.7.1
Please note that before building components, you must read and follow the requirements specified at http://dev.xwiki.org/xwiki/bin/view/Community/Building and especially http://dev.xwiki.org/xwiki/bin/view/Community/Building#HInstallingMaven (note the recommended maven version and the required settings.xml). From the build log, I see that your maven instance does not know about the XWiki repositories, so it is "normal" that it doesn't find any xwiki modules.
==> With 1.8-milestone-2 and 1.7-SNAPSHOT :
Missing: ---------- 1) org.xwiki.platform:xwiki-core-component:jar:1.8-milestone-2
Missing: ---------- 1) org.xwiki.platform:xwiki-core-component:jar:1.7-SNAPSHOT
==> In Guest Star a special case with 1.8-SNAPSHOT :
[ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error building POM (may not be this project's POM).
-- Sergiu Dumitriu http://purl.org/net/sergiu/
Jerome Velociter wrote:
Hi Hervé
Hervé Agnoux wrote:
Hi,
I experiment http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents
I'm at "The component explained".
I try "mvn install" (which is not in the tutorial, I'm crazy).
I get that :
Missing: ---------- 1) org.xwiki.platform:xwiki-core-component:jar:1.5-SNAPSHOT
Try downloading the file manually from the project website.
... and etc.
Here is pom.xml with the snapshot :
<properties> <!-- TODO: remove this if you inherit a project that has the core version set --> <platform.core.version>1.5-SNAPSHOT</platform.core.version> </properties> <dependencies> <dependency> <groupId>org.xwiki.platform</groupId> <artifactId>xwiki-core-component</artifactId> <version>${platform.core.version}</version> </dependency> <dependency> <groupId>junit</groupId>
As I understand things, I don't inherit a project, so I suppose it's the automatic settings of platform.core.version which is false.
Right, 1.5-SNAPSHOT was the latest snapshot version at the moment the tutorial has been written.
I updated the tutorial to use the latest snapshot (1.8-SNAPSHOT) so that everything works fine. Thanks for signaling the outdated information. Happy coding, Anca Luca
AFAIK our policy is to keep snapshot versions on the maven repository for trunk + the latest branch, being currently 1.7 and 1.8 for the platform (would be too disk-hungry to keep them all). So 1.5-SNAPSHOT is definitely not available any longer. You can depend on more recent snapshots, like 1.7-SNAPSHOT or 1.8-SNAPSHOT. You can always check what snapshots are available visiting http://maven.xwiki.org
The alternative is you depend on a released version. That's probably a better practice for components developed out of the XWiki project, since you can rely on the fact the artifacts behavior are not going to change without you noticing :) Recent released versions are 1.7.1 (stable branch) and 1.8-milestone-2 (bleeding edge).
Note that your dependency is xwiki-core-component is needed only if your code uses classes from the component manager (typically, if you have a Composable component that lookup other components against the component manager). If you don't do that, you can remove this dependency.
Hope this helps, Have fun! Jerome.
What is the good one ?
Thanks.
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (4)
-
Anca Paula Luca -
Hervé Agnoux -
Jerome Velociter -
Sergiu Dumitriu