Hi,
I have some problem. I am developing an application which should work
on mobile devices and desktop. The problem is that I don't want to
duplicate the common code. So I createdd a project "common" which
contains common part of code. I also have a mobile project and desktop
project, both of them depends on this "common". The real architecture
is much more complicated but I think the one described below easily
shows my problem. The problem is that a "common" part must be compiled
in diferent way for mobile and for desktop. I don't know if I it is
possible to compile it one time for example with mobile compilator and
it will works on desktopalso. Maybe it will work but I don't think
that it is the right way to do it, and problem with this solution is,
that for mobile devices I have to preverify classes, to preverify it
with pyx4me plugin I add all the project depndencies inside a
preverified jar to satisfy the preverification constraint (to have all
used classes in preverifaction classpath). So the jars after
preverification contain all the dependencies inside, i think it is
reallly bad solution. Maybe it is possible to somehow unpack the
dependencies add it to preverifaction classpath, preverify only
project classes and pack them to the jar, without dependencies. But I
still don't know if I it is possible to use these preverified classes
at desktop as well, and even if it is ok, I am still not sure if it is
a good solution to use such a modified classes at desktops. So, I
created a second project and gave it a relative path to sources from
first one. So one of them have generated artifact for desktop, and the
second one for mobile. But it still stinks. Generaly using the
relative path to have an acces to the source of the project at the
same level is rather an example of 'bad design'. Actually not only for
me, Eclispe and its Mobile Tools for Java plugin also doesn't deal
with these relative path, so even if I chekout all the projects, the
source folder wouldn't be resolved because it is placed out of of the
project directory. So it is still bad solution for me. I also tried to
place two pom's in one directory, but the parent projects accept only
modules with pom.xml file, I cannot point that in the directory
'child' there are two different modules with poms: pom1.xml and
pom2.xml. So it still sucks, because for the IDE it would be great to
share the same sources between two projects, without using relative
path to other projects which are on the same hierarchy level or higer.
Maybe it is possible to somehow define more than one artifact in one
pom.xml? But actually I don't think it is possible, so maybe some of
you have met with similar problem and could tell me how to deal with
it?

Cheers,
Tomek

P.S
I have one more question. Let's assume that I deployed some artifact.
Some people have used it so they have copy of it in local repository.
Now I change something in artifact and deploy it with the same version
number. Will all the people which have a copy of previous version in
local repository still use old version, or maybe maven will see that
there is a new version of this library (with the same version number
as previous) and automatically download it from remote repository
during the building?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to