Skip to content
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

Upload static content into file storage #111

Closed
JonathanGiles opened this issue Mar 14, 2018 · 2 comments
Closed

Upload static content into file storage #111

JonathanGiles opened this issue Mar 14, 2018 · 2 comments

Comments

@JonathanGiles
Copy link

Should the maven plugin upload static content, e.g. html files, etc as part of the function upload, such that they can be accessed and returned from function calls? Perhaps this is already supported, but I can't find any documentation about where to place the html files so that they are submitted.

@JonathanGiles
Copy link
Author

I managed to get this to work by editing the pom.xml file in my project. I added an additional resource as highlighted below:

            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <overwrite>true</overwrite>
                            <outputDirectory>${project.build.directory}/azure-functions/${functionAppName}
                            </outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${project.basedir}</directory>
                                    <includes>
                                        <include>host.json</include>
                                        <include>local.settings.json</include>
                                    </includes>
                                </resource>

                                <!-- Relevant addition here -->
                                <resource>
                                    <directory>${project.basedir}/src/main/resources</directory>
                                    <includes>
                                        <include>www/**</include>
                                    </includes>
                                </resource>
                               <!-- end of addition here -->

                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>```

It might be beneficial to comment on this in the documentation that you'll prepare, or to consider adding something like this by default.

@jdneo
Copy link
Member

jdneo commented Apr 24, 2018

Hi @JonathanGiles . We have updated the doc for this issue: https://github.com/Microsoft/azure-maven-plugins/tree/master/azure-functions-maven-plugin#common-questions

Thank you for reporting this. 😄

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

No branches or pull requests

2 participants