blob: 2ad1ef7bdbebf47a7ad23d1a97584589d011d5a9 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?><!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--><document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/XDOC/2.0" xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd"><properties><title>Cocoon Main Site - How to mount the Cocoon 2.2 projects in Eclipse</title><author email="cocoon-docs@apache.org">Apache Cocoon Documentation Team</author></properties><body>
<div id="contentBody"><div id="bodyText"><h1 class="docTitle">How to mount the Cocoon 2.2 projects in Eclipse</h1><p>After following the <a href="798_1_1.html">Working with Cocoon 2.2 from
trunk</a> page you can mount the projects in Eclipse.</p><p>From the directory where you installed Cocoon trunk, we refer to it as
/trunk, run</p><pre>mvn eclipse:clean
</pre><p>first to remove any left over eclipse files. Then run</p><pre>mvn -P allblocks eclipse:eclipse</pre><p>This creates <tt>classpath</tt> and <tt>.project</tt> files for each module.
</p><p>Next start Eclipse and make sure you haven't got trunk mounted as a project
already. Also remove <tt>.classpath</tt> and <tt>.project</tt> files possibly
remaining in <tt>/trunk</tt> from a previous project mount. Do
<em>File-Import-&gt;Existing</em> projects into workspace, then point to your
<tt>/trunk</tt> directory and it should detect the newly created blocks as
projects.</p><div class="note"><div><strong>Note: </strong>Note that you need to declare the M2_REPO classpath variable in
your workspace, it should point to your local m2 repository. The Maven eclipse
plugin offers a goal for this purpose: <tt>mvn eclipse:add-maven-repo
-Dworkspace=[path-to-your-local-maven-repo]</tt></div></div><p>You can also get Eclipse to download the sources of dependent libraries and
attach them to the jars in Eclipse :</p><pre>$ mvn -DdownloadSources=true eclipse:eclipse</pre><p>For further information about the Maven Eclipse plugin visit
<a href="http://maven.apache.org/plugins/maven-eclipse-plugin/">http://maven.apache.org/plugins/maven-eclipse-plugin/</a>.
</p></div></div>
</body></document>