aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Problems building ear with maven2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Problems building ear with maven2" Watch "Problems building ear with maven2" New topic
Author

Problems building ear with maven2

Nick Bhatt
Greenhorn

Joined: May 14, 2008
Posts: 6
I am trying to build an ear for a j2ee project and am using ejbdeploy goal from the was6 maven plugin to generate the stubs. The problem arises when maven is trying to exceute the ejbdeploy goal. Following is the stack trace:

[INFO] [was6:ejbdeploy {execution: default}]
[INFO] Unknown argument: -
[INFO] ant [options] [target [target2 [target3] ...]]
[INFO] Options:
[INFO] -help, -h print this message
[INFO] -projecthelp, -p print project help information
[INFO] -version print the version information and exit
[INFO] -diagnostics print information that might be helpful to
[INFO] diagnose or report problems.
[INFO] -quiet, -q be extra quiet
[ERROR]
[INFO] -verbose, -v be extra verbose
[INFO] -debug, -d print debugging information
[INFO] -emacs, -e produce logging information without adornments
[INFO] -lib <path> specifies a path to search for jars and classes
[INFO] -logfile <file> use given file for log
[INFO] -l <file> ''
[INFO] -logger <classname> the class which is to perform logging
[INFO] -listener <classname> add an instance of class as a project listener
[INFO] -noinput do not allow interactive input
[INFO] -buildfile <file> use given buildfile
[INFO] -file <file> ''
[INFO] -f <file> ''
[INFO] -D<property>=<value> use value for given property
[INFO] -keep-going, -k execute all targets that do not depend
[INFO] on failed target(s)
[INFO] -propertyfile <name> load all properties from file with -D
[INFO] properties taking precedence
[INFO] -inputhandler <class> the class which will handle input requests
[INFO] -find <file> (s)earch for buildfile towards the root of
[INFO] -s <file> the filesystem and use it
[INFO] -nice number A niceness value for the main thread:
[INFO] 1 (lowest) to 10 (highest); 5 is the default
[INFO] -nouserlib Run ant without using the jar files from
[INFO] ${user.home}/.ant/lib
[INFO] -noclasspath Run ant without using CLASSPATH
[INFO] Return code: 0
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Deployment failed - see previous errors
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Deployment failed - see
previous errors
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:564)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:480)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:459)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Deployment failed - s
ee previous errors
at org.codehaus.mojo.was6.EjbDeployMojo.execute(EjbDeployMojo.java:194)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:443)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:539)
... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7 seconds


Anybody run across this kind of issue earlier? Am using maven 2.0.6. Upgrading is not an option now.

Here is the relevant portion of the ejb pom....

<plugin>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.1</version>
<configuration>
<ejbVersion>2.0</ejbVersion>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>was6-maven-plugin</artifactId>
<version>${was6.plugin.version}</version>
<executions>
<execution>
<goals>
<goal>ejbdeploy</goal>
</goals>
</execution>
</executions>
<configuration>
<wasHome>${was.6.home}</wasHome>
<legacyMode>${was6.plugin.legacy-mode}</legacyMode>
</configuration>
</plugin>
</plugins>


David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Please UseCodeTags.

It looks like Maven isn't being called correctly.
Nick Bhatt
Greenhorn

Joined: May 14, 2008
Posts: 6
I am trying to build an ear for a j2ee project and am using ejbdeploy goal from the was6 maven plugin to generate the stubs. The problem arises when maven is trying to exceute the ejbdeploy goal. Following is the stack trace:



Anybody run across this kind of issue earlier? Am using maven 2.0.6. Upgrading is not an option now.

Here is the relevant portion of the ejb pom....
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

It looks like Maven isn't being called correctly.
Nick Bhatt
Greenhorn

Joined: May 14, 2008
Posts: 6
I am using the call mvn package......this is getting built in one machine but failing on another....using was6.1 and jdk 1.5
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

[INFO] [was6:ejbdeploy {execution: default}]
[INFO] Unknown argument: -


Probably the value of was.6.home or was6.plugin.legacy-mode isn't set correctly?


[My Blog] [JavaRanch Journal]
Nick Bhatt
Greenhorn

Joined: May 14, 2008
Posts: 6
Got it solved......The error was that there was a space in the name of one of the parent dirs for the parent pom. Thats why it was giving that weird ant error.Hope this helps somebody in the future.
 
jQuery in Action, 2nd edition
 
subject: Problems building ear with maven2