geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Foster <jfos...@tmtsaz.com>
Subject Re: Geronimo v2.1 Plan Creator => Deploy Liferay 4.1.1
Date Fri, 14 Mar 2008 12:00:24 GMT


djencks wrote:
> 
> I ran into this too.  liferay is using activemq configured with xbean- 
> spring and our copy of activemq does not include xbean or spring in  
> its classloader.  So, you have to make sure liferay uses activemq  
> from its classloader instead of geronimo's classloader.
> 
> In my sample I did this by including this in the liferay-jetty plan:
> 
>      <environment>
>          <inverse-classloading/>
>      </environment>
> 
> which makes that module try to load stuff (such as activemq) from the  
> module before trying parent classloaders such as activemq-broker
> 
> and
> 
> <!-- replaces activemq jar in lib dir -->
>          <dependency>
>              <groupId>org.apache.activemq</groupId>
>              <artifactId>activemq-core</artifactId>
>              <type>jar</type>
>              <version>4.1.1</version>
>          </dependency>
> 
> 
> in liferay-jetty/pom.xml
> 
> and
> 
>                                  <!-- use geronimo dependencies  
> rather than inclusion for published artifacts -->
>                                  <exclude>WEB-INF/lib/activemq.jar</ 
> exclude>
> 
> in liferay-portal-lesslibs to remove the activemq jar from the  
> liferay war itself.
> 
> It looks to me as if all these steps are in the wiki page, but that  
> doesn't mean the process is easy to follow, and maybe I missed  
> something else that is required.... suggestions welcome.
> 
> thanks
> david jencks
> 
> 



Hi David,

As you said, I see that you have made some modifications to your wiki
instructions since I last revisited this, so I walked through all of this
again - from the top.

Following these steps in the wiki:

    [1] Preparation – find the artifacts
    [2] Set up a parent maven project
    [3] Repackage the liferay war
    [4] Build a database plugin
    [5] Build the liferay war plugin
    [6] Build an assembly
    [7] Run the project

All works well until [5].

If one does "mvn clean install" from the liferay-jetty directory after doing
all the modifications for step [5] as outlined in the wiki, one sees the
output listed at the bottom of this post as

    [1] COMMAND LINE:  liferay-parent/liferay-jetty>mvn clean install
  
In particular one see this:

    Missing:
    ----------
    1) com.liferay:portal-service:jar:${liferayVersion}
    2) com.liferay:portal-kernel:jar:${liferayVersion}

    
Not a problem, I thought, I will replace ${liferayVersion} with what
actually exists in my repository, meaning 4.4.1.

The result is what I have listed at the bottom of this post as

    [2] COMMAND LINE:  liferay-parent/liferay-jetty>mvn -e clean install
  
In particular one see this:

    [INFO]
------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO]
------------------------------------------------------------------------
    [INFO] null


I have to admit that I am totally without a clue on this one, though the
trace does point to the exception:

  org.apache.maven.lifecycle.LifecycleExecutionException


What do you think?


Jim



ATTACHMENTS BELOW:

  [1] COMMAND LINE:  liferay-parent/liferay-jetty>mvn clean install
  [2] COMMAND LINE:  liferay-parent/liferay-jetty>mvn -e clean install
    
    
==================================================================
[1] COMMAND LINE:  liferay-parent/liferay-jetty>mvn clean install

    where liferay-jetty/pom.xml contains:
    
    <dependencies>
        ...
        <dependency>
            <groupId>com.liferay</groupId>
            <artifactId>portal-kernel</artifactId>
            <version>${liferayVersion}</version>
        </dependency>
        <dependency>
            <groupId>com.liferay</groupId>
            <artifactId>portal-service</artifactId>
            <version>${liferayVersion}</version>
        </dependency>
        ...
    </dependencies>
==================================================================
[INFO] Scanning for projects...
[INFO]
----------------------------------------------------------------------------
[INFO] Building Unnamed -
org.apache.geronimo.plugins:liferay-jetty:car:1.0-SNAPSHOT
[INFO]    task-segment: [clean, install]
[INFO]
----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] snapshot org.apache.geronimo.framework:geronimo-plugin:2.2-SNAPSHOT:
checking for updates from apache-snapshots
[INFO] snapshot org.apache.geronimo.framework:geronimo-plugin:2.2-SNAPSHOT:
checking for updates from codehaus-snapshots
[INFO] snapshot org.apache.geronimo.framework:geronimo-plugin:2.2-SNAPSHOT:
checking for updates from apache.snapshots
[INFO] snapshot org.apache.geronimo.framework:modules:2.2-SNAPSHOT: checking
for updates from apache-snapshots
[INFO] snapshot org.apache.geronimo.framework:modules:2.2-SNAPSHOT: checking
for updates from codehaus-snapshots
[INFO] snapshot org.apache.geronimo.framework:modules:2.2-SNAPSHOT: checking
for updates from apache.snapshots
[INFO] snapshot org.apache.geronimo.framework:framework:2.2-SNAPSHOT:
checking for updates from apache-snapshots
[INFO] snapshot org.apache.geronimo.framework:framework:2.2-SNAPSHOT:
checking for updates from codehaus-snapshots
[INFO] snapshot org.apache.geronimo.framework:framework:2.2-SNAPSHOT:
checking for updates from apache.snapshots
[INFO] snapshot org.apache.geronimo.framework:geronimo-system:2.2-SNAPSHOT:
checking for updates from apache-snapshots
[INFO] snapshot org.apache.geronimo.framework:geronimo-system:2.2-SNAPSHOT:
checking for updates from codehaus-snapshots
[INFO] snapshot org.apache.geronimo.framework:geronimo-system:2.2-SNAPSHOT:
checking for updates from apache.snapshots
[INFO] snapshot org.apache.geronimo.framework:geronimo-cli:2.2-SNAPSHOT:
checking for updates from apache-snapshots
[INFO] snapshot org.apache.geronimo.framework:geronimo-cli:2.2-SNAPSHOT:
checking for updates from codehaus-snapshots
[INFO] snapshot org.apache.geronimo.framework:geronimo-cli:2.2-SNAPSHOT:
checking for updates from apache.snapshots
[INFO] snapshot org.apache.geronimo.framework:geronimo-kernel:2.2-SNAPSHOT:
checking for updates from apache-snapshots
[INFO] snapshot org.apache.geronimo.framework:geronimo-kernel:2.2-SNAPSHOT:
checking for updates from codehaus-snapshots
[INFO] snapshot org.apache.geronimo.framework:geronimo-kernel:2.2-SNAPSHOT:
checking for updates from apache.snapshots
[INFO] snapshot org.apache.geronimo.framework:geronimo-common:2.2-SNAPSHOT:
checking for updates from apache-snapshots
[INFO] snapshot org.apache.geronimo.framework:geronimo-common:2.2-SNAPSHOT:
checking for updates from codehaus-snapshots
[INFO] snapshot org.apache.geronimo.framework:geronimo-common:2.2-SNAPSHOT:
checking for updates from apache.snapshots
[INFO] snapshot org.apache.geronimo.framework:geronimo-crypto:2.2-SNAPSHOT:
checking for updates from apache-snapshots
[INFO] snapshot org.apache.geronimo.framework:geronimo-crypto:2.2-SNAPSHOT:
checking for updates from codehaus-snapshots
[INFO] snapshot org.apache.geronimo.framework:geronimo-crypto:2.2-SNAPSHOT:
checking for updates from apache.snapshots
Downloading:
http://download.java.net/maven/1//woodstox/poms/wstx-asl-3.2.1.pom
Downloading:
http://people.apache.org/repo/m2-incubating-repository//woodstox/wstx-asl/3.2.1/wstx-asl-3.2.1.pom
Downloading:
http://repo1.maven.org/maven2/woodstox/wstx-asl/3.2.1/wstx-asl-3.2.1.pom
Downloading:
http://repo1.maven.org/maven2/woodstox/wstx-asl/3.2.1/wstx-asl-3.2.1.pom
[INFO] snapshot
org.apache.geronimo.framework:geronimo-deploy-tool:2.2-SNAPSHOT: checking
for updates from apache-snapshots
[INFO] snapshot
org.apache.geronimo.framework:geronimo-deploy-tool:2.2-SNAPSHOT: checking
for updates from codehaus-snapshots
[INFO] snapshot
org.apache.geronimo.framework:geronimo-deploy-tool:2.2-SNAPSHOT: checking
for updates from apache.snapshots
[INFO] snapshot
org.apache.geronimo.framework:geronimo-service-builder:2.2-SNAPSHOT:
checking for updates from apache-snapshots
[INFO] snapshot
org.apache.geronimo.framework:geronimo-service-builder:2.2-SNAPSHOT:
checking for updates from codehaus-snapshots
[INFO] snapshot
org.apache.geronimo.framework:geronimo-service-builder:2.2-SNAPSHOT:
checking for updates from apache.snapshots
[INFO] snapshot
org.apache.geronimo.framework:geronimo-deployment:2.2-SNAPSHOT: checking for
updates from apache-snapshots
[INFO] snapshot
org.apache.geronimo.framework:geronimo-deployment:2.2-SNAPSHOT: checking for
updates from codehaus-snapshots
[INFO] snapshot
org.apache.geronimo.framework:geronimo-deployment:2.2-SNAPSHOT: checking for
updates from apache.snapshots
[INFO] snapshot
org.apache.geronimo.framework:geronimo-deploy-config:2.2-SNAPSHOT: checking
for updates from apache-snapshots
[INFO] snapshot
org.apache.geronimo.framework:geronimo-deploy-config:2.2-SNAPSHOT: checking
for updates from codehaus-snapshots
[INFO] snapshot
org.apache.geronimo.framework:geronimo-deploy-config:2.2-SNAPSHOT: checking
for updates from apache.snapshots
[INFO] [car:validate-configuration]
log4j:WARN No appenders could be found for logger
(org.codehaus.mojo.pluginsupport.logging.Logging).
log4j:WARN Please initialize the log4j system properly.
[INFO] [car:prepare-plan]
[INFO] Generated:
D:\Geronimo\liferay\liferay-parent\liferay-jetty\target\resources\META-INF\plan.xml
Downloading:
http://repo1.maven.org/maven2/axis/axis-jaxrpc/1.4/axis-jaxrpc-1.4.pom
Downloading:
http://repo1.maven.org/maven2/com/liferay/portal-kernel/${liferayVersion}/portal-kernel-${liferayVersion}.pom
Downloading:
http://repo1.maven.org/maven2/com/liferay/portal-service/${liferayVersion}/portal-service-${liferayVersion}.pom
Downloading:
http://repo1.maven.org/maven2/org/apache/tomcat/jasper/6.0.14-G614585/jasper-6.0.14-G614585.pom
Downloading:
http://repo1.maven.org/maven2/org/apache/tomcat/catalina/6.0.14-G614585/catalina-6.0.14-G614585.pom
Downloading:
http://repo1.maven.org/maven2/com/liferay/portal-service/${liferayVersion}/portal-service-${liferayVersion}.jar
Downloading:
http://repo1.maven.org/maven2/com/liferay/portal-kernel/${liferayVersion}/portal-kernel-${liferayVersion}.jar
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) com.liferay:portal-service:jar:${liferayVersion}

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=com.liferay
-DartifactId=portal-service \
          -Dversion=${liferayVersion} -Dpackaging=jar -Dfile=/path/to/file
  
  Alternatively, if you host your own repository you can deploy the file
there:
      mvn deploy:deploy-file -DgroupId=com.liferay
-DartifactId=portal-service \
          -Dversion=${liferayVersion} -Dpackaging=jar -Dfile=/path/to/file \
          -Durl=[url] -DrepositoryId=[id]

  Path to dependency:
        1) org.apache.geronimo.plugins:liferay-jetty:car:1.0-SNAPSHOT
        2) com.liferay:portal-service:jar:${liferayVersion}

2) com.liferay:portal-kernel:jar:${liferayVersion}

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=com.liferay
-DartifactId=portal-kernel \
          -Dversion=${liferayVersion} -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file
there:
mvn deploy:deploy-file -DgroupId=com.liferay -DartifactId=portal-kernel \
          -Dversion=${liferayVersion} -Dpackaging=jar -Dfile=/path/to/file \
           -Durl=[url] -DrepositoryId=[id]

  Path to dependency:
        1) org.apache.geronimo.plugins:liferay-jetty:car:1.0-SNAPSHOT
        2) com.liferay:portal-kernel:jar:${liferayVersion}

----------
2 required artifacts are missing.

for artifact:
  org.apache.geronimo.plugins:liferay-jetty:car:1.0-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)


[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 28 seconds
[INFO] Finished at: Fri Mar 14 04:03:00 MST 2008
[INFO] Final Memory: 40M/127M
[INFO]
------------------------------------------------------------------------



==================================================================
[2] COMMAND LINE:  liferay-parent/liferay-jetty>mvn -e clean install

    where liferay-jetty/pom.xml contains:
    
    <dependencies>
        ...
        <dependency>
            <groupId>com.liferay</groupId>
            <artifactId>portal-kernel</artifactId>
            <version>4.4.1</version>
        </dependency>
        <dependency>
            <groupId>com.liferay</groupId>
            <artifactId>portal-service</artifactId>
            <version>4.4.1</version>
        </dependency>
        ...
    </dependencies>
==================================================================

+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
----------------------------------------------------------------------------
[INFO] Building Unnamed -
org.apache.geronimo.plugins:liferay-jetty:car:1.0-SNAPSHOT
[INFO]    task-segment: [clean, install]
[INFO]
----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory
D:\Geronimo\liferay\liferay-parent\liferay-jetty\target
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
Downloading:
http://download.java.net/maven/1//woodstox/poms/wstx-asl-3.2.1.pom
Downloading:
http://people.apache.org/repo/m2-incubating-repository//woodstox/wstx-asl/3.2.1/wstx-asl-3.2.1.pom
Downloading:
http://repo1.maven.org/maven2/woodstox/wstx-asl/3.2.1/wstx-asl-3.2.1.pom
Downloading:
http://repo1.maven.org/maven2/woodstox/wstx-asl/3.2.1/wstx-asl-3.2.1.pom
[INFO] [car:validate-configuration]
log4j:WARN No appenders could be found for logger
(org.codehaus.mojo.pluginsupport.logging.Logging).
log4j:WARN Please initialize the log4j system properly.
[INFO] [car:prepare-plan]
[INFO] Generated:
D:\Geronimo\liferay\liferay-parent\liferay-jetty\target\resources\META-INF\plan.xml
Downloading:
http://repo1.maven.org/maven2/axis/axis-jaxrpc/1.4/axis-jaxrpc-1.4.pom
Downloading:
http://repo1.maven.org/maven2/com/liferay/portal-kernel/4.4.1/portal-kernel-4.4.1.pom
Downloading:
http://repo1.maven.org/maven2/com/liferay/portal-service/4.4.1/portal-service-4.4.1.pom
Downloading:
http://repo1.maven.org/maven2/org/apache/tomcat/jasper/6.0.14-G614585/jasper-6.0.14-G614585.pom
Downloading:
http://repo1.maven.org/maven2/org/apache/tomcat/catalina/6.0.14-G614585/catalina-6.0.14-G614585.pom
[INFO] [car:package]
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] null

[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.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:280)
        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)
Caused by: org.apache.maven.plugin.MojoExecutionException
        at
org.codehaus.mojo.pluginsupport.MojoSupport.execute(MojoSupport.java:137)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        ... 16 more
Caused by: java.lang.NullPointerException
        at
org.codehaus.mojo.pluginsupport.MojoSupport.fillMissingArtifactVersion(MojoSupport.java:342)
        at
org.codehaus.mojo.pluginsupport.MojoSupport.createArtifact(MojoSupport.java:216)
        at
org.codehaus.mojo.pluginsupport.MojoSupport.getArtifact(MojoSupport.java:258)
        at
org.apache.geronimo.mavenplugins.car.PackageMojo.doExecute(PackageMojo.java:222)
        at
org.codehaus.mojo.pluginsupport.MojoSupport.execute(MojoSupport.java:122)
        ... 18 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 14 seconds
[INFO] Finished at: Fri Mar 14 04:47:10 MST 2008
[INFO] Final Memory: 42M/127M
[INFO]
------------------------------------------------------------------------



-- 
View this message in context: http://www.nabble.com/Geronimo-v2.1-Plan-Creator-%3D%3E-Deploy-Liferay-4.1.1-tp15437773s134p16048064.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message