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

Create a websphere liberty profile #25

Open
johnament opened this issue Sep 23, 2016 · 4 comments
Open

Create a websphere liberty profile #25

johnament opened this issue Sep 23, 2016 · 4 comments

Comments

@johnament
Copy link
Contributor

We should have a Websphere Liberty profile maven profile available, so that users can download and run automatically.

I'm not sure if we can reach out to someone at IBM? I know there's an arquillian container, would be great if it could be auto downloaded.

@Emily-Jiang
Copy link
Member

Emily-Jiang commented Apr 25, 2018

@johnament sorry for taking so long to respond.. This issue somehow was overlooked. What do you mean by saying WebSphere liberty profile? Have you tried our Open Liberty maven plugin? See the following example.

<plugin>
                <groupId>net.wasdev.wlp.maven.plugins</groupId>
                <artifactId>liberty-maven-plugin</artifactId>
                <version>2.0</version>
                <configuration>
                    <assemblyArtifact>
                        <groupId>io.openliberty</groupId>
                        <artifactId>openliberty-runtime</artifactId>
                        <version>LATEST</version>
                        <type>zip</type>
                    </assemblyArtifact>
                    <configFile>src/main/liberty/config/server.xml</configFile>
                    <packageFile>${package.file}</packageFile>
                    <include>${packaging.type}</include>
                    <bootstrapProperties>
                        <default.http.port>${testServerHttpPort}</default.http.port>
                        <default.https.port>${testServerHttpsPort}</default.https.port>
                    </bootstrapProperties>
                </configuration>
                <executions>
                    <execution>
                        <id>install-liberty</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>install-server</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>install-app</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>install-apps</goal>
                        </goals>
                        <configuration>
                            <looseApplication>true</looseApplication>
                            <stripVersion>true</stripVersion>
                            <installAppPackages>project</installAppPackages>
                        </configuration>
                    </execution>
                    <execution>
                        <id>start-server</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>start-server</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>stop-server</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>stop-server</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>package-app</id>
                        <phase>package</phase>
                        <goals>
                            <goal>package-server</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>target/wlp-package</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

@tevans78
Copy link

I think a little more work than that is needed to update the sample instructions on how to both test and run using Liberty

@johnament
Copy link
Contributor Author

Right, if you look at https://github.com/eclipse/microprofile-samples/blob/master/pom.xml#L379 there's profiles per vendor. The idea would be to add liberty to this profile so that a user can come here and run it with liberty (ideally it should include all dependencies to run the app, without the user having installed liberty first, but really up to your requirements/limitations)

@johnament
Copy link
Contributor Author

BTW, maven team recommends against the use of LATEST, and I believe they're actually removing support for it soon. I believe this is supported solution: https://stackoverflow.com/questions/30571/how-do-i-tell-maven-to-use-the-latest-version-of-a-dependency/1172805#1172805

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

3 participants