Re: [xwiki-users] Help using m2eclipse to create an Xwiki java Macro
On Mon, May 31, 2010 at 4:49 AM, Fabio Mancinelli fabio.mancine...@xwiki.com wrote: On 05/29/2010 12:05 AM, James Cuzella wrote: On Fri, May 28, 2010 at 12:46 AM, Vincent Massolvinc...@massol.net wrote: On May 28, 2010, at 1:16 AM, James Cuzella wrote: On Wed, May 26, 2010 at 12:10 AM, Vincent Massolvinc...@massol.net wrote: Hi James, I don't know what the problem is with m2eclipse (I haven't used it to run an archetype) but for the second problem it was because of an invalid dependency. I've fixed it in SVN. For now you can simply edit the generated pom.xml and replace xwiki-core-rendering-parser-wikimodel with xwiki-core-rendering-syntax-wikimodel Thanks for reporting this. -Vincent Thanks, that fixed it! Now have Eclipse working pretty well for coding, however I'm confused how I can debug or run my code within Eclipse for testing. Actually I think you should have a look at http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-tools/trunk/xem-web-debug-eclipse/ It's an Eclipse project that is already configured for hacking XE. Just follow the instruction in the README.txt It's true that you should complement that information with that you found on the Wiki page (e.g., AspectJ configuration, etc.) Anyway I think that you should definitely start from the xem-web-debug-eclipse project. -Fabio Thanks for pointing me towards the README, I'm pretty sure there was no mention of this on the wiki pages I was following. I now set the variables mentioned to point to my checked out xwiki source code. Also, I've tried to follow all the instructions I could find on the wiki (spread out between many pages) multiple times. Sadly, Eclipse just doesn't want to cooperate with me... now it's giving me yet another error :-( The main reason why I hate Eclipse for development is due to the initial project setup and inevitable problems with one's workspace environment that always seem to pop up for me. Is anyone actually developing Xwiki from Windows, or does it require a Linux environment (for symlinks, and a more sane environment)? Anyway, the latest error message seems potentially connected to the file link stuff mentioned in the README file... however, I just don't know where to look anymore as I've gone through the steps multiple times now, checked, and re-checked all my settings. Here's the error: Publishing failed with multiple errors: Resource is out of sync with the file system: '/xem-web-debug/src/main/webapp/redirect'. Resource is out of sync with the file system: '/xem-web-debug/src/main/webapp/WEB-INF/web.xml'. Resource is out of sync with the file system: '/xem-web-debug/src/main/webapp/WEB-INF/struts.tld'. Resource is out of sync with the file system: '/xem-web-debug/src/main/webapp/WEB-INF/struts-template.tld'. Resource is out of sync with the file system: '/xem-web-debug/src/main/webapp/WEB-INF/struts-logic.tld'. Resource is out of sync with the file system: '/xem-web-debug/src/main/webapp/WEB-INF/struts-form.tld'. Resource is out of sync with the file system: '/xem-web-debug/src/main/webapp/WEB-INF/portlet.xml'. Resource is out of sync with the file system: '/xem-web-debug/src/main/webapp/WEB-INF/commons-logging.properties'. The Apache Tomcat server is started by Eclipse, and I can access the admin pages through http://localhost:8080/. It looks like it's not publishing the files correctly. In Eclipse's server window it says Tomcat v6.0 Server at localhost [Debugging, Republish] and stays that way. I can go to Tomcat's List Applications page, and it shows xwiki listed there. However, trying to access http://localhost:8080/xwiki gives a 404 message. Does anyone have a working eclipse workspace for the example macro here? http://platform.xwiki.org/xwiki/bin/view/DevGuide/RenderingMacroTutorial Working with Eclipse can really be a pain sometimes. Thanks, - James Cuzella ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Help using m2eclipse to create an Xwiki java Macro
On 05/29/2010 12:05 AM, James Cuzella wrote: On Fri, May 28, 2010 at 12:46 AM, Vincent Massolvinc...@massol.net wrote: On May 28, 2010, at 1:16 AM, James Cuzella wrote: On Wed, May 26, 2010 at 12:10 AM, Vincent Massolvinc...@massol.net wrote: Hi James, I don't know what the problem is with m2eclipse (I haven't used it to run an archetype) but for the second problem it was because of an invalid dependency. I've fixed it in SVN. For now you can simply edit the generated pom.xml and replace xwiki-core-rendering-parser-wikimodel with xwiki-core-rendering-syntax-wikimodel Thanks for reporting this. -Vincent Thanks, that fixed it! Now have Eclipse working pretty well for coding, however I'm confused how I can debug or run my code within Eclipse for testing. Actually I think you should have a look at http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-tools/trunk/xem-web-debug-eclipse/ It's an Eclipse project that is already configured for hacking XE. Just follow the instruction in the README.txt It's true that you should complement that information with that you found on the Wiki page (e.g., AspectJ configuration, etc.) Anyway I think that you should definitely start from the xem-web-debug-eclipse project. -Fabio ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Help using m2eclipse to create an Xwiki java Macro
On May 28, 2010, at 1:16 AM, James Cuzella wrote: On Wed, May 26, 2010 at 12:10 AM, Vincent Massol vinc...@massol.net wrote: Hi James, I don't know what the problem is with m2eclipse (I haven't used it to run an archetype) but for the second problem it was because of an invalid dependency. I've fixed it in SVN. For now you can simply edit the generated pom.xml and replace xwiki-core-rendering-parser-wikimodel with xwiki-core-rendering-syntax-wikimodel Thanks for reporting this. -Vincent Thanks, that fixed it! Now have Eclipse working pretty well for coding, however I'm confused how I can debug or run my code within Eclipse for testing. See http://dev.xwiki.org/xwiki/bin/view/Community/Debugging There's a tutorial there for debugging in Eclipse. Thanks -Vincent It appears to me that the maven build process is working. When I click on Run or Debug it also looks like it is able to start a Tomcat 6.0 instance on my local machine. However, going to either http://localhost; or http://localhost/xwiki; in my browser results in an unable to connect message. I tried right clicking on the server instance within the Servers tab in Eclipse and choosing Add and Remove and then added the only thing in the list (xem-web-debug ) to the Configured resources side of the dialog. This results in the following error: eclipse.buildId=unknown java.version=1.6.0_20 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -product org.eclipse.epp.package.php.product Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.php.product Error Thu May 27 17:07:44 MDT 2010 Task failed org.eclipse.core.runtime.CoreException: Publishing failed with multiple errors at org.eclipse.jst.server.tomcat.core.internal.PublishOperation2.throwException(PublishOperation2.java:169) at org.eclipse.jst.server.tomcat.core.internal.PublishOperation2.execute(PublishOperation2.java:82) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.performTasks(ServerBehaviourDelegate.java:1136) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:853) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:708) at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:2731) at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:278) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Contains: File not found: /xem-web-debug/src/main/webapp/WEB-INF/commons-logging.properties. Contains: File not found: /xem-web-debug/src/main/webapp/WEB-INF/portlet.xml. Contains: File not found: /xem-web-debug/src/main/webapp/WEB-INF/struts-bean.tld. Contains: File not found: /xem-web-debug/src/main/webapp/WEB-INF/struts-config.xml. Contains: File not found: /xem-web-debug/src/main/webapp/WEB-INF/struts-form.tld. Contains: File not found: /xem-web-debug/src/main/webapp/WEB-INF/struts-html.tld. Contains: File not found: /xem-web-debug/src/main/webapp/WEB-INF/struts-logic.tld. Contains: File not found: /xem-web-debug/src/main/webapp/WEB-INF/struts-template.tld. Contains: File not found: /xem-web-debug/src/main/webapp/WEB-INF/struts.tld. Contains: File not found: /xem-web-debug/src/main/webapp/WEB-INF/web.xml. Contains: File not found: /xem-web-debug/src/main/webapp/redirect. Am I doing this right? Thanks again, - James Cuzella ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Help using m2eclipse to create an Xwiki java Macro
On Fri, May 28, 2010 at 12:46 AM, Vincent Massol vinc...@massol.net wrote: On May 28, 2010, at 1:16 AM, James Cuzella wrote: On Wed, May 26, 2010 at 12:10 AM, Vincent Massol vinc...@massol.net wrote: Hi James, I don't know what the problem is with m2eclipse (I haven't used it to run an archetype) but for the second problem it was because of an invalid dependency. I've fixed it in SVN. For now you can simply edit the generated pom.xml and replace xwiki-core-rendering-parser-wikimodel with xwiki-core-rendering-syntax-wikimodel Thanks for reporting this. -Vincent Thanks, that fixed it! Now have Eclipse working pretty well for coding, however I'm confused how I can debug or run my code within Eclipse for testing. See http://dev.xwiki.org/xwiki/bin/view/Community/Debugging There's a tutorial there for debugging in Eclipse. Thanks -Vincent I had been following this guide, however I must have missed the part about changing the JVM arguments for the tomcat service on windows. I currently am having troubles building Xwiki from source within Eclipse, so I tested whether the debug function works by simply adding the current xwiki-enterprise WAR from the download page. (I basically just created a JAR from the configured instance of Xwiki that I had previously set up for testing). Now, I'm running into yet another maven issue when trying to get it compiled from source: [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com.xpn.xwiki.platform:xwiki-core:jar:2.4-SNAPSHOT [WARNING] The expression ${pom.version} is deprecated. Please use ${project.version} instead. @ com.xpn.xwiki.platform:xwiki-core:2.4-SNAPSHOT, C:\Documents and Settings\jcuzella\My Documents\src\eclipse_workspace\xwiki-all\core\xwiki-core\pom.xml [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] [INFO] Building XWiki Platform - Core - Core 2.4-SNAPSHOT [INFO] [WARNING] Missing POM for velocity-tools:velocity-tools:jar:1.4 [WARNING] Missing POM for org.xwiki.platform:xwiki-core-rendering-macro-id:jar:2.4-SNAPSHOT [INFO] [INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (default) @ xwiki-core --- [INFO] [INFO] --- aspectj-maven-plugin:1.0-beta-2:compile (backward-compatibility-aspects) @ xwiki-core --- [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 2.657s [INFO] Finished at: Fri May 28 16:03:40 MDT 2010 [INFO] Final Memory: 4M/15M [INFO] [ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.0-beta-2:compile (backward-compatibility-aspects) on project xwiki-core: Execution backward-compatibility-aspects of goal org.codehaus.mojo:aspectj-maven-plugin:1.0-beta-2:compile failed: Plugin org.codehaus.mojo:aspectj-maven-plugin:1.0-beta-2 or one of its dependencies could not be resolved: Missing: -- 1) com.sun:tools:jar:1.4.2 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=com.sun -DartifactId=tools -Dversion=1.4.2 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=com.sun -DartifactId=tools -Dversion=1.4.2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) org.codehaus.mojo:aspectj-maven-plugin:maven-plugin:1.0-beta-2 2) com.sun:tools:jar:1.4.2 -- 1 required artifact is missing. for artifact: org.codehaus.mojo:aspectj-maven-plugin:maven-plugin:1.0-beta-2 from the specified remote repositories: xwiki-plugins-externals (http://maven.xwiki.org/externals, releases=true, snapshots=true), xwiki-plugins-releases (http://maven.xwiki.org/releases, releases=true, snapshots=false), xwiki-plugins-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/PluginResolutionException ___ users mailing list
Re: [xwiki-users] Help using m2eclipse to create an Xwiki java Macro
On Wed, May 26, 2010 at 12:10 AM, Vincent Massol vinc...@massol.net wrote: Hi James, I don't know what the problem is with m2eclipse (I haven't used it to run an archetype) but for the second problem it was because of an invalid dependency. I've fixed it in SVN. For now you can simply edit the generated pom.xml and replace xwiki-core-rendering-parser-wikimodel with xwiki-core-rendering-syntax-wikimodel Thanks for reporting this. -Vincent Thanks, that fixed it! Now have Eclipse working pretty well for coding, however I'm confused how I can debug or run my code within Eclipse for testing. It appears to me that the maven build process is working. When I click on Run or Debug it also looks like it is able to start a Tomcat 6.0 instance on my local machine. However, going to either http://localhost; or http://localhost/xwiki; in my browser results in an unable to connect message. I tried right clicking on the server instance within the Servers tab in Eclipse and choosing Add and Remove and then added the only thing in the list (xem-web-debug ) to the Configured resources side of the dialog. This results in the following error: eclipse.buildId=unknown java.version=1.6.0_20 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -product org.eclipse.epp.package.php.product Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.php.product Error Thu May 27 17:07:44 MDT 2010 Task failed org.eclipse.core.runtime.CoreException: Publishing failed with multiple errors at org.eclipse.jst.server.tomcat.core.internal.PublishOperation2.throwException(PublishOperation2.java:169) at org.eclipse.jst.server.tomcat.core.internal.PublishOperation2.execute(PublishOperation2.java:82) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.performTasks(ServerBehaviourDelegate.java:1136) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:853) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:708) at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:2731) at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:278) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Contains: File not found: /xem-web-debug/src/main/webapp/WEB-INF/commons-logging.properties. Contains: File not found: /xem-web-debug/src/main/webapp/WEB-INF/portlet.xml. Contains: File not found: /xem-web-debug/src/main/webapp/WEB-INF/struts-bean.tld. Contains: File not found: /xem-web-debug/src/main/webapp/WEB-INF/struts-config.xml. Contains: File not found: /xem-web-debug/src/main/webapp/WEB-INF/struts-form.tld. Contains: File not found: /xem-web-debug/src/main/webapp/WEB-INF/struts-html.tld. Contains: File not found: /xem-web-debug/src/main/webapp/WEB-INF/struts-logic.tld. Contains: File not found: /xem-web-debug/src/main/webapp/WEB-INF/struts-template.tld. Contains: File not found: /xem-web-debug/src/main/webapp/WEB-INF/struts.tld. Contains: File not found: /xem-web-debug/src/main/webapp/WEB-INF/web.xml. Contains: File not found: /xem-web-debug/src/main/webapp/redirect. Am I doing this right? Thanks again, - James Cuzella ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Help using m2eclipse to create an Xwiki java Macro
Hi James, I don't know what the problem is with m2eclipse (I haven't used it to run an archetype) but for the second problem it was because of an invalid dependency. I've fixed it in SVN. For now you can simply edit the generated pom.xml and replace xwiki-core-rendering-parser-wikimodel with xwiki-core-rendering-syntax-wikimodel Thanks for reporting this. -Vincent On May 26, 2010, at 2:43 AM, James Cuzella wrote: I'm hoping to create a simple Xwiki macro to allow users an easy way to create local file:// links to internal network shares through the WYSIWYG macros feature. This is also an excuse for me to try to get m2eclipse to work for building Xwiki as well. However, so far the plugin doesn't seem to be working right. I'm generally following the guide here: http://platform.xwiki.org/xwiki/bin/view/DevGuide/RenderingMacroTutorial#HCreatingaMacrousingMaven I first attempted at using Eclipse's m2eclipse plugin to create a new maven project, but had some troubles with this. I first added a maven archetypes catalog through the Window-Preferences-Maven-Archetypes menu. I added a remote catalog using the url http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-tools/trunk/xwiki-archetype-macro/;. Then, by going through the new maven project wizard, I checked the include snapshot archetypes box and the xwiki-archetype-macro shows up. I then fill out the input boxes, for example something like: Group ID: com.lyraphase Artifact ID: localFileLinkMacro Version: 0.0.1-SNAPSHOT Package: com.lyraphase I click finish and it simply says Failed to create project. The event details for the error in the log are: eclipse.buildId=unknown java.version=1.6.0_20 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -product org.eclipse.epp.package.php.product Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.php.product Error Tue May 25 18:28:55 MDT 2010 Failed to create project. java.lang.NullPointerException at org.apache.maven.artifact.repository.DefaultArtifactRepositoryFactory.createArtifactRepository(DefaultArtifactRepositoryFactory.java:90) at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.resolveArchetype(ProjectConfigurationManager.java:540) at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.createArchetypeProject(ProjectConfigurationManager.java:463) at org.maven.ide.eclipse.wizards.MavenProjectWizard$5.runInWorkspace(MavenProjectWizard.java:279) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) I then gave up on that, and just made a new directory and ran the maven command line mentioned in the Macro Tutorial through Cygwin. I entered the Group ID, etc... The command seemed to work, however again m2eclipse chokes on missing maven dependencies after doing a Import - Existing Maven Project. The console log in Eclipse also shows *tons* of warnings about checksums failing and some missing pom files. For example: 5/25/10 6:02:18 PM MDT: [WARN] *** CHECKSUM FAILED - Checksum failed on download: local = 'f4993fe96db30ae57ca4d71e34ebe200b63981b6'; remote = 'eaf4f3d8c6ee17e73ca671a496a4b307f83aed63' - IGNORING 5/25/10 6:02:19 PM MDT: [WARN] *** CHECKSUM FAILED - Checksum failed on download: local = 'aaeb993ef6348a2e5102df06b408d8bb220d609e'; remote = '79231f9f429a3ba10c5d260b4e683fe7599498d0' - IGNORING Most of that stuff is uninteresting, but I snipped out some of the more interesting messages I found within the mess. 5/25/10 5:46:08 PM MDT: Unable to update index for xwiki-externals|http://maven.xwiki.org/externals: Resource nexus-maven-repository-index.properties does not exist 5/25/10 5:52:57 PM MDT: Missing artifact org.xwiki.platform:xwiki-core-rendering-parser-wikimodel:jar:2.3-SNAPSHOT:compile 5/25/10 5:46:10 PM MDT: Unable to update index for xwiki-plugins-externals|http://maven.xwiki.org/externals: Resource nexus-maven-repository-index.properties does not exist 5/25/10 5:52:57 PM MDT: Missing artifact org.xwiki.platform:xwiki-core-rendering-parser-wikimodel:jar:2.3-SNAPSHOT:compile 5/25/10 6:02:19 PM MDT: Missing artifact org.xwiki.platform:xwiki-core-rendering-parser-wikimodel:jar:2.3-SNAPSHOT:compile 5/25/10 6:02:24 PM MDT: Maven Builder: FULL_BUILD 5/25/10 6:02:24 PM MDT: Build errors for localFileLinkMacro; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project localFileLinkMacro: Missing: -- 1) org.xwiki.platform:xwiki-core-rendering-parser-wikimodel:jar:2.3-SNAPSHOT Try downloading the file manually from the project website.
Re: [xwiki-users] Help using m2eclipse to create an Xwiki java Macro
I could not say what was the issue with M2Eclipse because i never use archetypes (when i need to do a new macro i generally copy/paste an existing one) but it's possible it just because it was unable to properly parse the pom.xml because of the dependency issue. For example M2Eclipse is generally unable to finish importing a project when there is an issue in the pom.xml file. On Wed, May 26, 2010 at 08:10, Vincent Massol vinc...@massol.net wrote: Hi James, I don't know what the problem is with m2eclipse (I haven't used it to run an archetype) but for the second problem it was because of an invalid dependency. I've fixed it in SVN. For now you can simply edit the generated pom.xml and replace xwiki-core-rendering-parser-wikimodel with xwiki-core-rendering-syntax-wikimodel Thanks for reporting this. -Vincent On May 26, 2010, at 2:43 AM, James Cuzella wrote: I'm hoping to create a simple Xwiki macro to allow users an easy way to create local file:// links to internal network shares through the WYSIWYG macros feature. This is also an excuse for me to try to get m2eclipse to work for building Xwiki as well. However, so far the plugin doesn't seem to be working right. I'm generally following the guide here: http://platform.xwiki.org/xwiki/bin/view/DevGuide/RenderingMacroTutorial#HCreatingaMacrousingMaven I first attempted at using Eclipse's m2eclipse plugin to create a new maven project, but had some troubles with this. I first added a maven archetypes catalog through the Window-Preferences-Maven-Archetypes menu. I added a remote catalog using the url http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-tools/trunk/xwiki-archetype-macro/;. Then, by going through the new maven project wizard, I checked the include snapshot archetypes box and the xwiki-archetype-macro shows up. I then fill out the input boxes, for example something like: Group ID: com.lyraphase Artifact ID: localFileLinkMacro Version: 0.0.1-SNAPSHOT Package: com.lyraphase I click finish and it simply says Failed to create project. The event details for the error in the log are: eclipse.buildId=unknown java.version=1.6.0_20 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -product org.eclipse.epp.package.php.product Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.php.product Error Tue May 25 18:28:55 MDT 2010 Failed to create project. java.lang.NullPointerException at org.apache.maven.artifact.repository.DefaultArtifactRepositoryFactory.createArtifactRepository(DefaultArtifactRepositoryFactory.java:90) at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.resolveArchetype(ProjectConfigurationManager.java:540) at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.createArchetypeProject(ProjectConfigurationManager.java:463) at org.maven.ide.eclipse.wizards.MavenProjectWizard$5.runInWorkspace(MavenProjectWizard.java:279) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) I then gave up on that, and just made a new directory and ran the maven command line mentioned in the Macro Tutorial through Cygwin. I entered the Group ID, etc... The command seemed to work, however again m2eclipse chokes on missing maven dependencies after doing a Import - Existing Maven Project. The console log in Eclipse also shows *tons* of warnings about checksums failing and some missing pom files. For example: 5/25/10 6:02:18 PM MDT: [WARN] *** CHECKSUM FAILED - Checksum failed on download: local = 'f4993fe96db30ae57ca4d71e34ebe200b63981b6'; remote = 'eaf4f3d8c6ee17e73ca671a496a4b307f83aed63' - IGNORING 5/25/10 6:02:19 PM MDT: [WARN] *** CHECKSUM FAILED - Checksum failed on download: local = 'aaeb993ef6348a2e5102df06b408d8bb220d609e'; remote = '79231f9f429a3ba10c5d260b4e683fe7599498d0' - IGNORING Most of that stuff is uninteresting, but I snipped out some of the more interesting messages I found within the mess. 5/25/10 5:46:08 PM MDT: Unable to update index for xwiki-externals|http://maven.xwiki.org/externals: Resource nexus-maven-repository-index.properties does not exist 5/25/10 5:52:57 PM MDT: Missing artifact org.xwiki.platform:xwiki-core-rendering-parser-wikimodel:jar:2.3-SNAPSHOT:compile 5/25/10 5:46:10 PM MDT: Unable to update index for xwiki-plugins-externals|http://maven.xwiki.org/externals: Resource nexus-maven-repository-index.properties does not exist 5/25/10 5:52:57 PM MDT: Missing artifact org.xwiki.platform:xwiki-core-rendering-parser-wikimodel:jar:2.3-SNAPSHOT:compile 5/25/10 6:02:19 PM MDT: Missing artifact
[xwiki-users] Help using m2eclipse to create an Xwiki java Macro
I'm hoping to create a simple Xwiki macro to allow users an easy way to create local file:// links to internal network shares through the WYSIWYG macros feature. This is also an excuse for me to try to get m2eclipse to work for building Xwiki as well. However, so far the plugin doesn't seem to be working right. I'm generally following the guide here: http://platform.xwiki.org/xwiki/bin/view/DevGuide/RenderingMacroTutorial#HCreatingaMacrousingMaven I first attempted at using Eclipse's m2eclipse plugin to create a new maven project, but had some troubles with this. I first added a maven archetypes catalog through the Window-Preferences-Maven-Archetypes menu. I added a remote catalog using the url http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-tools/trunk/xwiki-archetype-macro/;. Then, by going through the new maven project wizard, I checked the include snapshot archetypes box and the xwiki-archetype-macro shows up. I then fill out the input boxes, for example something like: Group ID: com.lyraphase Artifact ID: localFileLinkMacro Version: 0.0.1-SNAPSHOT Package: com.lyraphase I click finish and it simply says Failed to create project. The event details for the error in the log are: eclipse.buildId=unknown java.version=1.6.0_20 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -product org.eclipse.epp.package.php.product Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.php.product Error Tue May 25 18:28:55 MDT 2010 Failed to create project. java.lang.NullPointerException at org.apache.maven.artifact.repository.DefaultArtifactRepositoryFactory.createArtifactRepository(DefaultArtifactRepositoryFactory.java:90) at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.resolveArchetype(ProjectConfigurationManager.java:540) at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.createArchetypeProject(ProjectConfigurationManager.java:463) at org.maven.ide.eclipse.wizards.MavenProjectWizard$5.runInWorkspace(MavenProjectWizard.java:279) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) I then gave up on that, and just made a new directory and ran the maven command line mentioned in the Macro Tutorial through Cygwin. I entered the Group ID, etc... The command seemed to work, however again m2eclipse chokes on missing maven dependencies after doing a Import - Existing Maven Project. The console log in Eclipse also shows *tons* of warnings about checksums failing and some missing pom files. For example: 5/25/10 6:02:18 PM MDT: [WARN] *** CHECKSUM FAILED - Checksum failed on download: local = 'f4993fe96db30ae57ca4d71e34ebe200b63981b6'; remote = 'eaf4f3d8c6ee17e73ca671a496a4b307f83aed63' - IGNORING 5/25/10 6:02:19 PM MDT: [WARN] *** CHECKSUM FAILED - Checksum failed on download: local = 'aaeb993ef6348a2e5102df06b408d8bb220d609e'; remote = '79231f9f429a3ba10c5d260b4e683fe7599498d0' - IGNORING Most of that stuff is uninteresting, but I snipped out some of the more interesting messages I found within the mess. 5/25/10 5:46:08 PM MDT: Unable to update index for xwiki-externals|http://maven.xwiki.org/externals: Resource nexus-maven-repository-index.properties does not exist 5/25/10 5:52:57 PM MDT: Missing artifact org.xwiki.platform:xwiki-core-rendering-parser-wikimodel:jar:2.3-SNAPSHOT:compile 5/25/10 5:46:10 PM MDT: Unable to update index for xwiki-plugins-externals|http://maven.xwiki.org/externals: Resource nexus-maven-repository-index.properties does not exist 5/25/10 5:52:57 PM MDT: Missing artifact org.xwiki.platform:xwiki-core-rendering-parser-wikimodel:jar:2.3-SNAPSHOT:compile 5/25/10 6:02:19 PM MDT: Missing artifact org.xwiki.platform:xwiki-core-rendering-parser-wikimodel:jar:2.3-SNAPSHOT:compile 5/25/10 6:02:24 PM MDT: Maven Builder: FULL_BUILD 5/25/10 6:02:24 PM MDT: Build errors for localFileLinkMacro; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project localFileLinkMacro: Missing: -- 1) org.xwiki.platform:xwiki-core-rendering-parser-wikimodel: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-core-rendering-parser-wikimodel -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-rendering-parser-wikimodel -Dversion=2.3-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] Path to