Home » Archived » Sapphire » Code Generation(Annotation Compiler)
Code Generation [message #715321] |
Sat, 13 August 2011 10:44 |
Kamesh Sampath Messages: 213 Registered: July 2009 |
Senior Member |
|
|
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 08:37] Report message to a moderator
|
|
|
Re: Code Generation [message #715376 is a reply to message #715321] |
Sat, 13 August 2011 16:38 |
Kamesh Sampath Messages: 213 Registered: July 2009 |
Senior Member |
|
|
I followed the http://wiki.eclipse.org/Sapphire_Modeling_Tycho_build_support on using Tycho with my Plugin build, but when I try to integrate the the customCallbacks.xml to my maven build I get the following error ,
Quote:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (generate-sources) on project ${PLUGIN_NAME}: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR]${PLUGIN_SRC_FOLDER}\build-sapphire.xml:41: The following error occurred while executing this line:
[ERROR] ${PLUGIN_SRC_FOLDER}\build-sapphire.xml:65: The
following error occurred while executing this line:
[ERROR] ${PLUGIN_SRC_FOLDER}\build-sapphire.xml:92: No
suitable relative path from ${PLUGIN_SRC_FOLDER} to ${M2_REPO}\p2\osgi\bundle\org.eclipse.emf.ecore.change\2.7.0.v20110408-2116\org.eclipse.emf.ecore.change-2.7.0.v20110408-2116.jar
For brevity i have used
- $PLUGIN_SRC_FOLDER- this corresponds to the Eclipse Plugin source folder in
- $M2_REPO corresponds to the Local maven repository workspace
- build-sapphire.xml --> customCallbacks.xml
My platform is on Windows 7 with Maven 3.0.3 and Eclipse Indigo, also I have turned off Annotation processing at the project settings to make the build free of any user specific settings.
I personally feel there is some interference with EMF and Sapphire and not sure they could be used in same project as dependencies and doubt the cause of my previous thread message could be this too ....
~Kamesh
[Updated on: Sun, 14 August 2011 08:37] Report message to a moderator
|
|
|
Re: Code Generation [message #715761 is a reply to message #715376] |
Mon, 15 August 2011 12:29 |
Kamesh Sampath Messages: 213 Registered: July 2009 |
Senior Member |
|
|
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 12:30] Report message to a moderator
|
|
| | | | | |
Goto Forum:
Current Time: Tue Sep 24 22:41:52 GMT 2024
Powered by FUDForum. Page generated in 0.04200 seconds
|