You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Carlos Rovira <ca...@apache.org> on 2016/11/03 22:10:21 UTC
[FlexJS][Maven] Missing assets in target folder
Hi Chris,
I'm trying to test a simple <js:Image> in MDLExample without luck,
something like:
<js:Image url="main/resources/Unknown.jpeg" width="220" height="140"/>
is not working.
I think the problem is maven is not copying the image asset to to target
folder.
I get it working with something like this:
<js:Image url="../../../../src/main/resources/Unknown.jpeg" width="220"
height="140"/>
(reaching it from outside target and from the source project)
Maybe I'm doing something wrong?
--
Carlos Rovira
http://about.me/carlosrovira
Re: [FlexJS][Maven] Missing assets in target folder
Posted by Carlos Rovira <ca...@codeoscopic.com>.
Hi Chris,
That's ok, I think we need to add additional source directories (in my
case, and other maven projects, src/main/resources). The configuration you
refer would affect all projects? I think that is ok so people could have
standard maven folders preconfigured, and then change it if they want.
about flexmojos, you are right, I'm referring to flexes-maven-plugin,
sorry! :)
Thanks
2016-11-04 18:55 GMT+01:00 Christofer Dutz <ch...@c-ware.de>:
> Hi Carlos,
>
> These files aren’t sources therefore they don’t belong to a source
> directory, from a maven point of view. They should be added to the resource
> directories which are handled by the resources plugin.
> The thing is, that we could eventually simply configure the
> maven-resources-plugin to copy the resources to our desired output
> directory /target/javascript/bin/debug-js or release-js ...
> That would be the better approach. I don’t think the compiler should deal
> copying of resources.
>
> And what are you talking about flexmojos? I thought we were talking about
> flexjs and this uses the flexjs-maven-plugin.
>
> Chris
>
> Am 04.11.16, 17:51 schrieb "carlos.rovira@gmail.com im Auftrag von Carlos
> Rovira" <carlos.rovira@gmail.com im Auftrag von
> carlos.rovira@codeoscopic.com>:
>
> mmm...certainly, I think that was what we use to do in old Flex dev.
> maybe
> that's the reason why my jpg is not getting copied...we need to add
> 'src/resources/fles' to the pom.xml as an additional source directory
>
> @Chris what do you think? could we add in flexmojos a secondary source
> dir?
>
> Thanks
>
>
>
> 2016-11-04 17:21 GMT+01:00 Alex Harui <ah...@adobe.com>:
>
> >
> >
> > On 11/4/16, 2:13 AM, "carlos.rovira@gmail.com on behalf of Carlos
> Rovira"
> > <carlos.rovira@gmail.com on behalf of carlos.rovira@codeoscopic.com>
> > wrote:
> >
> > >I think Chris is on the track on this issue.
> > >
> > >As a user, If I have a resource on a folder, is because I want it
> on final
> > >output, so I'll expect to be copied, since output folder is what
> I'll be
> > >putting on server (and not any source code related resource).
> > >
> > >btw, I think this should be IDE agnostic, and it scares me if we
> think it
> > >should depend on that. people should be able to use it from command
> line,
> > >so I think this is in the flexjs sdk domain.
> > >
> > >In traditional flex development:
> > >
> > >* I used a path like this "/assets/image.jpg" and that would work
> as an
> > >absolute path.
> >
> > From my experience, a leading slash only worked in IDEs and did not
> work
> > from the command line.
> >
> > >* The other way is relative to the resource, without the first
> slash, and
> > >you can up and down the hierarchy starting from the source file in
> which
> > >you write that code.
> > >
> > >I use a maven style folder structure (so src/main/flex/App.mxml and
> so
> > >on),
> > >other will use src/App.mxml... we need to support all of this in a
> easy
> > >way, since this is basic.
> > >
> > >I think If users start to be kept in this basic things, is what
> could make
> > >them to not continue trying flexjs.
> > >
> >
> > Somehow, I think everybody on this email list was able to use the
> regular
> > Flex SDK and manage their resources without the Flex SDK MXMLC
> compiler
> > having any ability to copy resources. So I really am curious as to
> how
> > folks managed resources in the past.
> >
> > That said, I'm fine with having the compiler look in a few places to
> find
> > and copy assets. Currently, only certain kinds of files are copied
> from
> > an assets folder that is a sibling of the main class file's
> location. If
> > we add src/main/resources, should you have to specify a relative
> path to
> > it? I think not, since the relative path would affect the layout in
> the
> > target folder, so maybe the developer will have to specify a second
> source
> > path for src/main/resources.
> >
> > Thoughts?
> >
> > -Alex
> >
> >
>
>
> --
>
> Carlos Rovira
> Director General
> M: +34 607 22 60 05
> http://www.codeoscopic.com
> http://www.avant2.es
>
>
> Este mensaje se dirige exclusivamente a su destinatario y puede
> contener
> información privilegiada o confidencial. Si ha recibido este mensaje
> por
> error, le rogamos que nos lo comunique inmediatamente por esta misma
> vía y
> proceda a su destrucción.
>
> De la vigente Ley Orgánica de Protección de Datos (15/1999), le
> comunicamos
> que sus datos forman parte de un fichero cuyo responsable es
> CODEOSCOPIC
> S.A. La finalidad de dicho tratamiento es facilitar la prestación del
> servicio o información solicitados, teniendo usted derecho de acceso,
> rectificación, cancelación y oposición de sus datos dirigiéndose a
> nuestras
> oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
> necesaria.
>
>
>
--
Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es
Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.
De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.
Re: [FlexJS][Maven] Missing assets in target folder
Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Carlos,
These files aren’t sources therefore they don’t belong to a source directory, from a maven point of view. They should be added to the resource directories which are handled by the resources plugin.
The thing is, that we could eventually simply configure the maven-resources-plugin to copy the resources to our desired output directory /target/javascript/bin/debug-js or release-js ...
That would be the better approach. I don’t think the compiler should deal copying of resources.
And what are you talking about flexmojos? I thought we were talking about flexjs and this uses the flexjs-maven-plugin.
Chris
Am 04.11.16, 17:51 schrieb "carlos.rovira@gmail.com im Auftrag von Carlos Rovira" <carlos.rovira@gmail.com im Auftrag von carlos.rovira@codeoscopic.com>:
mmm...certainly, I think that was what we use to do in old Flex dev. maybe
that's the reason why my jpg is not getting copied...we need to add
'src/resources/fles' to the pom.xml as an additional source directory
@Chris what do you think? could we add in flexmojos a secondary source dir?
Thanks
2016-11-04 17:21 GMT+01:00 Alex Harui <ah...@adobe.com>:
>
>
> On 11/4/16, 2:13 AM, "carlos.rovira@gmail.com on behalf of Carlos Rovira"
> <carlos.rovira@gmail.com on behalf of carlos.rovira@codeoscopic.com>
> wrote:
>
> >I think Chris is on the track on this issue.
> >
> >As a user, If I have a resource on a folder, is because I want it on final
> >output, so I'll expect to be copied, since output folder is what I'll be
> >putting on server (and not any source code related resource).
> >
> >btw, I think this should be IDE agnostic, and it scares me if we think it
> >should depend on that. people should be able to use it from command line,
> >so I think this is in the flexjs sdk domain.
> >
> >In traditional flex development:
> >
> >* I used a path like this "/assets/image.jpg" and that would work as an
> >absolute path.
>
> From my experience, a leading slash only worked in IDEs and did not work
> from the command line.
>
> >* The other way is relative to the resource, without the first slash, and
> >you can up and down the hierarchy starting from the source file in which
> >you write that code.
> >
> >I use a maven style folder structure (so src/main/flex/App.mxml and so
> >on),
> >other will use src/App.mxml... we need to support all of this in a easy
> >way, since this is basic.
> >
> >I think If users start to be kept in this basic things, is what could make
> >them to not continue trying flexjs.
> >
>
> Somehow, I think everybody on this email list was able to use the regular
> Flex SDK and manage their resources without the Flex SDK MXMLC compiler
> having any ability to copy resources. So I really am curious as to how
> folks managed resources in the past.
>
> That said, I'm fine with having the compiler look in a few places to find
> and copy assets. Currently, only certain kinds of files are copied from
> an assets folder that is a sibling of the main class file's location. If
> we add src/main/resources, should you have to specify a relative path to
> it? I think not, since the relative path would affect the layout in the
> target folder, so maybe the developer will have to specify a second source
> path for src/main/resources.
>
> Thoughts?
>
> -Alex
>
>
--
Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es
Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.
De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.
Re: [FlexJS][Maven] Missing assets in target folder
Posted by Carlos Rovira <ca...@codeoscopic.com>.
mmm...certainly, I think that was what we use to do in old Flex dev. maybe
that's the reason why my jpg is not getting copied...we need to add
'src/resources/fles' to the pom.xml as an additional source directory
@Chris what do you think? could we add in flexmojos a secondary source dir?
Thanks
2016-11-04 17:21 GMT+01:00 Alex Harui <ah...@adobe.com>:
>
>
> On 11/4/16, 2:13 AM, "carlos.rovira@gmail.com on behalf of Carlos Rovira"
> <carlos.rovira@gmail.com on behalf of carlos.rovira@codeoscopic.com>
> wrote:
>
> >I think Chris is on the track on this issue.
> >
> >As a user, If I have a resource on a folder, is because I want it on final
> >output, so I'll expect to be copied, since output folder is what I'll be
> >putting on server (and not any source code related resource).
> >
> >btw, I think this should be IDE agnostic, and it scares me if we think it
> >should depend on that. people should be able to use it from command line,
> >so I think this is in the flexjs sdk domain.
> >
> >In traditional flex development:
> >
> >* I used a path like this "/assets/image.jpg" and that would work as an
> >absolute path.
>
> From my experience, a leading slash only worked in IDEs and did not work
> from the command line.
>
> >* The other way is relative to the resource, without the first slash, and
> >you can up and down the hierarchy starting from the source file in which
> >you write that code.
> >
> >I use a maven style folder structure (so src/main/flex/App.mxml and so
> >on),
> >other will use src/App.mxml... we need to support all of this in a easy
> >way, since this is basic.
> >
> >I think If users start to be kept in this basic things, is what could make
> >them to not continue trying flexjs.
> >
>
> Somehow, I think everybody on this email list was able to use the regular
> Flex SDK and manage their resources without the Flex SDK MXMLC compiler
> having any ability to copy resources. So I really am curious as to how
> folks managed resources in the past.
>
> That said, I'm fine with having the compiler look in a few places to find
> and copy assets. Currently, only certain kinds of files are copied from
> an assets folder that is a sibling of the main class file's location. If
> we add src/main/resources, should you have to specify a relative path to
> it? I think not, since the relative path would affect the layout in the
> target folder, so maybe the developer will have to specify a second source
> path for src/main/resources.
>
> Thoughts?
>
> -Alex
>
>
--
Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es
Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.
De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.
Re: [FlexJS][Maven] Missing assets in target folder
Posted by Alex Harui <ah...@adobe.com>.
On 11/4/16, 2:13 AM, "carlos.rovira@gmail.com on behalf of Carlos Rovira"
<carlos.rovira@gmail.com on behalf of carlos.rovira@codeoscopic.com> wrote:
>I think Chris is on the track on this issue.
>
>As a user, If I have a resource on a folder, is because I want it on final
>output, so I'll expect to be copied, since output folder is what I'll be
>putting on server (and not any source code related resource).
>
>btw, I think this should be IDE agnostic, and it scares me if we think it
>should depend on that. people should be able to use it from command line,
>so I think this is in the flexjs sdk domain.
>
>In traditional flex development:
>
>* I used a path like this "/assets/image.jpg" and that would work as an
>absolute path.
From my experience, a leading slash only worked in IDEs and did not work
from the command line.
>* The other way is relative to the resource, without the first slash, and
>you can up and down the hierarchy starting from the source file in which
>you write that code.
>
>I use a maven style folder structure (so src/main/flex/App.mxml and so
>on),
>other will use src/App.mxml... we need to support all of this in a easy
>way, since this is basic.
>
>I think If users start to be kept in this basic things, is what could make
>them to not continue trying flexjs.
>
Somehow, I think everybody on this email list was able to use the regular
Flex SDK and manage their resources without the Flex SDK MXMLC compiler
having any ability to copy resources. So I really am curious as to how
folks managed resources in the past.
That said, I'm fine with having the compiler look in a few places to find
and copy assets. Currently, only certain kinds of files are copied from
an assets folder that is a sibling of the main class file's location. If
we add src/main/resources, should you have to specify a relative path to
it? I think not, since the relative path would affect the layout in the
target folder, so maybe the developer will have to specify a second source
path for src/main/resources.
Thoughts?
-Alex
Re: [FlexJS][Maven] Missing assets in target folder
Posted by Carlos Rovira <ca...@codeoscopic.com>.
You can grab ir from examples folder is MDLExample
thanks
2016-11-04 15:45 GMT+01:00 Christofer Dutz <ch...@c-ware.de>:
> Hi Carlos,
>
> do you have your project checked in anywhere, so I could have a look at it?
>
> Chris
>
> Am 04.11.16, 14:08 schrieb "carlos.rovira@gmail.com im Auftrag von Carlos
> Rovira" <carlos.rovira@gmail.com im Auftrag von
> carlos.rovira@codeoscopic.com>:
>
> Hi Chris,
>
> I track all subfolders and seems is not copied :?
>
> 2016-11-04 11:49 GMT+01:00 Christofer Dutz <christofer.dutz@c-ware.de
> >:
>
> > Hi Carlos,
> >
> > not directly in the target directory.
> > It should be in „target/javascript/bin/js-debug“ (or a
> sub-directory,
> > depending on where your resource is located)
> >
> > Chris
> >
> > Am 04.11.16, 11:17 schrieb "carlos.rovira@gmail.com im Auftrag von
> Carlos
> > Rovira" <carlos.rovira@gmail.com im Auftrag von
> > carlos.rovira@codeoscopic.com>:
> >
> > Hi Chris,
> >
> > I tried your suggestion and changed the image extension to "jpg"
> to be
> > closer in my example, but after building I didn't find in target
> > folder.
> > This should be in "target"? or maybe in a subfolder
> > (target/main/resourcers)?
> >
> > 2016-11-04 10:29 GMT+01:00 Christofer Dutz <
> christofer.dutz@c-ware.de
> > >:
> >
> > > Hi Carlos,
> > >
> > > just to be complete with my suggestion. Maven style would be
> to have
> > > sources, which are compiled in „src/main/flex“ and resources
> which
> > are
> > > simply copied to the output in „src/main/resources“
> > >
> > > Chris
> > >
> > > Am 04.11.16, 10:13 schrieb "carlos.rovira@gmail.com im
> Auftrag von
> > Carlos
> > > Rovira" <carlos.rovira@gmail.com im Auftrag von
> > > carlos.rovira@codeoscopic.com>:
> > >
> > > I think Chris is on the track on this issue.
> > >
> > > As a user, If I have a resource on a folder, is because I
> want
> > it on
> > > final
> > > output, so I'll expect to be copied, since output folder
> is what
> > I'll
> > > be
> > > putting on server (and not any source code related
> resource).
> > >
> > > btw, I think this should be IDE agnostic, and it scares me
> if we
> > think
> > > it
> > > should depend on that. people should be able to use it from
> > command
> > > line,
> > > so I think this is in the flexjs sdk domain.
> > >
> > > In traditional flex development:
> > >
> > > * I used a path like this "/assets/image.jpg" and that
> would
> > work as
> > > an
> > > absolute path.
> > > * The other way is relative to the resource, without the
> first
> > slash,
> > > and
> > > you can up and down the hierarchy starting from the source
> file
> > in
> > > which
> > > you write that code.
> > >
> > > I use a maven style folder structure (so
> src/main/flex/App.mxml
> > and so
> > > on),
> > > other will use src/App.mxml... we need to support all of
> this in
> > a easy
> > > way, since this is basic.
> > >
> > > I think If users start to be kept in this basic things, is
> what
> > could
> > > make
> > > them to not continue trying flexjs.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 2016-11-04 8:04 GMT+01:00 Christofer Dutz <
> > christofer.dutz@c-ware.de>:
> > >
> > > > Hi Carlos,
> > > >
> > > > I’m glad you are having this problem ☺ ... don’t get me
> wrong,
> > but it
> > > > points out a problem I noticed when working on cleaning
> up the
> > > > MXMLFlexJSPublisher.
> > > > The problem is that only png, gif, jpg and json
> resources are
> > > copied. This
> > > > is hard coded and I don’t like that approach. I would
> prefer
> > > something more
> > > > Maven style in which you have sources and resources.
> > > > This way everything in the resources could be copied
> instead
> > of this
> > > hack
> > > > with hard-coded filters. A short fix would be to name
> your
> > image
> > > „jpg“
> > > > instead of „jpeg“.
> > > >
> > > > The second thing is the „relativity to the main class“.
> It
> > seems all
> > > > resources are addressed relative to the main class:
> > > >
> > > > File imageSrcDir = new File(configuration.
> > getTargetFile()).
> > > > getAbsoluteFile().getParentFile();
> > > >
> > > > This sort of works as long as the Main class is in the
> root of
> > the
> > > > project. This restriction however only seems to apply if
> you
> > are
> > > using
> > > > Flash Builder. In my IntelliJ and Maven applications I
> usually
> > put
> > > my Main
> > > > classes in packages.
> > > >
> > > > You can have a look at the code I’m talking about in
> > > MXMLFlexJSPublisher
> > > > (Lines 177-201 in my closure-classpath-sources branch or
> > > 149-152,407-421 in
> > > > the develop branch)
> > > >
> > > > Chris
> > > >
> > > >
> > > > Am 03.11.16, 23:10 schrieb "carlos.rovira@gmail.com im
> > Auftrag von
> > > Carlos
> > > > Rovira" <carlos.rovira@gmail.com im Auftrag von
> > > carlosrovira@apache.org>:
> > > >
> > > > Hi Chris,
> > > >
> > > > I'm trying to test a simple <js:Image> in MDLExample
> > without
> > > luck,
> > > > something like:
> > > >
> > > > <js:Image url="main/resources/Unknown.jpeg"
> width="220"
> > > height="140"/>
> > > >
> > > > is not working.
> > > >
> > > > I think the problem is maven is not copying the image
> > asset to to
> > > > target
> > > > folder.
> > > >
> > > > I get it working with something like this:
> > > >
> > > > <js:Image url="../../../../src/main/
> > resources/Unknown.jpeg"
> > > > width="220"
> > > > height="140"/>
> > > >
> > > > (reaching it from outside target and from the source
> > project)
> > > >
> > > > Maybe I'm doing something wrong?
> > > >
> > > >
> > > >
> > > > --
> > > > Carlos Rovira
> > > > http://about.me/carlosrovira
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > >
> > > Carlos Rovira
> > > Director General
> > > M: +34 607 22 60 05
> > > http://www.codeoscopic.com
> > > http://www.avant2.es
> > >
> > >
> > > Este mensaje se dirige exclusivamente a su destinatario y
> puede
> > > contener
> > > información privilegiada o confidencial. Si ha recibido
> este
> > mensaje
> > > por
> > > error, le rogamos que nos lo comunique inmediatamente por
> esta
> > misma
> > > vía y
> > > proceda a su destrucción.
> > >
> > > De la vigente Ley Orgánica de Protección de Datos
> (15/1999), le
> > > comunicamos
> > > que sus datos forman parte de un fichero cuyo responsable
> es
> > > CODEOSCOPIC
> > > S.A. La finalidad de dicho tratamiento es facilitar la
> > prestación del
> > > servicio o información solicitados, teniendo usted derecho
> de
> > acceso,
> > > rectificación, cancelación y oposición de sus datos
> dirigiéndose
> > a
> > > nuestras
> > > oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la
> > documentación
> > > necesaria.
> > >
> > >
> > >
> >
> >
> > --
> >
> > Carlos Rovira
> > Director General
> > M: +34 607 22 60 05
> > http://www.codeoscopic.com
> > http://www.avant2.es
> >
> >
> > Este mensaje se dirige exclusivamente a su destinatario y puede
> > contener
> > información privilegiada o confidencial. Si ha recibido este
> mensaje
> > por
> > error, le rogamos que nos lo comunique inmediatamente por esta
> misma
> > vía y
> > proceda a su destrucción.
> >
> > De la vigente Ley Orgánica de Protección de Datos (15/1999), le
> > comunicamos
> > que sus datos forman parte de un fichero cuyo responsable es
> > CODEOSCOPIC
> > S.A. La finalidad de dicho tratamiento es facilitar la
> prestación del
> > servicio o información solicitados, teniendo usted derecho de
> acceso,
> > rectificación, cancelación y oposición de sus datos dirigiéndose
> a
> > nuestras
> > oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la
> documentación
> > necesaria.
> >
> >
> >
>
>
> --
>
> Carlos Rovira
> Director General
> M: +34 607 22 60 05
> http://www.codeoscopic.com
> http://www.avant2.es
>
>
> Este mensaje se dirige exclusivamente a su destinatario y puede
> contener
> información privilegiada o confidencial. Si ha recibido este mensaje
> por
> error, le rogamos que nos lo comunique inmediatamente por esta misma
> vía y
> proceda a su destrucción.
>
> De la vigente Ley Orgánica de Protección de Datos (15/1999), le
> comunicamos
> que sus datos forman parte de un fichero cuyo responsable es
> CODEOSCOPIC
> S.A. La finalidad de dicho tratamiento es facilitar la prestación del
> servicio o información solicitados, teniendo usted derecho de acceso,
> rectificación, cancelación y oposición de sus datos dirigiéndose a
> nuestras
> oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
> necesaria.
>
>
>
--
Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es
Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.
De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.
Re: [FlexJS][Maven] Missing assets in target folder
Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Carlos,
do you have your project checked in anywhere, so I could have a look at it?
Chris
Am 04.11.16, 14:08 schrieb "carlos.rovira@gmail.com im Auftrag von Carlos Rovira" <carlos.rovira@gmail.com im Auftrag von carlos.rovira@codeoscopic.com>:
Hi Chris,
I track all subfolders and seems is not copied :?
2016-11-04 11:49 GMT+01:00 Christofer Dutz <ch...@c-ware.de>:
> Hi Carlos,
>
> not directly in the target directory.
> It should be in „target/javascript/bin/js-debug“ (or a sub-directory,
> depending on where your resource is located)
>
> Chris
>
> Am 04.11.16, 11:17 schrieb "carlos.rovira@gmail.com im Auftrag von Carlos
> Rovira" <carlos.rovira@gmail.com im Auftrag von
> carlos.rovira@codeoscopic.com>:
>
> Hi Chris,
>
> I tried your suggestion and changed the image extension to "jpg" to be
> closer in my example, but after building I didn't find in target
> folder.
> This should be in "target"? or maybe in a subfolder
> (target/main/resourcers)?
>
> 2016-11-04 10:29 GMT+01:00 Christofer Dutz <christofer.dutz@c-ware.de
> >:
>
> > Hi Carlos,
> >
> > just to be complete with my suggestion. Maven style would be to have
> > sources, which are compiled in „src/main/flex“ and resources which
> are
> > simply copied to the output in „src/main/resources“
> >
> > Chris
> >
> > Am 04.11.16, 10:13 schrieb "carlos.rovira@gmail.com im Auftrag von
> Carlos
> > Rovira" <carlos.rovira@gmail.com im Auftrag von
> > carlos.rovira@codeoscopic.com>:
> >
> > I think Chris is on the track on this issue.
> >
> > As a user, If I have a resource on a folder, is because I want
> it on
> > final
> > output, so I'll expect to be copied, since output folder is what
> I'll
> > be
> > putting on server (and not any source code related resource).
> >
> > btw, I think this should be IDE agnostic, and it scares me if we
> think
> > it
> > should depend on that. people should be able to use it from
> command
> > line,
> > so I think this is in the flexjs sdk domain.
> >
> > In traditional flex development:
> >
> > * I used a path like this "/assets/image.jpg" and that would
> work as
> > an
> > absolute path.
> > * The other way is relative to the resource, without the first
> slash,
> > and
> > you can up and down the hierarchy starting from the source file
> in
> > which
> > you write that code.
> >
> > I use a maven style folder structure (so src/main/flex/App.mxml
> and so
> > on),
> > other will use src/App.mxml... we need to support all of this in
> a easy
> > way, since this is basic.
> >
> > I think If users start to be kept in this basic things, is what
> could
> > make
> > them to not continue trying flexjs.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 2016-11-04 8:04 GMT+01:00 Christofer Dutz <
> christofer.dutz@c-ware.de>:
> >
> > > Hi Carlos,
> > >
> > > I’m glad you are having this problem ☺ ... don’t get me wrong,
> but it
> > > points out a problem I noticed when working on cleaning up the
> > > MXMLFlexJSPublisher.
> > > The problem is that only png, gif, jpg and json resources are
> > copied. This
> > > is hard coded and I don’t like that approach. I would prefer
> > something more
> > > Maven style in which you have sources and resources.
> > > This way everything in the resources could be copied instead
> of this
> > hack
> > > with hard-coded filters. A short fix would be to name your
> image
> > „jpg“
> > > instead of „jpeg“.
> > >
> > > The second thing is the „relativity to the main class“. It
> seems all
> > > resources are addressed relative to the main class:
> > >
> > > File imageSrcDir = new File(configuration.
> getTargetFile()).
> > > getAbsoluteFile().getParentFile();
> > >
> > > This sort of works as long as the Main class is in the root of
> the
> > > project. This restriction however only seems to apply if you
> are
> > using
> > > Flash Builder. In my IntelliJ and Maven applications I usually
> put
> > my Main
> > > classes in packages.
> > >
> > > You can have a look at the code I’m talking about in
> > MXMLFlexJSPublisher
> > > (Lines 177-201 in my closure-classpath-sources branch or
> > 149-152,407-421 in
> > > the develop branch)
> > >
> > > Chris
> > >
> > >
> > > Am 03.11.16, 23:10 schrieb "carlos.rovira@gmail.com im
> Auftrag von
> > Carlos
> > > Rovira" <carlos.rovira@gmail.com im Auftrag von
> > carlosrovira@apache.org>:
> > >
> > > Hi Chris,
> > >
> > > I'm trying to test a simple <js:Image> in MDLExample
> without
> > luck,
> > > something like:
> > >
> > > <js:Image url="main/resources/Unknown.jpeg" width="220"
> > height="140"/>
> > >
> > > is not working.
> > >
> > > I think the problem is maven is not copying the image
> asset to to
> > > target
> > > folder.
> > >
> > > I get it working with something like this:
> > >
> > > <js:Image url="../../../../src/main/
> resources/Unknown.jpeg"
> > > width="220"
> > > height="140"/>
> > >
> > > (reaching it from outside target and from the source
> project)
> > >
> > > Maybe I'm doing something wrong?
> > >
> > >
> > >
> > > --
> > > Carlos Rovira
> > > http://about.me/carlosrovira
> > >
> > >
> > >
> >
> >
> > --
> >
> > Carlos Rovira
> > Director General
> > M: +34 607 22 60 05
> > http://www.codeoscopic.com
> > http://www.avant2.es
> >
> >
> > Este mensaje se dirige exclusivamente a su destinatario y puede
> > contener
> > información privilegiada o confidencial. Si ha recibido este
> mensaje
> > por
> > error, le rogamos que nos lo comunique inmediatamente por esta
> misma
> > vía y
> > proceda a su destrucción.
> >
> > De la vigente Ley Orgánica de Protección de Datos (15/1999), le
> > comunicamos
> > que sus datos forman parte de un fichero cuyo responsable es
> > CODEOSCOPIC
> > S.A. La finalidad de dicho tratamiento es facilitar la
> prestación del
> > servicio o información solicitados, teniendo usted derecho de
> acceso,
> > rectificación, cancelación y oposición de sus datos dirigiéndose
> a
> > nuestras
> > oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la
> documentación
> > necesaria.
> >
> >
> >
>
>
> --
>
> Carlos Rovira
> Director General
> M: +34 607 22 60 05
> http://www.codeoscopic.com
> http://www.avant2.es
>
>
> Este mensaje se dirige exclusivamente a su destinatario y puede
> contener
> información privilegiada o confidencial. Si ha recibido este mensaje
> por
> error, le rogamos que nos lo comunique inmediatamente por esta misma
> vía y
> proceda a su destrucción.
>
> De la vigente Ley Orgánica de Protección de Datos (15/1999), le
> comunicamos
> que sus datos forman parte de un fichero cuyo responsable es
> CODEOSCOPIC
> S.A. La finalidad de dicho tratamiento es facilitar la prestación del
> servicio o información solicitados, teniendo usted derecho de acceso,
> rectificación, cancelación y oposición de sus datos dirigiéndose a
> nuestras
> oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
> necesaria.
>
>
>
--
Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es
Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.
De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.
Re: [FlexJS][Maven] Missing assets in target folder
Posted by Carlos Rovira <ca...@codeoscopic.com>.
Hi Chris,
I track all subfolders and seems is not copied :?
2016-11-04 11:49 GMT+01:00 Christofer Dutz <ch...@c-ware.de>:
> Hi Carlos,
>
> not directly in the target directory.
> It should be in „target/javascript/bin/js-debug“ (or a sub-directory,
> depending on where your resource is located)
>
> Chris
>
> Am 04.11.16, 11:17 schrieb "carlos.rovira@gmail.com im Auftrag von Carlos
> Rovira" <carlos.rovira@gmail.com im Auftrag von
> carlos.rovira@codeoscopic.com>:
>
> Hi Chris,
>
> I tried your suggestion and changed the image extension to "jpg" to be
> closer in my example, but after building I didn't find in target
> folder.
> This should be in "target"? or maybe in a subfolder
> (target/main/resourcers)?
>
> 2016-11-04 10:29 GMT+01:00 Christofer Dutz <christofer.dutz@c-ware.de
> >:
>
> > Hi Carlos,
> >
> > just to be complete with my suggestion. Maven style would be to have
> > sources, which are compiled in „src/main/flex“ and resources which
> are
> > simply copied to the output in „src/main/resources“
> >
> > Chris
> >
> > Am 04.11.16, 10:13 schrieb "carlos.rovira@gmail.com im Auftrag von
> Carlos
> > Rovira" <carlos.rovira@gmail.com im Auftrag von
> > carlos.rovira@codeoscopic.com>:
> >
> > I think Chris is on the track on this issue.
> >
> > As a user, If I have a resource on a folder, is because I want
> it on
> > final
> > output, so I'll expect to be copied, since output folder is what
> I'll
> > be
> > putting on server (and not any source code related resource).
> >
> > btw, I think this should be IDE agnostic, and it scares me if we
> think
> > it
> > should depend on that. people should be able to use it from
> command
> > line,
> > so I think this is in the flexjs sdk domain.
> >
> > In traditional flex development:
> >
> > * I used a path like this "/assets/image.jpg" and that would
> work as
> > an
> > absolute path.
> > * The other way is relative to the resource, without the first
> slash,
> > and
> > you can up and down the hierarchy starting from the source file
> in
> > which
> > you write that code.
> >
> > I use a maven style folder structure (so src/main/flex/App.mxml
> and so
> > on),
> > other will use src/App.mxml... we need to support all of this in
> a easy
> > way, since this is basic.
> >
> > I think If users start to be kept in this basic things, is what
> could
> > make
> > them to not continue trying flexjs.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 2016-11-04 8:04 GMT+01:00 Christofer Dutz <
> christofer.dutz@c-ware.de>:
> >
> > > Hi Carlos,
> > >
> > > I’m glad you are having this problem ☺ ... don’t get me wrong,
> but it
> > > points out a problem I noticed when working on cleaning up the
> > > MXMLFlexJSPublisher.
> > > The problem is that only png, gif, jpg and json resources are
> > copied. This
> > > is hard coded and I don’t like that approach. I would prefer
> > something more
> > > Maven style in which you have sources and resources.
> > > This way everything in the resources could be copied instead
> of this
> > hack
> > > with hard-coded filters. A short fix would be to name your
> image
> > „jpg“
> > > instead of „jpeg“.
> > >
> > > The second thing is the „relativity to the main class“. It
> seems all
> > > resources are addressed relative to the main class:
> > >
> > > File imageSrcDir = new File(configuration.
> getTargetFile()).
> > > getAbsoluteFile().getParentFile();
> > >
> > > This sort of works as long as the Main class is in the root of
> the
> > > project. This restriction however only seems to apply if you
> are
> > using
> > > Flash Builder. In my IntelliJ and Maven applications I usually
> put
> > my Main
> > > classes in packages.
> > >
> > > You can have a look at the code I’m talking about in
> > MXMLFlexJSPublisher
> > > (Lines 177-201 in my closure-classpath-sources branch or
> > 149-152,407-421 in
> > > the develop branch)
> > >
> > > Chris
> > >
> > >
> > > Am 03.11.16, 23:10 schrieb "carlos.rovira@gmail.com im
> Auftrag von
> > Carlos
> > > Rovira" <carlos.rovira@gmail.com im Auftrag von
> > carlosrovira@apache.org>:
> > >
> > > Hi Chris,
> > >
> > > I'm trying to test a simple <js:Image> in MDLExample
> without
> > luck,
> > > something like:
> > >
> > > <js:Image url="main/resources/Unknown.jpeg" width="220"
> > height="140"/>
> > >
> > > is not working.
> > >
> > > I think the problem is maven is not copying the image
> asset to to
> > > target
> > > folder.
> > >
> > > I get it working with something like this:
> > >
> > > <js:Image url="../../../../src/main/
> resources/Unknown.jpeg"
> > > width="220"
> > > height="140"/>
> > >
> > > (reaching it from outside target and from the source
> project)
> > >
> > > Maybe I'm doing something wrong?
> > >
> > >
> > >
> > > --
> > > Carlos Rovira
> > > http://about.me/carlosrovira
> > >
> > >
> > >
> >
> >
> > --
> >
> > Carlos Rovira
> > Director General
> > M: +34 607 22 60 05
> > http://www.codeoscopic.com
> > http://www.avant2.es
> >
> >
> > Este mensaje se dirige exclusivamente a su destinatario y puede
> > contener
> > información privilegiada o confidencial. Si ha recibido este
> mensaje
> > por
> > error, le rogamos que nos lo comunique inmediatamente por esta
> misma
> > vía y
> > proceda a su destrucción.
> >
> > De la vigente Ley Orgánica de Protección de Datos (15/1999), le
> > comunicamos
> > que sus datos forman parte de un fichero cuyo responsable es
> > CODEOSCOPIC
> > S.A. La finalidad de dicho tratamiento es facilitar la
> prestación del
> > servicio o información solicitados, teniendo usted derecho de
> acceso,
> > rectificación, cancelación y oposición de sus datos dirigiéndose
> a
> > nuestras
> > oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la
> documentación
> > necesaria.
> >
> >
> >
>
>
> --
>
> Carlos Rovira
> Director General
> M: +34 607 22 60 05
> http://www.codeoscopic.com
> http://www.avant2.es
>
>
> Este mensaje se dirige exclusivamente a su destinatario y puede
> contener
> información privilegiada o confidencial. Si ha recibido este mensaje
> por
> error, le rogamos que nos lo comunique inmediatamente por esta misma
> vía y
> proceda a su destrucción.
>
> De la vigente Ley Orgánica de Protección de Datos (15/1999), le
> comunicamos
> que sus datos forman parte de un fichero cuyo responsable es
> CODEOSCOPIC
> S.A. La finalidad de dicho tratamiento es facilitar la prestación del
> servicio o información solicitados, teniendo usted derecho de acceso,
> rectificación, cancelación y oposición de sus datos dirigiéndose a
> nuestras
> oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
> necesaria.
>
>
>
--
Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es
Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.
De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.
Re: [FlexJS][Maven] Missing assets in target folder
Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Carlos,
not directly in the target directory.
It should be in „target/javascript/bin/js-debug“ (or a sub-directory, depending on where your resource is located)
Chris
Am 04.11.16, 11:17 schrieb "carlos.rovira@gmail.com im Auftrag von Carlos Rovira" <carlos.rovira@gmail.com im Auftrag von carlos.rovira@codeoscopic.com>:
Hi Chris,
I tried your suggestion and changed the image extension to "jpg" to be
closer in my example, but after building I didn't find in target folder.
This should be in "target"? or maybe in a subfolder
(target/main/resourcers)?
2016-11-04 10:29 GMT+01:00 Christofer Dutz <ch...@c-ware.de>:
> Hi Carlos,
>
> just to be complete with my suggestion. Maven style would be to have
> sources, which are compiled in „src/main/flex“ and resources which are
> simply copied to the output in „src/main/resources“
>
> Chris
>
> Am 04.11.16, 10:13 schrieb "carlos.rovira@gmail.com im Auftrag von Carlos
> Rovira" <carlos.rovira@gmail.com im Auftrag von
> carlos.rovira@codeoscopic.com>:
>
> I think Chris is on the track on this issue.
>
> As a user, If I have a resource on a folder, is because I want it on
> final
> output, so I'll expect to be copied, since output folder is what I'll
> be
> putting on server (and not any source code related resource).
>
> btw, I think this should be IDE agnostic, and it scares me if we think
> it
> should depend on that. people should be able to use it from command
> line,
> so I think this is in the flexjs sdk domain.
>
> In traditional flex development:
>
> * I used a path like this "/assets/image.jpg" and that would work as
> an
> absolute path.
> * The other way is relative to the resource, without the first slash,
> and
> you can up and down the hierarchy starting from the source file in
> which
> you write that code.
>
> I use a maven style folder structure (so src/main/flex/App.mxml and so
> on),
> other will use src/App.mxml... we need to support all of this in a easy
> way, since this is basic.
>
> I think If users start to be kept in this basic things, is what could
> make
> them to not continue trying flexjs.
>
>
>
>
>
>
>
>
>
> 2016-11-04 8:04 GMT+01:00 Christofer Dutz <ch...@c-ware.de>:
>
> > Hi Carlos,
> >
> > I’m glad you are having this problem ☺ ... don’t get me wrong, but it
> > points out a problem I noticed when working on cleaning up the
> > MXMLFlexJSPublisher.
> > The problem is that only png, gif, jpg and json resources are
> copied. This
> > is hard coded and I don’t like that approach. I would prefer
> something more
> > Maven style in which you have sources and resources.
> > This way everything in the resources could be copied instead of this
> hack
> > with hard-coded filters. A short fix would be to name your image
> „jpg“
> > instead of „jpeg“.
> >
> > The second thing is the „relativity to the main class“. It seems all
> > resources are addressed relative to the main class:
> >
> > File imageSrcDir = new File(configuration.getTargetFile()).
> > getAbsoluteFile().getParentFile();
> >
> > This sort of works as long as the Main class is in the root of the
> > project. This restriction however only seems to apply if you are
> using
> > Flash Builder. In my IntelliJ and Maven applications I usually put
> my Main
> > classes in packages.
> >
> > You can have a look at the code I’m talking about in
> MXMLFlexJSPublisher
> > (Lines 177-201 in my closure-classpath-sources branch or
> 149-152,407-421 in
> > the develop branch)
> >
> > Chris
> >
> >
> > Am 03.11.16, 23:10 schrieb "carlos.rovira@gmail.com im Auftrag von
> Carlos
> > Rovira" <carlos.rovira@gmail.com im Auftrag von
> carlosrovira@apache.org>:
> >
> > Hi Chris,
> >
> > I'm trying to test a simple <js:Image> in MDLExample without
> luck,
> > something like:
> >
> > <js:Image url="main/resources/Unknown.jpeg" width="220"
> height="140"/>
> >
> > is not working.
> >
> > I think the problem is maven is not copying the image asset to to
> > target
> > folder.
> >
> > I get it working with something like this:
> >
> > <js:Image url="../../../../src/main/resources/Unknown.jpeg"
> > width="220"
> > height="140"/>
> >
> > (reaching it from outside target and from the source project)
> >
> > Maybe I'm doing something wrong?
> >
> >
> >
> > --
> > Carlos Rovira
> > http://about.me/carlosrovira
> >
> >
> >
>
>
> --
>
> Carlos Rovira
> Director General
> M: +34 607 22 60 05
> http://www.codeoscopic.com
> http://www.avant2.es
>
>
> Este mensaje se dirige exclusivamente a su destinatario y puede
> contener
> información privilegiada o confidencial. Si ha recibido este mensaje
> por
> error, le rogamos que nos lo comunique inmediatamente por esta misma
> vía y
> proceda a su destrucción.
>
> De la vigente Ley Orgánica de Protección de Datos (15/1999), le
> comunicamos
> que sus datos forman parte de un fichero cuyo responsable es
> CODEOSCOPIC
> S.A. La finalidad de dicho tratamiento es facilitar la prestación del
> servicio o información solicitados, teniendo usted derecho de acceso,
> rectificación, cancelación y oposición de sus datos dirigiéndose a
> nuestras
> oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
> necesaria.
>
>
>
--
Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es
Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.
De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.
Re: [FlexJS][Maven] Missing assets in target folder
Posted by Carlos Rovira <ca...@codeoscopic.com>.
Hi Chris,
I tried your suggestion and changed the image extension to "jpg" to be
closer in my example, but after building I didn't find in target folder.
This should be in "target"? or maybe in a subfolder
(target/main/resourcers)?
2016-11-04 10:29 GMT+01:00 Christofer Dutz <ch...@c-ware.de>:
> Hi Carlos,
>
> just to be complete with my suggestion. Maven style would be to have
> sources, which are compiled in „src/main/flex“ and resources which are
> simply copied to the output in „src/main/resources“
>
> Chris
>
> Am 04.11.16, 10:13 schrieb "carlos.rovira@gmail.com im Auftrag von Carlos
> Rovira" <carlos.rovira@gmail.com im Auftrag von
> carlos.rovira@codeoscopic.com>:
>
> I think Chris is on the track on this issue.
>
> As a user, If I have a resource on a folder, is because I want it on
> final
> output, so I'll expect to be copied, since output folder is what I'll
> be
> putting on server (and not any source code related resource).
>
> btw, I think this should be IDE agnostic, and it scares me if we think
> it
> should depend on that. people should be able to use it from command
> line,
> so I think this is in the flexjs sdk domain.
>
> In traditional flex development:
>
> * I used a path like this "/assets/image.jpg" and that would work as
> an
> absolute path.
> * The other way is relative to the resource, without the first slash,
> and
> you can up and down the hierarchy starting from the source file in
> which
> you write that code.
>
> I use a maven style folder structure (so src/main/flex/App.mxml and so
> on),
> other will use src/App.mxml... we need to support all of this in a easy
> way, since this is basic.
>
> I think If users start to be kept in this basic things, is what could
> make
> them to not continue trying flexjs.
>
>
>
>
>
>
>
>
>
> 2016-11-04 8:04 GMT+01:00 Christofer Dutz <ch...@c-ware.de>:
>
> > Hi Carlos,
> >
> > I’m glad you are having this problem ☺ ... don’t get me wrong, but it
> > points out a problem I noticed when working on cleaning up the
> > MXMLFlexJSPublisher.
> > The problem is that only png, gif, jpg and json resources are
> copied. This
> > is hard coded and I don’t like that approach. I would prefer
> something more
> > Maven style in which you have sources and resources.
> > This way everything in the resources could be copied instead of this
> hack
> > with hard-coded filters. A short fix would be to name your image
> „jpg“
> > instead of „jpeg“.
> >
> > The second thing is the „relativity to the main class“. It seems all
> > resources are addressed relative to the main class:
> >
> > File imageSrcDir = new File(configuration.getTargetFile()).
> > getAbsoluteFile().getParentFile();
> >
> > This sort of works as long as the Main class is in the root of the
> > project. This restriction however only seems to apply if you are
> using
> > Flash Builder. In my IntelliJ and Maven applications I usually put
> my Main
> > classes in packages.
> >
> > You can have a look at the code I’m talking about in
> MXMLFlexJSPublisher
> > (Lines 177-201 in my closure-classpath-sources branch or
> 149-152,407-421 in
> > the develop branch)
> >
> > Chris
> >
> >
> > Am 03.11.16, 23:10 schrieb "carlos.rovira@gmail.com im Auftrag von
> Carlos
> > Rovira" <carlos.rovira@gmail.com im Auftrag von
> carlosrovira@apache.org>:
> >
> > Hi Chris,
> >
> > I'm trying to test a simple <js:Image> in MDLExample without
> luck,
> > something like:
> >
> > <js:Image url="main/resources/Unknown.jpeg" width="220"
> height="140"/>
> >
> > is not working.
> >
> > I think the problem is maven is not copying the image asset to to
> > target
> > folder.
> >
> > I get it working with something like this:
> >
> > <js:Image url="../../../../src/main/resources/Unknown.jpeg"
> > width="220"
> > height="140"/>
> >
> > (reaching it from outside target and from the source project)
> >
> > Maybe I'm doing something wrong?
> >
> >
> >
> > --
> > Carlos Rovira
> > http://about.me/carlosrovira
> >
> >
> >
>
>
> --
>
> Carlos Rovira
> Director General
> M: +34 607 22 60 05
> http://www.codeoscopic.com
> http://www.avant2.es
>
>
> Este mensaje se dirige exclusivamente a su destinatario y puede
> contener
> información privilegiada o confidencial. Si ha recibido este mensaje
> por
> error, le rogamos que nos lo comunique inmediatamente por esta misma
> vía y
> proceda a su destrucción.
>
> De la vigente Ley Orgánica de Protección de Datos (15/1999), le
> comunicamos
> que sus datos forman parte de un fichero cuyo responsable es
> CODEOSCOPIC
> S.A. La finalidad de dicho tratamiento es facilitar la prestación del
> servicio o información solicitados, teniendo usted derecho de acceso,
> rectificación, cancelación y oposición de sus datos dirigiéndose a
> nuestras
> oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
> necesaria.
>
>
>
--
Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es
Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.
De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.
Re: [FlexJS][Maven] Missing assets in target folder
Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Carlos,
just to be complete with my suggestion. Maven style would be to have sources, which are compiled in „src/main/flex“ and resources which are simply copied to the output in „src/main/resources“
Chris
Am 04.11.16, 10:13 schrieb "carlos.rovira@gmail.com im Auftrag von Carlos Rovira" <carlos.rovira@gmail.com im Auftrag von carlos.rovira@codeoscopic.com>:
I think Chris is on the track on this issue.
As a user, If I have a resource on a folder, is because I want it on final
output, so I'll expect to be copied, since output folder is what I'll be
putting on server (and not any source code related resource).
btw, I think this should be IDE agnostic, and it scares me if we think it
should depend on that. people should be able to use it from command line,
so I think this is in the flexjs sdk domain.
In traditional flex development:
* I used a path like this "/assets/image.jpg" and that would work as an
absolute path.
* The other way is relative to the resource, without the first slash, and
you can up and down the hierarchy starting from the source file in which
you write that code.
I use a maven style folder structure (so src/main/flex/App.mxml and so on),
other will use src/App.mxml... we need to support all of this in a easy
way, since this is basic.
I think If users start to be kept in this basic things, is what could make
them to not continue trying flexjs.
2016-11-04 8:04 GMT+01:00 Christofer Dutz <ch...@c-ware.de>:
> Hi Carlos,
>
> I’m glad you are having this problem ☺ ... don’t get me wrong, but it
> points out a problem I noticed when working on cleaning up the
> MXMLFlexJSPublisher.
> The problem is that only png, gif, jpg and json resources are copied. This
> is hard coded and I don’t like that approach. I would prefer something more
> Maven style in which you have sources and resources.
> This way everything in the resources could be copied instead of this hack
> with hard-coded filters. A short fix would be to name your image „jpg“
> instead of „jpeg“.
>
> The second thing is the „relativity to the main class“. It seems all
> resources are addressed relative to the main class:
>
> File imageSrcDir = new File(configuration.getTargetFile()).
> getAbsoluteFile().getParentFile();
>
> This sort of works as long as the Main class is in the root of the
> project. This restriction however only seems to apply if you are using
> Flash Builder. In my IntelliJ and Maven applications I usually put my Main
> classes in packages.
>
> You can have a look at the code I’m talking about in MXMLFlexJSPublisher
> (Lines 177-201 in my closure-classpath-sources branch or 149-152,407-421 in
> the develop branch)
>
> Chris
>
>
> Am 03.11.16, 23:10 schrieb "carlos.rovira@gmail.com im Auftrag von Carlos
> Rovira" <carlos.rovira@gmail.com im Auftrag von carlosrovira@apache.org>:
>
> Hi Chris,
>
> I'm trying to test a simple <js:Image> in MDLExample without luck,
> something like:
>
> <js:Image url="main/resources/Unknown.jpeg" width="220" height="140"/>
>
> is not working.
>
> I think the problem is maven is not copying the image asset to to
> target
> folder.
>
> I get it working with something like this:
>
> <js:Image url="../../../../src/main/resources/Unknown.jpeg"
> width="220"
> height="140"/>
>
> (reaching it from outside target and from the source project)
>
> Maybe I'm doing something wrong?
>
>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>
>
--
Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es
Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.
De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.
Re: [FlexJS][Maven] Missing assets in target folder
Posted by Carlos Rovira <ca...@codeoscopic.com>.
I think Chris is on the track on this issue.
As a user, If I have a resource on a folder, is because I want it on final
output, so I'll expect to be copied, since output folder is what I'll be
putting on server (and not any source code related resource).
btw, I think this should be IDE agnostic, and it scares me if we think it
should depend on that. people should be able to use it from command line,
so I think this is in the flexjs sdk domain.
In traditional flex development:
* I used a path like this "/assets/image.jpg" and that would work as an
absolute path.
* The other way is relative to the resource, without the first slash, and
you can up and down the hierarchy starting from the source file in which
you write that code.
I use a maven style folder structure (so src/main/flex/App.mxml and so on),
other will use src/App.mxml... we need to support all of this in a easy
way, since this is basic.
I think If users start to be kept in this basic things, is what could make
them to not continue trying flexjs.
2016-11-04 8:04 GMT+01:00 Christofer Dutz <ch...@c-ware.de>:
> Hi Carlos,
>
> I’m glad you are having this problem ☺ ... don’t get me wrong, but it
> points out a problem I noticed when working on cleaning up the
> MXMLFlexJSPublisher.
> The problem is that only png, gif, jpg and json resources are copied. This
> is hard coded and I don’t like that approach. I would prefer something more
> Maven style in which you have sources and resources.
> This way everything in the resources could be copied instead of this hack
> with hard-coded filters. A short fix would be to name your image „jpg“
> instead of „jpeg“.
>
> The second thing is the „relativity to the main class“. It seems all
> resources are addressed relative to the main class:
>
> File imageSrcDir = new File(configuration.getTargetFile()).
> getAbsoluteFile().getParentFile();
>
> This sort of works as long as the Main class is in the root of the
> project. This restriction however only seems to apply if you are using
> Flash Builder. In my IntelliJ and Maven applications I usually put my Main
> classes in packages.
>
> You can have a look at the code I’m talking about in MXMLFlexJSPublisher
> (Lines 177-201 in my closure-classpath-sources branch or 149-152,407-421 in
> the develop branch)
>
> Chris
>
>
> Am 03.11.16, 23:10 schrieb "carlos.rovira@gmail.com im Auftrag von Carlos
> Rovira" <carlos.rovira@gmail.com im Auftrag von carlosrovira@apache.org>:
>
> Hi Chris,
>
> I'm trying to test a simple <js:Image> in MDLExample without luck,
> something like:
>
> <js:Image url="main/resources/Unknown.jpeg" width="220" height="140"/>
>
> is not working.
>
> I think the problem is maven is not copying the image asset to to
> target
> folder.
>
> I get it working with something like this:
>
> <js:Image url="../../../../src/main/resources/Unknown.jpeg"
> width="220"
> height="140"/>
>
> (reaching it from outside target and from the source project)
>
> Maybe I'm doing something wrong?
>
>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>
>
--
Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es
Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.
De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.
Re: [FlexJS][Maven] Missing assets in target folder
Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Carlos,
I’m glad you are having this problem ☺ ... don’t get me wrong, but it points out a problem I noticed when working on cleaning up the MXMLFlexJSPublisher.
The problem is that only png, gif, jpg and json resources are copied. This is hard coded and I don’t like that approach. I would prefer something more Maven style in which you have sources and resources.
This way everything in the resources could be copied instead of this hack with hard-coded filters. A short fix would be to name your image „jpg“ instead of „jpeg“.
The second thing is the „relativity to the main class“. It seems all resources are addressed relative to the main class:
File imageSrcDir = new File(configuration.getTargetFile()).getAbsoluteFile().getParentFile();
This sort of works as long as the Main class is in the root of the project. This restriction however only seems to apply if you are using Flash Builder. In my IntelliJ and Maven applications I usually put my Main classes in packages.
You can have a look at the code I’m talking about in MXMLFlexJSPublisher (Lines 177-201 in my closure-classpath-sources branch or 149-152,407-421 in the develop branch)
Chris
Am 03.11.16, 23:10 schrieb "carlos.rovira@gmail.com im Auftrag von Carlos Rovira" <carlos.rovira@gmail.com im Auftrag von carlosrovira@apache.org>:
Hi Chris,
I'm trying to test a simple <js:Image> in MDLExample without luck,
something like:
<js:Image url="main/resources/Unknown.jpeg" width="220" height="140"/>
is not working.
I think the problem is maven is not copying the image asset to to target
folder.
I get it working with something like this:
<js:Image url="../../../../src/main/resources/Unknown.jpeg" width="220"
height="140"/>
(reaching it from outside target and from the source project)
Maybe I'm doing something wrong?
--
Carlos Rovira
http://about.me/carlosrovira
Re: [FlexJS][Maven] Missing assets in target folder
Posted by Josh Tynjala <jo...@gmail.com>.
You're probably right. It may not be the compiler. Regardless, I'm pretty
sure that whatever it is that handles templates for Flex SDK apps supports
a directory of files. I think that would be very useful for HTML apps so
that the index.html file can optionally come with supporting files like CSS
and images.
- Josh
On Thu, Nov 3, 2016 at 4:55 PM, Alex Harui <ah...@adobe.com> wrote:
>
>
> On 11/3/16, 3:54 PM, "Josh Tynjala" <jo...@gmail.com> wrote:
>
> >Could the -html-template be expanded to support more than a single file?
> >More like the Flex SDK? That would be a good way to include images, CSS,
> >and other stuff.
>
> Does the regular Flex SDK have some way to copy "other stuff"? I thought
> the IDEs had some way, but the MXMLC compiler didn't. I think I use Ant
> to copy "other stuff".
>
> -Alex
>
>
Re: [FlexJS][Maven] Missing assets in target folder
Posted by Alex Harui <ah...@adobe.com>.
On 11/3/16, 3:54 PM, "Josh Tynjala" <jo...@gmail.com> wrote:
>Could the -html-template be expanded to support more than a single file?
>More like the Flex SDK? That would be a good way to include images, CSS,
>and other stuff.
Does the regular Flex SDK have some way to copy "other stuff"? I thought
the IDEs had some way, but the MXMLC compiler didn't. I think I use Ant
to copy "other stuff".
-Alex
Re: [FlexJS][Maven] Missing assets in target folder
Posted by Josh Tynjala <jo...@gmail.com>.
Could the -html-template be expanded to support more than a single file?
More like the Flex SDK? That would be a good way to include images, CSS,
and other stuff.
- Josh
On Thu, Nov 3, 2016 at 3:34 PM, Alex Harui <ah...@adobe.com> wrote:
>
>
> On 11/3/16, 3:10 PM, "carlos.rovira@gmail.com on behalf of Carlos Rovira"
> <carlos.rovira@gmail.com on behalf of carlosrovira@apache.org> wrote:
>
> >Hi Chris,
> >
> >I'm trying to test a simple <js:Image> in MDLExample without luck,
> >something like:
> >
> ><js:Image url="main/resources/Unknown.jpeg" width="220" height="140"/>
> >
> >is not working.
> >
> >I think the problem is maven is not copying the image asset to to target
> >folder.
> >
> >I get it working with something like this:
> >
> ><js:Image url="../../../../src/main/resources/Unknown.jpeg" width="220"
> >height="140"/>
> >
> >(reaching it from outside target and from the source project)
> >
> >Maybe I'm doing something wrong?
>
> There was a recent thread on this. FalconJX only knows to copy things
> from an "assets" folder in the main class's folder. How should we specify
> other things to copy? Is there a Maven standard for copying "other stuff"?
>
> -Alex
>
>
Re: [FlexJS][Maven] Missing assets in target folder
Posted by Alex Harui <ah...@adobe.com>.
On 11/3/16, 3:10 PM, "carlos.rovira@gmail.com on behalf of Carlos Rovira"
<carlos.rovira@gmail.com on behalf of carlosrovira@apache.org> wrote:
>Hi Chris,
>
>I'm trying to test a simple <js:Image> in MDLExample without luck,
>something like:
>
><js:Image url="main/resources/Unknown.jpeg" width="220" height="140"/>
>
>is not working.
>
>I think the problem is maven is not copying the image asset to to target
>folder.
>
>I get it working with something like this:
>
><js:Image url="../../../../src/main/resources/Unknown.jpeg" width="220"
>height="140"/>
>
>(reaching it from outside target and from the source project)
>
>Maybe I'm doing something wrong?
There was a recent thread on this. FalconJX only knows to copy things
from an "assets" folder in the main class's folder. How should we specify
other things to copy? Is there a Maven standard for copying "other stuff"?
-Alex