Can you please let me know how to configure liberty server to deploy Ant build war file
Can someone let me know steps to configure Liberty server to automatically pick the ant build war file from specified location within project folder and deploy the same under liberty server runtime.
ant websphere-liberty
add a comment |
Can someone let me know steps to configure Liberty server to automatically pick the ant build war file from specified location within project folder and deploy the same under liberty server runtime.
ant websphere-liberty
add a comment |
Can someone let me know steps to configure Liberty server to automatically pick the ant build war file from specified location within project folder and deploy the same under liberty server runtime.
ant websphere-liberty
Can someone let me know steps to configure Liberty server to automatically pick the ant build war file from specified location within project folder and deploy the same under liberty server runtime.
ant websphere-liberty
ant websphere-liberty
asked Jan 3 at 5:37
DmettaDmetta
163
163
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Using the Liberty Ant tasks defined at the WASdev/ci.ant project, you could deploy a WAR with something like this:
<project xmlns:wlp="antlib:net.wasdev.wlp.ant" name="net.wasdev.wlp.ant.it">
<path id="wlp-ant-tasks.classpath">
<fileset dir="${basedir}/../../../../target" includes="wlp-anttasks-*.jar" />
</path>
<typedef resource="net/wasdev/wlp/ant/antlib.xml" uri="antlib:net.wasdev.wlp.ant" classpathref="wlp-ant-tasks.classpath" />
<property name="target.dir" value="${basedir}/../install-server-it/target" />
<!-- Defining server configuration -->
<property name="wlp.install.dir" value="${target.dir}/wlp" />
<property name="wlp.usr.dir" value="${target.dir}/wlp_usr" />
<property name="wlp.output.dir" value="${target.dir}/wlp_output" />
<property name="servername" value="deploy.war" />
<target name="deploy">
<wlp:server id="testServer" installDir="${wlp.install.dir}" serverName="${servername}" userDir="${wlp.usr.dir}" outputDir="${wlp.output.dir}" operation="status" />
<wlp:server ref="testServer" operation="start" />
<wlp:deploy ref="testServer">
<fileset dir="${basedir}/../../setup/test-war/target">
<include name="*.war" />
</fileset>
</wlp:deploy>
</target>
</project>
You can get the wlp-anttasks-*.jar from Maven Central here or build it locally by cloning the WASdev/ci.ant project and doing a Maven build.
Note: I took the example above from the integration test here. See the documentation here for more details on the tasks and their attributes, etc.
This answer assumes you want to deploy using an Ant build. However, one could also interpret your question as "I did an Ant build to build the WAR, now I just want to deploy it somehow." If the latter is the case, you could use the maven-antrun-plugin within a Maven project that uses the liberty-maven-plugin developed at WASdev/ci.maven
– Scott Kurz
Jan 3 at 21:58
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54016864%2fcan-you-please-let-me-know-how-to-configure-liberty-server-to-deploy-ant-build-w%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Using the Liberty Ant tasks defined at the WASdev/ci.ant project, you could deploy a WAR with something like this:
<project xmlns:wlp="antlib:net.wasdev.wlp.ant" name="net.wasdev.wlp.ant.it">
<path id="wlp-ant-tasks.classpath">
<fileset dir="${basedir}/../../../../target" includes="wlp-anttasks-*.jar" />
</path>
<typedef resource="net/wasdev/wlp/ant/antlib.xml" uri="antlib:net.wasdev.wlp.ant" classpathref="wlp-ant-tasks.classpath" />
<property name="target.dir" value="${basedir}/../install-server-it/target" />
<!-- Defining server configuration -->
<property name="wlp.install.dir" value="${target.dir}/wlp" />
<property name="wlp.usr.dir" value="${target.dir}/wlp_usr" />
<property name="wlp.output.dir" value="${target.dir}/wlp_output" />
<property name="servername" value="deploy.war" />
<target name="deploy">
<wlp:server id="testServer" installDir="${wlp.install.dir}" serverName="${servername}" userDir="${wlp.usr.dir}" outputDir="${wlp.output.dir}" operation="status" />
<wlp:server ref="testServer" operation="start" />
<wlp:deploy ref="testServer">
<fileset dir="${basedir}/../../setup/test-war/target">
<include name="*.war" />
</fileset>
</wlp:deploy>
</target>
</project>
You can get the wlp-anttasks-*.jar from Maven Central here or build it locally by cloning the WASdev/ci.ant project and doing a Maven build.
Note: I took the example above from the integration test here. See the documentation here for more details on the tasks and their attributes, etc.
This answer assumes you want to deploy using an Ant build. However, one could also interpret your question as "I did an Ant build to build the WAR, now I just want to deploy it somehow." If the latter is the case, you could use the maven-antrun-plugin within a Maven project that uses the liberty-maven-plugin developed at WASdev/ci.maven
– Scott Kurz
Jan 3 at 21:58
add a comment |
Using the Liberty Ant tasks defined at the WASdev/ci.ant project, you could deploy a WAR with something like this:
<project xmlns:wlp="antlib:net.wasdev.wlp.ant" name="net.wasdev.wlp.ant.it">
<path id="wlp-ant-tasks.classpath">
<fileset dir="${basedir}/../../../../target" includes="wlp-anttasks-*.jar" />
</path>
<typedef resource="net/wasdev/wlp/ant/antlib.xml" uri="antlib:net.wasdev.wlp.ant" classpathref="wlp-ant-tasks.classpath" />
<property name="target.dir" value="${basedir}/../install-server-it/target" />
<!-- Defining server configuration -->
<property name="wlp.install.dir" value="${target.dir}/wlp" />
<property name="wlp.usr.dir" value="${target.dir}/wlp_usr" />
<property name="wlp.output.dir" value="${target.dir}/wlp_output" />
<property name="servername" value="deploy.war" />
<target name="deploy">
<wlp:server id="testServer" installDir="${wlp.install.dir}" serverName="${servername}" userDir="${wlp.usr.dir}" outputDir="${wlp.output.dir}" operation="status" />
<wlp:server ref="testServer" operation="start" />
<wlp:deploy ref="testServer">
<fileset dir="${basedir}/../../setup/test-war/target">
<include name="*.war" />
</fileset>
</wlp:deploy>
</target>
</project>
You can get the wlp-anttasks-*.jar from Maven Central here or build it locally by cloning the WASdev/ci.ant project and doing a Maven build.
Note: I took the example above from the integration test here. See the documentation here for more details on the tasks and their attributes, etc.
This answer assumes you want to deploy using an Ant build. However, one could also interpret your question as "I did an Ant build to build the WAR, now I just want to deploy it somehow." If the latter is the case, you could use the maven-antrun-plugin within a Maven project that uses the liberty-maven-plugin developed at WASdev/ci.maven
– Scott Kurz
Jan 3 at 21:58
add a comment |
Using the Liberty Ant tasks defined at the WASdev/ci.ant project, you could deploy a WAR with something like this:
<project xmlns:wlp="antlib:net.wasdev.wlp.ant" name="net.wasdev.wlp.ant.it">
<path id="wlp-ant-tasks.classpath">
<fileset dir="${basedir}/../../../../target" includes="wlp-anttasks-*.jar" />
</path>
<typedef resource="net/wasdev/wlp/ant/antlib.xml" uri="antlib:net.wasdev.wlp.ant" classpathref="wlp-ant-tasks.classpath" />
<property name="target.dir" value="${basedir}/../install-server-it/target" />
<!-- Defining server configuration -->
<property name="wlp.install.dir" value="${target.dir}/wlp" />
<property name="wlp.usr.dir" value="${target.dir}/wlp_usr" />
<property name="wlp.output.dir" value="${target.dir}/wlp_output" />
<property name="servername" value="deploy.war" />
<target name="deploy">
<wlp:server id="testServer" installDir="${wlp.install.dir}" serverName="${servername}" userDir="${wlp.usr.dir}" outputDir="${wlp.output.dir}" operation="status" />
<wlp:server ref="testServer" operation="start" />
<wlp:deploy ref="testServer">
<fileset dir="${basedir}/../../setup/test-war/target">
<include name="*.war" />
</fileset>
</wlp:deploy>
</target>
</project>
You can get the wlp-anttasks-*.jar from Maven Central here or build it locally by cloning the WASdev/ci.ant project and doing a Maven build.
Note: I took the example above from the integration test here. See the documentation here for more details on the tasks and their attributes, etc.
Using the Liberty Ant tasks defined at the WASdev/ci.ant project, you could deploy a WAR with something like this:
<project xmlns:wlp="antlib:net.wasdev.wlp.ant" name="net.wasdev.wlp.ant.it">
<path id="wlp-ant-tasks.classpath">
<fileset dir="${basedir}/../../../../target" includes="wlp-anttasks-*.jar" />
</path>
<typedef resource="net/wasdev/wlp/ant/antlib.xml" uri="antlib:net.wasdev.wlp.ant" classpathref="wlp-ant-tasks.classpath" />
<property name="target.dir" value="${basedir}/../install-server-it/target" />
<!-- Defining server configuration -->
<property name="wlp.install.dir" value="${target.dir}/wlp" />
<property name="wlp.usr.dir" value="${target.dir}/wlp_usr" />
<property name="wlp.output.dir" value="${target.dir}/wlp_output" />
<property name="servername" value="deploy.war" />
<target name="deploy">
<wlp:server id="testServer" installDir="${wlp.install.dir}" serverName="${servername}" userDir="${wlp.usr.dir}" outputDir="${wlp.output.dir}" operation="status" />
<wlp:server ref="testServer" operation="start" />
<wlp:deploy ref="testServer">
<fileset dir="${basedir}/../../setup/test-war/target">
<include name="*.war" />
</fileset>
</wlp:deploy>
</target>
</project>
You can get the wlp-anttasks-*.jar from Maven Central here or build it locally by cloning the WASdev/ci.ant project and doing a Maven build.
Note: I took the example above from the integration test here. See the documentation here for more details on the tasks and their attributes, etc.
edited Jan 4 at 6:22
answered Jan 3 at 13:36
Scott KurzScott Kurz
3,21611028
3,21611028
This answer assumes you want to deploy using an Ant build. However, one could also interpret your question as "I did an Ant build to build the WAR, now I just want to deploy it somehow." If the latter is the case, you could use the maven-antrun-plugin within a Maven project that uses the liberty-maven-plugin developed at WASdev/ci.maven
– Scott Kurz
Jan 3 at 21:58
add a comment |
This answer assumes you want to deploy using an Ant build. However, one could also interpret your question as "I did an Ant build to build the WAR, now I just want to deploy it somehow." If the latter is the case, you could use the maven-antrun-plugin within a Maven project that uses the liberty-maven-plugin developed at WASdev/ci.maven
– Scott Kurz
Jan 3 at 21:58
This answer assumes you want to deploy using an Ant build. However, one could also interpret your question as "I did an Ant build to build the WAR, now I just want to deploy it somehow." If the latter is the case, you could use the maven-antrun-plugin within a Maven project that uses the liberty-maven-plugin developed at WASdev/ci.maven
– Scott Kurz
Jan 3 at 21:58
This answer assumes you want to deploy using an Ant build. However, one could also interpret your question as "I did an Ant build to build the WAR, now I just want to deploy it somehow." If the latter is the case, you could use the maven-antrun-plugin within a Maven project that uses the liberty-maven-plugin developed at WASdev/ci.maven
– Scott Kurz
Jan 3 at 21:58
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54016864%2fcan-you-please-let-me-know-how-to-configure-liberty-server-to-deploy-ant-build-w%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown