Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: apt-maven-plugin-1.0-alpha-4
-
Fix Version/s: apt-maven-plugin-1.0-alpha-5
-
Component/s: apt
-
Labels:None
-
Environment:HideApache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.6.0_22
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x" version: "10.5.8" arch: "x86_64" Family: "mac"ShowApache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200) Java version: 1.6.0_22 Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Default locale: en_US, platform encoding: MacRoman OS name: "mac os x" version: "10.5.8" arch: "x86_64" Family: "mac"
-
Complexity:Intermediate
-
Patch Submitted:Yes
-
Number of attachments :
Description
Invoking mvn apt:eclipse creates a .factorypath file with entries that contain trailing whitespaces:
<factorypath>
<factorypathentry kind="EXTJAR" id="/Users/tfnico/projects/apt-maven-plugin-testing/target/classes " enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar " enabled="true" runInBatchMode="false"/>
</factorypath>
Easy to recreate: mvn archetype:generate a new simple project with default values. Edit the pom.xml, make junit compile scope, paste in the apt-maven-plugin config, run mvn apt:eclipse.
Recreated this in trunk of the plugin (r13275). The problem is caused by a tiny typo in the EclipseMojo. Attached a patch that resolves it, at least on my system.
Oh, and by the way, maybe this should be another bug-report, but I'll just paste it in here:
apt:eclipse generates a path for "Generated source directory" with a leading slash that Eclipse won't grok. For example:
.. produces this configuration directory:
..resulting in that Eclipse won't do annotation processing.
I quickfixed it by just substringing away the slash in the EclipseMojo.java, but maybe you've got some ideas for a better solution..