Solved

help with deploying a war file to the local jboss server using maven

Posted on 2014-03-14
8
2,758 Views
Last Modified: 2014-03-31
Hi,

I am trying to use the Maven to deploy the war file to the local JBoss server.
I don't have access to the Mojo or Condo(?? just had it ) or any other plugins other than
jboss-as-maven-plugin.
I read online that you still can do this with jboss-as-maven-plugin.
When I run this, I am getting this error message:
deployment failed: repository element was not specified in the POM insdie distributionManagement element or in -DaltdeploymentRespository=id::layout::url parameter

<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.1.1</version>
				<configuration>
					<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
					<warName>${plugin.war.warName}</warName>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.jboss.as.plugins</groupId>
				<artifactId>jboss-as-maven-plugin</artifactId>
				<configuration>
					<force>true</force>
					<jboss_Home>C:\Servers\jboss-jpp-6.0.0\jboss-jpp-6.0\standalone\deployments</jboss_Home>
		
					<serverName>Standalone</serverName>
					<targetDir>target</targetDir>
					<hostname>${jboss.as.deploy.hostname}</hostname>
					<username>${jboss.as.deploy.username}</username>
					<password>${jboss.as.deploy.password}</password>
					<fileNames>
						<fileName>target/${plugin.war.warName}.war</fileName>
					</fileNames>                 
					
				</configuration>
			</plugin>

		</plugins>

Open in new window

0
Comment
Question by:dkim18
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 39933809
i deployed the war in jboss-as-web-7.0.1.Final  version .

i ran the pom.xml using the goal as jboss-as:deploy in eclipse then the war is deploy in the server.if you need to deploy the war in remote system then use the tag as hostname otherwise below tags are enough to deploy in local jboss.

<plugin>
				<groupId>org.jboss.as.plugins</groupId>
				<artifactId>jboss-as-maven-plugin</artifactId>
              <configuration>
            <jbossHome>D:\jboss-as-web-7.0.1.Final\standalone\deployments</jbossHome>
             <serverName>standalone</serverName>
          </configuration>

Open in new window

0
 

Author Comment

by:dkim18
ID: 39933940
No plugin found for prefix 'jboss-as' in the current project and in the
plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the r
epositories [local (C:\Users\xxxx\.m2\repository), nexus (http://xxxxxxxx:8
081/nexus/content/groups/public)] -> [Help 1]

This is the error I am getting, when I do mvn jboss-as:deploy.

I have th jboss-as-maven-plugin-7.4.Final.jar in the repository.
0
 
LVL 20

Accepted Solution

by:
chaitu chaitu earned 500 total points
ID: 39933960
are you using same pom.xml that as mine.
<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.1.1</version>
				<configuration>
					<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
					<warName>${plugin.war.warName}</warName>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.jboss.as.plugins</groupId>
				<artifactId>jboss-as-maven-plugin</artifactId>
              <configuration>
             <jbossHome>D:\jboss-as-web-7.0.1.Final\standalone\deployments</jbossHome>
             <serverName>standalone</serverName>
          </configuration>
			
       	</plugin>

		</plugins>

Open in new window

0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

Author Comment

by:dkim18
ID: 39934032
<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.1.1</version>
				<configuration>
					<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
					<warName>${plugin.war.warName}</warName>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.jboss.as.plugins</groupId>
				<artifactId>jboss-as-maven-plugin</artifactId>
				<version>7.4.Final</version>
				
				<configuration>
					<force>true</force>
					<jbossHome>C:\Dev\Servers\jboss-jpp-6.0.0\jboss-jpp-6.0\standalone\deployments</jbossHome>		
					<serverName>standalone</serverName>						
					<fileNames>
						<fileName>target/${plugin.war.warName}.war</fileName>
					</fileNames>      
					
				</configuration>
			</plugin>

		</plugins>

Open in new window

0
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 39934084
remove <version>7.4.Final</version> and  below tag.

<fileNames>
                                    <fileName>target/${plugin.war.warName}.war</fileName>
                              </fileNames>
0
 

Author Comment

by:dkim18
ID: 39934098
<plugin>
				<groupId>org.jboss.as.plugins</groupId>
				<artifactId>jboss-as-maven-plugin</artifactId>
				<configuration>
					<jbossHome>C:\Dev\Servers\jboss-jpp-6.0.0\jboss-jpp-6.0\standalone\deployments</jbossHome>
					<serverName>standalone</serverName>					
				</configuration>
			</plugin>

Open in new window



Tried about and getting the same error.
I found more error info...

[WARNING] The POM for org.jboss.as.plugins:jboss-as-maven-plugin:jar:7.4.Final i
s missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.jboss.as.plugins:jboss-as
-maven-plugin:7.4.Final: Plugin org.jboss.as.plugins:jboss-as-maven-plugin:7.4.F
inal or one of its dependencies could not be resolved: Failed to read artifact d
escriptor for org.jboss.as.plugins:jboss-as-maven-plugin:jar:7.4.Final
[WARNING] The POM for org.jboss.as.plugins:jboss-as-maven-plugin:jar:7.4.Final i
s missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.jboss.as.plugins:jboss-as
-maven-plugin:7.4.Final: Plugin org.jboss.as.plugins:jboss-as-maven-plugin:7.4.F
inal or one of its dependencies could not be resolved: Failed to read artifact d
escriptor for org.jboss.as.plugins:jboss-as-maven-plugin:jar:7.4.Final
Downloading: http://xx:8081/nexus/content/groups/public/org/apache/mav
en/plugins/maven-metadata.xml
Downloading: http://xxx:8081/nexus/content/groups/public/org/codehaus/m
ojo/maven-metadata.xml
Downloaded: http://xxx:8081/nexus/content/groups/public/org/codehaus/mo
jo/maven-metadata.xml (2 KB at 1.3 KB/sec)
Downloaded: http://xx:8081/nexus/content/groups/public/org/apache/mave
n/plugins/maven-metadata.xml (1005 B at 1.1 KB/sec)

Open in new window



Sounds like I am missing a descriptor file or something in my jboss-as-maven-plugin folder.
I only have a jar file in there.
0
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 39934140
it seems there is some problem while downloading jars from nexus/content/groups/public/org/codehaus. i think  you are downloading jars from nexus repository.check your maven settings.xml file.

but my jars are downloaded from central maven repository.
0
 

Author Comment

by:dkim18
ID: 39934192
yes..I am getting them from our Nexus repository web server.
I will check.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
In this post we will learn different types of Android Layout and some basics of an Android App.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question