New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems trying to include client side resources with SDK 3 beta 5 #430

Open
douglascrp opened this Issue Nov 9, 2016 · 5 comments

Comments

Projects
None yet
6 participants
@douglascrp
Contributor

douglascrp commented Nov 9, 2016

I'm trying to use the SDK3 beta 5 in a project I'm working on, and I'm facing some problems with client side resources.
The first one is that for new client side files, I'm trying to put them inside the /src/main/resources/META-INF/resources/, but my files are not available when I try to access them.

I have configured the moduleDependency type as amp, as described at https://docs.google.com/document/d/1p5QR1Q8pVvMT9fh_aID5nraD5NP6ZrU1ztcgE_zHR-4/pub#h.b4by66les1tp

As this didn't work, I then tried to put the same files inside /src/main/assembly/web
By doing this, I got the files deployed correctly.
Javascript files are ok, but PNG files got corrupted.

The pom files says

<nonFilteredFileExtensions> <!-- jpg, jpeg, gif, bmp and png are added automatically -->

but it seems that is not true.
I even tried to add png into the list, but that also didn't help.
The png files are going to be used as indicators in the document library.

I hope you can replicate the issues.

@douglascrp

This comment has been minimized.

Show comment
Hide comment
@douglascrp

douglascrp Nov 11, 2016

Contributor

I was able to make it work by setting the filtered option as false in the section bellow inside the amp.xml file:

<fileSet>
    <directory>src/main/assembly/web</directory>
    <outputDirectory>web</outputDirectory>
    <filtered>false</filtered> <!-- Will filter files and substitute POM props such as for example ${project.name} -->
    <excludes>
        <exclude>README.md</exclude>
    </excludes>
</fileSet>

Thanks @wrighting for the tip.

Wouldn't it be possible to add the maven-resources-plugin nonFilteredFileExtensions option in this file also?

Contributor

douglascrp commented Nov 11, 2016

I was able to make it work by setting the filtered option as false in the section bellow inside the amp.xml file:

<fileSet>
    <directory>src/main/assembly/web</directory>
    <outputDirectory>web</outputDirectory>
    <filtered>false</filtered> <!-- Will filter files and substitute POM props such as for example ${project.name} -->
    <excludes>
        <exclude>README.md</exclude>
    </excludes>
</fileSet>

Thanks @wrighting for the tip.

Wouldn't it be possible to add the maven-resources-plugin nonFilteredFileExtensions option in this file also?

@jgoldhammer jgoldhammer added this to the 3.0.0 milestone Nov 27, 2016

@jgoldhammer jgoldhammer added the bug label Nov 27, 2016

@marsv024

This comment has been minimized.

Show comment
Hide comment
@marsv024

marsv024 Dec 7, 2016

Contributor

Just as a comment, I was able to access a css-file which I added under META-INF/resources/css/test.css

This did map to localhost:8080/share/css/test.css for me.

Contributor

marsv024 commented Dec 7, 2016

Just as a comment, I was able to access a css-file which I added under META-INF/resources/css/test.css

This did map to localhost:8080/share/css/test.css for me.

@douglascrp

This comment has been minimized.

Show comment
Hide comment
@douglascrp

douglascrp Dec 7, 2016

Contributor

@marsv024 Odd. It didn't work at all for me.
Well, let's wait to see if they can find something about this issue.
Thank you for your test.

Contributor

douglascrp commented Dec 7, 2016

@marsv024 Odd. It didn't work at all for me.
Well, let's wait to see if they can find something about this issue.
Thank you for your test.

@ohej ohej modified the milestones: 3.0.1, 3.0.0 Mar 31, 2017

@douglascrp

This comment has been minimized.

Show comment
Hide comment
@douglascrp

douglascrp Apr 21, 2017

Contributor

@ohej
I have just tested this agains 3.0.0 (and also with 3.0.1-SNAPSHOT build locally) and the same problem happens.
The only way to get rid of it is by changing the filtered property inside the amp.xml file as described in my comment previously.

Contributor

douglascrp commented Apr 21, 2017

@ohej
I have just tested this agains 3.0.0 (and also with 3.0.1-SNAPSHOT build locally) and the same problem happens.
The only way to get rid of it is by changing the filtered property inside the amp.xml file as described in my comment previously.

@eyaroslavtsev

This comment has been minimized.

Show comment
Hide comment
@eyaroslavtsev

eyaroslavtsev May 17, 2017

@marsv024 It works for me, thanks.
There is not the clear solution (for src/main/assembly/web directory), but in my sample project I used to the following maven-assembly-plugin config:

<fileSets>
        <!-- Anything in the assembly/web directory will end up in the /web directory in the AMP -->
        <fileSet>
            <directory>src/main/assembly/web</directory>
            <outputDirectory>web</outputDirectory>
            <filtered>true</filtered> <!-- Will filter files and substitute POM props such as for example ${project.name} -->
            <includes>
                <include>**/*.*</include>
            </includes>
            <excludes>
                <exclude>README.md</exclude>
                <exclude>**/*.jpg</exclude>
                <exclude>**/*.jpeg</exclude>
                <exclude>**/*.gif</exclude>
                <exclude>**/*.bmp</exclude>
                <exclude>**/*.ftl</exclude>
                <exclude>**/*.acp</exclude>
                <exclude>**/*.svg</exclude>
                <exclude>**/*.pdf</exclude>
                <exclude>**/*.doc</exclude>
                <exclude>**/*.docx</exclude>
                <exclude>**/*.xls</exclude>
                <exclude>**/*.xlsx</exclude>
                <exclude>**/*.png</exclude>
                <exclude>**/*.ppt</exclude>
                <exclude>**/*.pptx</exclude>
                <exclude>**/*.bin</exclude>
                <exclude>**/*.lic</exclude>
                <exclude>**/*.swf</exclude>
                <exclude>**/*.zip</exclude>
                <exclude>**/*.msg</exclude>
                <exclude>**/*.jar</exclude>
                <exclude>**/*.ttf</exclude>
                <exclude>**/*.eot</exclude>
                <exclude>**/*.woff</exclude>
                <exclude>**/*.woff2</exclude>
                <exclude>**/*.ico</exclude>
                <exclude>**/*.psd</exclude>
            </excludes>
        </fileSet>
        <fileSet>
            <directory>src/main/assembly/web</directory>
            <outputDirectory>web</outputDirectory>
            <filtered>false</filtered>
            <includes>
                <include>**/*.jpg</include>
                <include>**/*.jpeg</include>
                <include>**/*.gif</include>
                <include>**/*.bmp</include>
                <include>**/*.ftl</include>
                <include>**/*.acp</include>
                <include>**/*.svg</include>
                <include>**/*.pdf</include>
                <include>**/*.doc</include>
                <include>**/*.docx</include>
                <include>**/*.xls</include>
                <include>**/*.xlsx</include>
                <include>**/*.png</include>
                <include>**/*.ppt</include>
                <include>**/*.pptx</include>
                <include>**/*.bin</include>
                <include>**/*.lic</include>
                <include>**/*.swf</include>
                <include>**/*.zip</include>
                <include>**/*.msg</include>
                <include>**/*.jar</include>
                <include>**/*.ttf</include>
                <include>**/*.eot</include>
                <include>**/*.woff</include>
                <include>**/*.woff2</include>
                <include>**/*.ico</include>
                <include>**/*.psd</include>
            </includes>
        </fileSet>
    </fileSets>

Does anyone have a clear solution?

eyaroslavtsev commented May 17, 2017

@marsv024 It works for me, thanks.
There is not the clear solution (for src/main/assembly/web directory), but in my sample project I used to the following maven-assembly-plugin config:

<fileSets>
        <!-- Anything in the assembly/web directory will end up in the /web directory in the AMP -->
        <fileSet>
            <directory>src/main/assembly/web</directory>
            <outputDirectory>web</outputDirectory>
            <filtered>true</filtered> <!-- Will filter files and substitute POM props such as for example ${project.name} -->
            <includes>
                <include>**/*.*</include>
            </includes>
            <excludes>
                <exclude>README.md</exclude>
                <exclude>**/*.jpg</exclude>
                <exclude>**/*.jpeg</exclude>
                <exclude>**/*.gif</exclude>
                <exclude>**/*.bmp</exclude>
                <exclude>**/*.ftl</exclude>
                <exclude>**/*.acp</exclude>
                <exclude>**/*.svg</exclude>
                <exclude>**/*.pdf</exclude>
                <exclude>**/*.doc</exclude>
                <exclude>**/*.docx</exclude>
                <exclude>**/*.xls</exclude>
                <exclude>**/*.xlsx</exclude>
                <exclude>**/*.png</exclude>
                <exclude>**/*.ppt</exclude>
                <exclude>**/*.pptx</exclude>
                <exclude>**/*.bin</exclude>
                <exclude>**/*.lic</exclude>
                <exclude>**/*.swf</exclude>
                <exclude>**/*.zip</exclude>
                <exclude>**/*.msg</exclude>
                <exclude>**/*.jar</exclude>
                <exclude>**/*.ttf</exclude>
                <exclude>**/*.eot</exclude>
                <exclude>**/*.woff</exclude>
                <exclude>**/*.woff2</exclude>
                <exclude>**/*.ico</exclude>
                <exclude>**/*.psd</exclude>
            </excludes>
        </fileSet>
        <fileSet>
            <directory>src/main/assembly/web</directory>
            <outputDirectory>web</outputDirectory>
            <filtered>false</filtered>
            <includes>
                <include>**/*.jpg</include>
                <include>**/*.jpeg</include>
                <include>**/*.gif</include>
                <include>**/*.bmp</include>
                <include>**/*.ftl</include>
                <include>**/*.acp</include>
                <include>**/*.svg</include>
                <include>**/*.pdf</include>
                <include>**/*.doc</include>
                <include>**/*.docx</include>
                <include>**/*.xls</include>
                <include>**/*.xlsx</include>
                <include>**/*.png</include>
                <include>**/*.ppt</include>
                <include>**/*.pptx</include>
                <include>**/*.bin</include>
                <include>**/*.lic</include>
                <include>**/*.swf</include>
                <include>**/*.zip</include>
                <include>**/*.msg</include>
                <include>**/*.jar</include>
                <include>**/*.ttf</include>
                <include>**/*.eot</include>
                <include>**/*.woff</include>
                <include>**/*.woff2</include>
                <include>**/*.ico</include>
                <include>**/*.psd</include>
            </includes>
        </fileSet>
    </fileSets>

Does anyone have a clear solution?

@ohej ohej modified the milestones: 3.0.2, 3.0.1 Jun 23, 2017

DarkStar1 added a commit to magenta-aps/htmlthumbnail that referenced this issue Jul 10, 2017

1 - Enabled amp building
2 - changed filtered value in amp.xml.false due to issue reported: Alfresco/alfresco-sdk#430 (comment)

DarkStar1 added a commit to magenta-aps/alfresco-share-iframe-preview that referenced this issue Jul 10, 2017

DarkStar1 added a commit to magenta-aps/alfresco-share-libreoffice-online-module that referenced this issue Jul 19, 2017

DarkStar1 added a commit to magenta-aps/alfresco-repo-libreoffice-online-module that referenced this issue Jul 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment