jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x WebSphere 6 Plugin
  • MWAS-50

Plugin does not work with a artifact with a classifier

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: In Progress In Progress
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.1
  • Fix Version/s: 1.2
  • Labels:
    None

Description

When I run the plugin with a artifact with a classifier it does not work because WASHOME is not found whereas in other case it works nice.

[INFO] Building jar: /opt/apache-tomcat-5.5.26_Intg/webapps/hudson/jobs/SITE_PEC_EAR_MultiWar/workspace/target/pec-web-ear-3.14.0.0.4-test-alm.ear
[INFO] [was6:wsDefaultBindings {execution: pre-integration-test-was6}]
[WARNING] Build script does not contain attribute: wasHome

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>was6-maven-plugin</artifactId>
−
<executions>
−
<execution>
<id>pre-integration-test-was6</id>
<phase>pre-integration-test</phase>
−
<goals>
<goal>wsDefaultBindings</goal>
<goal>installApp</goal>
<goal>wsStartApp</goal>
</goals>
</execution>
−
<execution>
<id>post-integration-test-was6</id>
<phase>post-integration-test</phase>
−
<goals>
<goal>wsStopApp</goal>
<goal>wsUninstallApp</goal>
</goals>
</execution>
</executions>
−
<configuration>
<host>${was6.host}</host>
<targetCell>${was6.targetCell}</targetCell>
<targetNode>${was6.targetNode}</targetNode>
<targetServer>server1</targetServer>
<profileName>${was6.profileName}</profileName>
<node>${targetNode}</node>
<server>${targetServer}</server>
<conntype>${was6.conntype}</conntype>
<port>${was6.port}</port>
<wasHome>${was6.wasHome}</wasHome>
<verbose>true</verbose>
<updateExisting>false</updateExisting>
</configuration>
</plugin>

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Java Source File
    EjbDeployMojo.java
    08/Mar/10 4:21 AM
    11 kB
    Kim Heftø

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
David J. M. Karlsen added a comment - 07/Sep/09 12:00 PM

The warning is innocent.
Can you attach more log?

Show
David J. M. Karlsen added a comment - 07/Sep/09 12:00 PM The warning is innocent. Can you attach more log?
Hide
Permalink
fabrice added a comment - 21/Sep/09 3:20 AM - edited

Ok :

[INFO] Building jar: /opt/apache-tomcat-5.5.26_Intg/webapps/hudson/jobs/EAR_MultiWar/workspace/target/ear-3.14.0.0.4-test.ear
[INFO] [was6:wsDefaultBindings {execution: pre-integration-test-was6}]
[WARNING] Build script does not contain attribute: wasHome
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
at org.codehaus.mojo.was6.WsDefaultBindingsMojo.configureBuildScript(WsDefaultBindingsMojo.java:111)
at org.codehaus.mojo.was6.AbstractWas6Mojo.getBuildScript(AbstractWas6Mojo.java:180)
at org.codehaus.mojo.was6.AbstractWas6Mojo.getCommandline(AbstractWas6Mojo.java:274)
at org.codehaus.mojo.was6.AbstractWas6Mojo.execute(AbstractWas6Mojo.java:322)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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)

Show
fabrice added a comment - 21/Sep/09 3:20 AM - edited Ok : [INFO] Building jar: /opt/apache-tomcat-5.5.26_Intg/webapps/hudson/jobs/EAR_MultiWar/workspace/target/ear-3.14.0.0.4-test.ear [INFO] [was6:wsDefaultBindings {execution: pre-integration-test-was6}] [WARNING] Build script does not contain attribute: wasHome [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] null [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.NullPointerException at org.codehaus.mojo.was6.WsDefaultBindingsMojo.configureBuildScript(WsDefaultBindingsMojo.java:111) at org.codehaus.mojo.was6.AbstractWas6Mojo.getBuildScript(AbstractWas6Mojo.java:180) at org.codehaus.mojo.was6.AbstractWas6Mojo.getCommandline(AbstractWas6Mojo.java:274) at org.codehaus.mojo.was6.AbstractWas6Mojo.execute(AbstractWas6Mojo.java:322) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) 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)
Hide
Permalink
David J. M. Karlsen added a comment - 21/Sep/09 6:42 AM

Hmm, this means that the earFile variable is null:
line 111: if ( !( earFile.canRead() && earFile.canWrite() ) )

Can you attach the pom as well?

Show
David J. M. Karlsen added a comment - 21/Sep/09 6:42 AM Hmm, this means that the earFile variable is null: line 111: if ( !( earFile.canRead() && earFile.canWrite() ) ) Can you attach the pom as well?
Hide
Permalink
David J. M. Karlsen added a comment - 21/Sep/09 7:31 AM

OK - I understand - send it to david@davidkarlsen.com
I won't disclose it.

Show
David J. M. Karlsen added a comment - 21/Sep/09 7:31 AM OK - I understand - send it to david@davidkarlsen.com I won't disclose it.
Hide
Permalink
Hubert Wagener added a comment - 04/Nov/09 1:21 PM

Also in ejbDeploy usage of classifier cause failure:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>was6-maven-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<goals>
<goal>ejbdeploy</goal>
</goals>
</execution>
</executions>
<configuration>
<wasHome>${env.WAS_HOME}</wasHome>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.1</version>
<configuration>
<ebjVersion>2.1</ebjVersion>
<classifier>pure</classifier>
</configuration>
</plugin>

Execution yields:
[INFO] [wsejbdeploy] Input options error: The input filename must end in '.jar' or '.ear'. It was D:\Transfer\localTests\testframework-was61\target\classes..

Also in the anttaskdefs we have:
<wsEjbDeploy inputJar="D:\Transfer\localTests\Kopie von testframework-was61\target\classes" .....

executedProject.getArtifact.getFile() does not get to the jar generated by ejbdeploy, that actually is target/testframework-was61-0.0.1-SNAPSHOT-pure.jar in our case.

Show
Hubert Wagener added a comment - 04/Nov/09 1:21 PM Also in ejbDeploy usage of classifier cause failure: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>was6-maven-plugin</artifactId> <version>1.1.1</version> <executions> <execution> <goals> <goal>ejbdeploy</goal> </goals> </execution> </executions> <configuration> <wasHome>${env.WAS_HOME}</wasHome> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ejb-plugin</artifactId> <version>2.1</version> <configuration> <ebjVersion>2.1</ebjVersion> <classifier>pure</classifier> </configuration> </plugin> Execution yields: [INFO] [wsejbdeploy] Input options error: The input filename must end in '.jar' or '.ear'. It was D:\Transfer\localTests\testframework-was61\target\classes.. Also in the anttaskdefs we have: <wsEjbDeploy inputJar="D:\Transfer\localTests\Kopie von testframework-was61\target\classes" ..... executedProject.getArtifact.getFile() does not get to the jar generated by ejbdeploy, that actually is target/testframework-was61-0.0.1-SNAPSHOT-pure.jar in our case.
Hide
Permalink
Kim Heftø added a comment - 05/Mar/10 2:07 AM

Have anyone found a workaround for this problem. My Maven script is producing ejb jars for both WebSphere and Weblogic, and I want to distinguish between the two with a classifier, but unfortunatley im also getting the problem mentioned above.

Show
Kim Heftø added a comment - 05/Mar/10 2:07 AM Have anyone found a workaround for this problem. My Maven script is producing ejb jars for both WebSphere and Weblogic, and I want to distinguish between the two with a classifier, but unfortunatley im also getting the problem mentioned above.
Hide
Permalink
Kim Heftø added a comment - 08/Mar/10 4:21 AM

This is a fix for bug MWAS-50. In order to make the plugin respect the classifier, it needs to be specified both in the maven-ejb-plugin and in the was6-maven-plugin like this:

<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>was6-maven-plugin</artifactId>
<version>1.1.2</version>
<executions>
<execution>
<goals>
<goal>ejbdeploy</goal>
</goals>
</execution>
</executions>
<configuration>
<classifier>was</classifier>
</configuration>
</plugin>
<plugin>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<classifier>was</classifier>
</configuration>
</plugin>
</plugins>

Show
Kim Heftø added a comment - 08/Mar/10 4:21 AM This is a fix for bug MWAS-50. In order to make the plugin respect the classifier, it needs to be specified both in the maven-ejb-plugin and in the was6-maven-plugin like this: <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>was6-maven-plugin</artifactId> <version>1.1.2</version> <executions> <execution> <goals> <goal>ejbdeploy</goal> </goals> </execution> </executions> <configuration> <classifier>was</classifier> </configuration> </plugin> <plugin> <artifactId>maven-ejb-plugin</artifactId> <configuration> <classifier>was</classifier> </configuration> </plugin> </plugins>
Hide
Permalink
Luis Figueirido added a comment - 02/Aug/10 8:43 AM

Hi,
I've just had the same issue and tried with versions 1.1.1 and 1.2-SNAPSHOT (1.1.2 doesn't seem to exist?), without luck...

Is there any solution to this issue?
Thanks,
Luis

Show
Luis Figueirido added a comment - 02/Aug/10 8:43 AM Hi, I've just had the same issue and tried with versions 1.1.1 and 1.2-SNAPSHOT (1.1.2 doesn't seem to exist?), without luck... Is there any solution to this issue? Thanks, Luis
Hide
Permalink
Luis Figueirido added a comment - 02/Aug/10 9:43 AM

I can confirm that the EjbDeployMojo.java file attached by Kim fixes the issue... could someone create version 1.1.2 with this fix? or add it to 1.2-SNAPSHOT.
Thanks,
Luis

Show
Luis Figueirido added a comment - 02/Aug/10 9:43 AM I can confirm that the EjbDeployMojo.java file attached by Kim fixes the issue... could someone create version 1.1.2 with this fix? or add it to 1.2-SNAPSHOT. Thanks, Luis
Hide
Permalink
Javier Murciego added a comment - 26/Dec/11 5:11 PM

The patch has been added to 1.2-SNAPSHOT and will be released soon. I've added Kim to the list of contributors.

Show
Javier Murciego added a comment - 26/Dec/11 5:11 PM The patch has been added to 1.2-SNAPSHOT and will be released soon. I've added Kim to the list of contributors.

People

  • Assignee:
    Javier Murciego
    Reporter:
    fabrice
Vote (2)
Watch (2)

Dates

  • Created:
    07/Sep/09 8:31 AM
    Updated:
    26/Dec/11 5:30 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.