Home » Archived » Sapphire » Code Generation(Annotation Compiler)
Code Generation [message #715321] |
Sat, 13 August 2011 06:44  |
Eclipse User |
|
|
|
Hi,
I am having peculiar issue with Sapphire generating my model classes, i have enable the annotation processing for my Project and when I build the project i don't see any classes generated from my model , not sure what is the cause because there is no error trace too.
I putting down the snippet of my MANIFEST.MF
....
org.eclipse.core.commands;visibility:=reexport,
org.eclipse.emf.codegen;bundle-version="2.5.0",
org.eclipse.emf.ecore;bundle-version="2.5.0",
org.eclipse.jdt.core,
org.eclipse.jem.util;bundle-version="2.0.201",
org.eclipse.jem.workbench;bundle-version="2.0.201",
org.eclipse.jface.text,
org.eclipse.jst.j2ee;bundle-version="[1.1.301,2.0.0)",
org.eclipse.jst.j2ee.core;bundle-version="[1.1.301,2.0.0)";visibility:=reexport,
org.eclipse.jst.j2ee.web;bundle-version="[1.1.301,2.0.0)";visibility:=reexport,
org.eclipse.wst.common.frameworks;bundle-version="[1.1.300,2.0.0)",
org.eclipse.wst.common.project.facet.core;bundle-version="[1.4.1,2.0.0)",
org.eclipse.wst.server.core;bundle-version="[1.1.102,2.0.0)",
org.eclipse.wst.sse.core;bundle-version="[1.1.402,2.0.0)";visibility:=reexport,
org.eclipse.wst.xml.core;bundle-version="[1.1.402,2.0.0)";visibility:=reexport,
org.apache.commons.logging,
org.eclipse.wst.validation;bundle-version="[1.2.104,1.3.0)",
org.eclipse.sapphire.java;bundle-version="0.3.1",
org.eclipse.sapphire.java.jdt;bundle-version="0.3.1",
org.eclipse.sapphire.modeling;bundle-version="0.3.1",
org.eclipse.sapphire.modeling.xml;bundle-version="0.3.1",
org.eclipse.sapphire.osgi;bundle-version="0.3.1",
org.eclipse.sapphire.platform;bundle-version="0.3.1",
org.eclipse.sapphire.workspace;bundle-version="0.3.1"
....
Not sure if some other plugin is causing/preventing the code generation of Sapphire.
It works if I have only the sapphire model classes in a separate plugin.
Is there anyway to over come the issue, something like using Tycho/Ant to generate the classes at run-time/compile-time ?
[Updated on: Sun, 14 August 2011 04:37] by Moderator
|
|
| |
Re: Code Generation [message #715761 is a reply to message #715376] |
Mon, 15 August 2011 08:29   |
Eclipse User |
|
|
|
I was able to solve this issue ! I guess there is some issue with the Eclipse Annotation Processing (thinking ?????)
I tried to fork the Ant build with maven as mentioned above and that also failed due to some wired errors with respect to the Annotation processing, so thought to resort pure Maven way using the Maven Apt Plugin
My configuration is as follows,
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.0-alpha-4</version>
<inherited>true</inherited>
<configuration>
<fork>true</fork>
<encoding>UTF-8</encoding>
<factory>org.eclipse.sapphire.sdk.build.processor.internal.APFactory</factory>
<sourceOutputDirectory>.apt_generated</sourceOutputDirectory>
<outputDirectory>.apt_generated</outputDirectory>
<meminitial>256m</meminitial>
<maxmem>512m</maxmem>
<!-- used for staleness checking -->
<outputFileEndings>
<outputFileEnding>.xml</outputFileEnding>
</outputFileEndings>
<!-- force skips stale checking and always generate -->
<!-- force>true</force -->
</configuration>
</plugin>
Now the code is getting generated with a warning as below,
Quote:
[WARNING] warning: Annotation types without processors: [org.eclipse.sapphire.modeling.annotations.Image, org.eclipse.sapphir
e.modeling.annotations.Type, org.eclipse.sapphire.modeling.xml.annotations.XmlListBinding.Mapping, org.eclipse.sapphire.model
ing.xml.annotations.XmlListBinding, org.eclipse.sapphire.modeling.annotations.Reference, org.eclipse.sapphire.java.JavaTypeCo
nstraint, org.eclipse.sapphire.modeling.annotations.NoDuplicates, org.eclipse.sapphire.modeling.xml.annotations.XmlBinding, o
rg.eclipse.sapphire.modeling.annotations.Whitespace, org.eclipse.sapphire.modeling.xml.annotations.CustomXmlValueBinding, org
.eclipse.sapphire.modeling.annotations.Service, org.eclipse.sapphire.modeling.annotations.Required, org.eclipse.sapphire.mode
ling.annotations.MustExist, org.eclipse.sapphire.modeling.annotations.CountConstraint, org.eclipse.sapphire.modeling.xml.anno
tations.CustomXmlElementBinding, java.lang.Override, org.eclipse.sapphire.modeling.annotations.EnumSerialization, java.lang.S
uppressWarnings, org.eclipse.sapphire.modeling.annotations.DefaultValue, org.eclipse.sapphire.modeling.annotations.PossibleVa
lues, org.eclipse.sapphire.modeling.xml.annotations.XmlValueBinding, org.eclipse.sapphire.modeling.annotations.DerivedValue,
org.eclipse.sapphire.modeling.annotations.Enablement, org.eclipse.sapphire.modeling.xml.annotations.XmlRootBinding, org.eclip
se.sapphire.modeling.annotations.Documentation]
Wondering what it is missing something from Maven Plugin class path ? or anything else and its implications .....
~Kamesh
[Updated on: Mon, 15 August 2011 08:30] by Moderator
|
|
| | | | | |
Goto Forum:
Current Time: Wed Jul 23 17:49:10 EDT 2025
Powered by FUDForum. Page generated in 0.04418 seconds
|