Submitted By: Gilles Dodinet git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@433315 13f79535-47bb-0310-9956-ffa450edef68
98 lines
3.8 KiB
XML
98 lines
3.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
/*
|
|
* Copyright 2001-2004 The Apache Software Foundation.
|
|
*
|
|
* Licensed 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.
|
|
*/
|
|
-->
|
|
|
|
<faqs title="Frequently Asked Questions">
|
|
|
|
<part id="general">
|
|
<title>General</title>
|
|
|
|
<faq id="junit">
|
|
<question>
|
|
I can't seem to get JUnit to show up in the classpath. What gives?
|
|
</question>
|
|
<answer>
|
|
<p>
|
|
You must have some unit tests for your project, otherwise JUnit
|
|
is ignored.
|
|
</p>
|
|
</answer>
|
|
</faq>
|
|
|
|
</part>
|
|
|
|
<part id="project-organization">
|
|
<faq id="eclipse-multiproject">
|
|
<question>
|
|
Eclipse doesn't support hierarchical project structure. How am i supposed to organize my multiproject ?
|
|
</question>
|
|
<answer>
|
|
<p>
|
|
If you use Eclipse, you may already have encountered the Infamous Layout Issue:
|
|
Eclipse doesn't handle (yet ?) overlapping projects. Thus if you work in a
|
|
multiproject context with a classical non flat layout, Eclipse integration becomes
|
|
quite problematic. You surely don't want to use one big Eclipse project because
|
|
you'll then lose visibility on dependencies (inter-project dependencies as well
|
|
as library dependencies) and this will quickly become quite hard to manage - and
|
|
promotes cycles.
|
|
</p>
|
|
<p>
|
|
Best solution found so far is to refactor your project structure to rather
|
|
use a flat layout, as described below:
|
|
<source>
|
|
<pre>
|
|
/project-root | /project-root
|
|
+- subproject1 | +- project.xml
|
|
+- project.xml ===> /subproject1
|
|
+- subproject2 | +- project.xml
|
|
+- project.xml | /subproject2
|
|
+- project.xml | +- project.xml
|
|
|
|
</pre>
|
|
</source>
|
|
</p>
|
|
<p>
|
|
And alter your properties in a similar way than the example below:
|
|
<source>
|
|
maven.multiproject.basedir=${basedir}/..
|
|
maven.multiproject.includes=*/project.xml
|
|
maven.multiproject.excludes=project-root/project.xml
|
|
</source>
|
|
</p>
|
|
<p>
|
|
If you really can't (or don't want to) flatten your layout, the only solutions that are offered to you are a few tricks, each with its own drawback.
|
|
<ul>
|
|
<li>
|
|
Edit root files outside Eclipse - almost safe but implies switching between tools.
|
|
Note that initial checkout must be done through command line in this case, because
|
|
parent project shouldn't be in the workspace folder.
|
|
</li>
|
|
<li>
|
|
Create a virtual project which contains links to root files - doesn't
|
|
support refactoring well, and implies identical paths on every developer machines.
|
|
</li>
|
|
</ul>
|
|
<i>Use those tricks at your own risk</i>
|
|
</p>
|
|
<p>
|
|
if this issue really annoys you, then please vote for <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=35973">https://bugs.eclipse.org/bugs/show_bug.cgi?id=35973</a>
|
|
</p>
|
|
</answer>
|
|
</faq>
|
|
</part>
|
|
</faqs> |