Preon on Android

I tried to run the sample Preon app on Android 2.1 with no luck. I wonder if it's possible to run the Preon app on Android. How hard would it be to make the Preon Dalvik friendly?

Preon is a Java library for creating codecs for data compressed in a data stream in a declarative manner. Think JAXB or Hibernate, but then for binary encoded data written by Wilfred Springer.


Below is my data when trying to run a simple application that uses Preon on Android:

Preon is addicted to Pecia. Pecia is indirectly dependent on stax-api, which is not supported out of the box in Android. Is stax-api used in preon kernel processing? Can stax-api be excluded from Preon dependencies?

After excluding pecia from the dependencies (without knowing the consequences), I found out that preon brings several copies of the log4j.properties file. I suggest moving the log4j.properties files to the / src / test / resources directory in preon and pecia projects to prevent them from using classes.

Since duplicate log4j.properties files, the android-maven-plugin file fails in the package target with the following message:

[INFO] java.util.zip.ZipException: duplicate entry: log4j.properties

[INFO] -------------------------------------------- --- -------------------------

[INFO] STRICT FAULT

[INFO] -------------------------------------------- --- -------------------------

[INFO] Total time: 19.717s

[INFO] Finished on: Wed Mar 23 14:30:55 PST 2011

[INFO] End memory: 7M / 62M

+3
source share
2 answers

, . Preon Android. Preon . :
1. log4.properties       /src/test/resources   .
2. pecia.
3. pecia preon-binding:   
DocumentElement.java
Documenter.java
Para.java
ParaContents.java
4. org.codehaus.preon.code.Codecs:
(, ):
import javax.xml.stream.XMLStreamException;
import nl.flotsam.pecia.builder.ArticleDocument;   
import nl.flotsam.pecia.builder.base.DefaultArticleDocument;      
import nl.flotsam.pecia.builder.base.DefaultDocumentBuilder;        
import nl.flotsam.pecia.builder.html.HtmlDocumentBuilder;           
import nl.flotsam.pecia.builder.xml.StreamingXmlWriter;           
import nl.flotsam.pecia.builder.xml.XmlWriter;
5. org.codehaus.preon.codec.ObjectCodeFactory       
:       
/* target.document(codec.getCodecDescriptor(). reference (CodecDescriptor.Adjective.THE, false)); */

:

preon-, , .

, , .

.

+2
0

All Articles