Did you added the xwiki setting to
.m2/setting.xml you can find at
http://dev.xwiki.org/xwiki/bin/view/Community/
Building#HInstallingMaven
Yes. Just to make sure that nothing changed in the meantime (since I
first
added the xwiki profile) I re-added it from that page. Problem
persists.
mvn -version
Maven version: 2.0.9
Java version: 1.5.0_16
OS name: "mac os x" version: "10.5.5" arch: "i386" Family:
"unix"
On Thu, Dec 4, 2008 at 11:37 AM, Juergen Lorenz
Simon <simon(a)webtecc.com
> wrote:
> Hello Thomas,
>
> thanks for the help. I tried to do as you suggested and got as
> far as
> setting the project up
> and downloading all the dependencies. However, once that is done, I
> get the following error:
>
> mvn package
>
> [INFO] Scanning for projects...
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error building POM (may not be this project's POM).
>
> Project ID: com.kontrast.vodafone:portal-wiki
>
> Reason: Parent: null:xwiki-enterprise-web:war:null of project:
> com.kontrast.vodafone:portal-wiki has wrong packaging: war. Must be
> 'pom'. for project com.kontrast.vodafone:portal-wiki
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.reactor.MavenExecutionException: Parent:
> null:xwiki-
> enterprise-web:war:null of project: com.kontrast.vodafone:portal-
> wiki
> has wrong packaging: war. Must be 'pom'. for project
> com.kontrast.vodafone:portal-wiki
> at
> org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
> 292)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:
> 129)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
> 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.project.ProjectBuildingException:
> Parent:
> null:xwiki-enterprise-web:war:null of project:
> com.kontrast.vodafone:portal-wiki has wrong packaging: war. Must be
> 'pom'. for project com.kontrast.vodafone:portal-wiki
> at
> org
> .apache
> .maven
> .project
> .DefaultMavenProjectBuilder
> .assembleLineage(DefaultMavenProjectBuilder.java:1377)
> at
> org
> .apache
> .maven
> .project
> .DefaultMavenProjectBuilder
> .buildInternal(DefaultMavenProjectBuilder.java:821)
> at
> org
> .apache
> .maven
> .project
> .DefaultMavenProjectBuilder
> .buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:506)
> at
> org
> .apache
> .maven
> .project
> .DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:
> 198)
> at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:
> 583)
> at
> org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:
> 461)
> at
> org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
> ... 11 more
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: < 1 second
> [INFO] Finished at: Thu Dec 04 11:36:29 CET 2008
> [INFO] Final Memory: 1M/2M
> [INFO]
> ------------------------------------------------------------------------
>
>
> On 04.12.2008, at 10:12, Thomas Mortagne wrote:
>
>> Hi,
>>
>> If you folowed the tuto at
>>
http://dev.xwiki.org/xwiki/bin/view/Community/DebugXEWithEclipse
>> xe-web-dev is composed by Eclipse linked folders and maven or
>> m2eclipse does not support it when building so a mvn install or
>> any
>> other building command will not see any of the folders which are
>> not
>> really in this project.
>>
>> The easier way to package a new clean war project based on XE is
>> to
>> create a maven war project with XE as parent and having your
>> plugin as
>> dependency.
>>
>> Something like:
>>
>> <project
xmlns="http://maven.apache.org/POM/4.0.0"
>>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>>
http://maven.apache.org/maven-v4_0_0.xsd">
>> <modelVersion>4.0.0</modelVersion>
>> <parent>
>> <groupId>com.xpn.xwiki.products</groupId>
>> <artifactId>xwiki-enterprise-web</artifactId>
>> <version>1.7-SNAPSHOT</version>
>> </parent>
>> <artifactId>xwiki-myenterprise-web</artifactId>
>> <name>XWiki Products - My Enterprise - Web</name>
>> <packaging>war</packaging>
>> <description>XWiki Products - My Enterprise - Web</description>
>> <dependencies>
>> <dependency>
>> <groupId>com.xpn.xwiki.platform.plugins</groupId>
>> <artifactId>xwiki-plugin-myplugin</artifactId>
>> <version>1.0</version>
>> </dependency>
>> </dependencies>
>> </project>
>>
>> On Thu, Dec 4, 2008 at 2:21 AM, Juergen Lorenz Simon <simon(a)webtecc.com
>>> wrote:
>>> Hi,
>>>
>>> I've created an XWiki plugin, which uses a whole lot of
>>> frameworks
>>> to
>>> do it's job, including
>>> WebObjects, ProjectWonder and some of our own frameworks. It's
>>> running
>>> fine in Eclipse.
>>> When I package the resulting webapp from the workspace's server
>>> area
>>> (.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/
>>> xe-
>>> debug-web)
>>> into a war file, I can deploy the result in a webserver.
>>>
>>> Now I would like to be able to package the xe-debug-web from the
>>> command line
>>> or Eclipse into a .war. However: When I invoke mvn clean package
>>> (or
>>> any other
>>> mvn command for that matter) inside the xe-debug-web project
>>> directory, i get the
>>> following error message:
>>>
>>> mvn package :
>>>
>>> [INFO] Scanning for projects...
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [ERROR] FATAL ERROR
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Error building POM (may not be this project's POM).
>>>
>>>
>>> Project ID: xe-debug-web:xe-debug-web
>>>
>>> Reason: Parent: null:xwiki-web-standard:war:null of project: xe-
>>> debug-
>>> web:xe-debug-web has wrong packaging: war. Must be 'pom'. for
>>> project
>>> xe-debug-web:xe-debug-web
>>>
>>>
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Trace
>>> org.apache.maven.reactor.MavenExecutionException: Parent:
>>> null:xwiki-
>>> web-standard:war:null of project: xe-debug-web:xe-debug-web has
>>> wrong
>>> packaging: war. Must be 'pom'. for project xe-debug-web:xe-debug-
>>> web
>>> at
>>> org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
>>> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
>>> 292)
>>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:
>>> 129)
>>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
>>> 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.project.ProjectBuildingException:
>>> Parent:
>>> null:xwiki-web-standard:war:null of project: xe-debug-web:xe-
>>> debug-
>>> web
>>> has wrong packaging: war. Must be 'pom'. for project xe-debug-
>>> web:xe-
>>> debug-web
>>> at
>>> org
>>> .apache
>>> .maven
>>> .project
>>> .DefaultMavenProjectBuilder
>>> .assembleLineage(DefaultMavenProjectBuilder.java:1377)
>>> at
>>> org
>>> .apache
>>> .maven
>>> .project
>>> .DefaultMavenProjectBuilder
>>> .buildInternal(DefaultMavenProjectBuilder.java:821)
>>> at
>>> org
>>> .apache
>>> .maven
>>> .project
>>> .DefaultMavenProjectBuilder
>>> .buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:506)
>>> at
>>> org
>>> .apache
>>> .maven
>>> .project
>>> .DefaultMavenProjectBuilder
>>> .build(DefaultMavenProjectBuilder.java:
>>> 198)
>>> at
>>> org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:
>>> 583)
>>> at
>>> org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:
>>> 461)
>>> at
>>> org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
>>> ... 11 more
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Total time: < 1 second
>>> [INFO] Finished at: Wed Dec 03 18:41:14 CET 2008
>>> [INFO] Final Memory: 1M/2M
>>> [INFO]
>>> ------------------------------------------------------------------------
>>>
>>> I don't know what to do about this message. So my thought was to
>>> create a Maven goal
>>> in Eclipse from the run configurations. However, the 'war' goal
>>> seems
>>> to be quite fussy
>>> about the layout, and the xe-debug-web project layout does not to
>>> be
>>> satisfactory:
>>>
>>> ...
>>> [INFO] [war:war]
>>> [INFO] Packaging webapp
>>> [INFO] Assembling webapp[xe-debug-web] in [/Users/simon/Projects/
>>> Kontrast/MavenWorkspace/xe-debug-web/target/xe-debug-web-1.6.1]
>>> [INFO] Processing war project
>>> [INFO] Copy webapp webResources[/Users/simon/Projects/Kontrast/
>>> MavenWorkspace/xe-debug-web/target/maven-shared-archive-
>>> resources]
>>> to[/
>>> Users/simon/Projects/Kontrast/MavenWorkspace/xe-debug-web/target/
>>> xe-
>>> debug-web-1.6.1]
>>> [INFO] Copy webapp webResources[/Users/simon/Projects/Kontrast/
>>> MavenWorkspace/xe-debug-web/target/maven-shared-archive-
>>> resources/
>>> META-
>>> INF] to[/Users/simon/Projects/Kontrast/MavenWorkspace/xe-debug-
>>> web/
>>> target/xe-debug-web-1.6.1]
>>> [INFO] Copy webapp webResources[/Users/simon/Projects/Kontrast/
>>> MavenWorkspace/xe-debug-web/src/main/webInfResources] to[/Users/
>>> simon/
>>> Projects/Kontrast/MavenWorkspace/xe-debug-web/target/xe-debug-
>>> web-1.6.1]
>>> Exception in thread "main" java.lang.IllegalStateException:
>>> basedir /
>>> Users/simon/Projects/Kontrast/MavenWorkspace/xe-debug-web/src/
>>> main/
>>> webInfResources does not exist
>>> at
>>> org
>>> .codehaus
>>> .plexus.util.DirectoryScanner.scan(DirectoryScanner.java:
>>> 550)
>>> ...
>>>
>>> Since both approaches failed, I need some advice on how to
>>> package
>>> the
>>> xe-debug-web into
>>> a proper WAR file again.
>>>
>>> All pointers much appreciated,
>>> J.L.Simon
>>>
>>> _______________________________________________
>>> devs mailing list
>>> devs(a)xwiki.org
>>>
http://lists.xwiki.org/mailman/listinfo/devs
>>>
>>
>>
>>
>> --
>> Thomas Mortagne
>> _______________________________________________
>> devs mailing list
>> devs(a)xwiki.org
>>
http://lists.xwiki.org/mailman/listinfo/devs
>>
>
> _______________________________________________
> devs mailing list
> devs(a)xwiki.org
>
http://lists.xwiki.org/mailman/listinfo/devs
>
--
Thomas Mortagne
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org