Re: Needs help about maven-woproject-plugin

From: Josef Vanek (palla..ree.fr)
Date: Fri Nov 03 2006 - 10:33:11 EST

  • Next message: Chuck Hill: "Re: Best Practices for Managing the Classpath?"

    Hello Uli

    Still sorry to bother you, now I almost cried victory when I saw
    that the mvn package goal doesn't generate the artifactId-version.jar

    The one I had in the target directory came from my previous attempts
    when I had jar defined as packaging tag.
    Now I made a clean-all and misery, the jar is not created.
    I have no exception, at exec everything seems to be ok, an
    artifactId.framework is created in the target directory, but no jar... :-(

    Josef

    --
    Open WebMail Project (http://openwebmail.org)
    

    ---------- Original Message ----------- From: Ulrich Köster <ulric..bjectstyle.org> To: woproject-de..bjectstyle.org Sent: Fri, 3 Nov 2006 13:37:05 +0100 Subject: Re: Needs help about maven-woproject-plugin

    > Moin Josef, > > thank you for the patch. > > The framework is only a temporary build artifact. You should use the > artifactid-version.jar. > > WO will recognize the jar as a framework bundle. > > uli > Am 03.11.2006 um 12:21 schrieb Josef Vanek: > > > Hello Uli > > > > Many, many thanks. I checkouted the latest revision right now (3559 > > main trunk > > about 12h00 GMT+1) and it seems to work. > > I don't have the exception anymore, however the built framework is not > > as I expected. It contains only resources and not the jar. However > > I think > > this is mostly a problem of configuration in my POM file. > > It would be great to have a sample POM file for a framework and > > woapplication > > on the objectstyle wiki with ALL options enbabled in order to see > > what can be > > done directly in the pom. > > > > I attached the patch to fix the bootstrap problem on Win platform. > > > > Josef > > > > -- > > Open WebMail Project (http://openwebmail.org) > > > > ---------- Original Message ----------- > > From: Ulrich Köster <ulric..bjectstyle.org> > > To: woproject-de..bjectstyle.org > > Sent: Fri, 3 Nov 2006 11:48:51 +0100 > > Subject: Re: Needs help about maven-woproject-plugin > > > >> Moin Josef, > >> > >> don't forget to send me a patch!. Does the exception occur with the > >> latest maven-woproject-plugin? > >> > >> Uli > >> Am 03.11.2006 um 09:45 schrieb Josef Vanek: > >> > >>> Hi all > >>> > >>> First my apologies and explanations: I'm a total newbie to maven2 > >>> but actually > >>> I don't have the time to RTFM and I urgently need to get things > >>> working. > >>> > >>> I work on a large WebObjects 5.2.4 JavaClient project (dev with > >>> Eclipse/WOLips > >>> on WinXP platform, deploy on Linux RedHat Enterprise). We started > >>> first with > >>> ant build.xml scripts and we managed to get things compiled and > >>> packed. Then I > >>> started to write maven 1.x POMs and I managed to get things work > >>> too beceause > >>> maven.xml scripts were here to allow me doing such tricks such as > >>> copying > >>> resources where I wanted them to, etc. > >>> Now my chief wants me to move on maven2. I started to play with, I > >>> downloaded > >>> the maven-woproject-plugin but things just don't seem to work or I > >>> didn't > >>> understand something. > >>> > >>> I found the mvn woproject:bootstrap command don't work on Windows > >>> platform > >>> anymore beceause the getenv instruction was deprecated (I tried > >>> jdks 1.4.2_10 > >>> and 1.5.0_08). So I connected on your svn repository, checkouted > >>> all the > >>> woproject trunk and tried as well as I could to fix this by > >>> replacing the > >>> getenv call by a System.getProperty one. By the way I think that on > >>> PDO > >>> platforms (Linux/Solaris), one could do exactly the same thing: get > >>> the system > >>> property next.root instead of getenv("NEXT_ROOT"). > >>> Doing this I got woproject:bootstrap working. > >>> > >>> Then I created a small project aka Hello World and wanted it to > >>> compile, > >>> package and create a woframework. And here things became messy. > >>> Here is my POM : > >>> > >>> <?xml version="1.0" encoding="UTF-8"?> > >>> <project xmlns="http://maven.apache.org/POM/4.0.0" > >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > >>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > >>> http://maven.apache.org/maven-v4_0_0.xsd"> > >>> <modelVersion>4.0.0</modelVersion> > >>> <groupId>org.hello.world.test</groupId> > >>> <artifactId>test</artifactId> > >>> <name>Maven Test Archetype</name> > >>> <version>1.0-SNAPSHOT</version> > >>> <url>http://maven.apache.org> > >>> <packaging>woframework</packaging> > >>> <properties> > >>> <woa>false</woa> > >>> </properties> > >>> <repositories> > >>> <repository> > >>> <id>central</id> > >>> <name>Maven Repository Switchboard</name> > >>> <layout>default</layout> > >>> <url>http://www.ibiblio.org/maven2> > >>> <snapshots> > >>> <enabled>false</enabled> > >>> </snapshots> > >>> </repository> > >>> <repository> > >>> <id>mojo</id> > >>> <name>Maven Mojo Repository</name> > >>> <layout>default</layout> > >>> <url>http://repository.codehaus.org/> > >>> <snapshots> > >>> <enabled>false</enabled> > >>> </snapshots> > >>> </repository> > >>> </repositories> > >>> <build> > >>> <sourceDirectory>src/main/java</sourceDirectory> > >>> <scriptSourceDirectory>src/main/scripts</scriptSourceDirectory> > >>> <testSourceDirectory>src/test/java</testSourceDirectory> > >>> <resources> > >>> <resource> <directory>${basedir}/src/resources</directory> > >>> <includes> > >>> <include>**/*.properties</include> > >>> <include>**/*.wo/**</include> > >>> <include>**/*.api</include> > >>> </includes> > >>> <filtering>false</filtering> > >>> <targetPath>Resources</targetPath> > >>> </resource> > >>> </resources> > >>> <plugins> > >>> <plugin> > >>> <groupId>org.apache.maven.plugins</groupId> > >>> <artifactId>maven-compiler-plugin</artifactId> > >>> <configuration> > >>> <source>1.5</source> > >>> <target>1.5</target> > >>> </configuration> > >>> </plugin> > >>> <plugin> <groupId>org.objectstyle.woproject.maven2</groupId> > >>> <artifactId>maven-woproject-plugin</artifactId> > >>> <version>2.0-SNAPSHOT</version> > >>> <extensions>true</extensions> > >>> </plugin> > >>> </plugins> > >>> </build> > >>> </project> > >>> > >>> > >>> It seems good to me as it is, but when I launch mvn package, I > >>> get the > >>> following exception : > >>> > >>> [ERROR] BUILD ERROR > >>> [INFO] > >>> -------------------------------------------------------------------- > >>> -- > >>> -- > >>> [INFO] Cannot find lifecycle mapping for packaging: 'woframework'. > >>> Component descriptor cannot be found in the component repository: > >>> org.apache.maven.lifecycle.mapping.LifecycleMappingwoframework. > >>> [INFO] > >>> -------------------------------------------------------------------- > >>> -- > >>> -- > >>> [INFO] Trace > >>> org.apache.maven.lifecycle.LifecycleExecutionException: Cannot find > >>> lifecycle > >>> mapping for packaging: 'woframework'. > >>> at > >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.findMappingsForL > >>> if > >>> ecycle(DefaultLifecycleExecutor.java:1066) > >>> at > >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindLifecycleFor > >>> Pa > >>> ckaging(DefaultLifecycleExecutor.java:992) > >>> at > >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecyc > >>> le > >>> Mappings(DefaultLifecycleExecutor.java:975) > >>> at > >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal > >>> (DefaultLifecycleExecutor.java:453) > >>> at > >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHa > >>> nd > >>> leFailures(DefaultLifecycleExecutor.java:306) > >>> at > >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegme > >>> nt > >>> s(DefaultLifecycleExecutor.java:273) > >>> at > >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute > >>> (DefaultLifecycleExecutor.java:140) > >>> at org.apache.maven.DefaultMaven.doExecute > >>> (DefaultMaven.java:322) > >>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java: > >>> 115) > >>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) > >>> 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.codehaus.plexus.component.repository.exception.ComponentLookupEx > >>> ce > >>> ption: > >>> Component descriptor cannot be found in the component repository: > >>> org.apache.maven.lifecycle.mapping.LifecycleMappingwoframework. > >>> at > >>> org.codehaus.plexus.DefaultPlexusContainer.lookup > >>> (DefaultPlexusContainer.java:323) > >>> at > >>> org.codehaus.plexus.DefaultPlexusContainer.lookup > >>> (DefaultPlexusContainer.java:440) > >>> at org.apache.maven.execution.MavenSession.lookup > >>> (MavenSession.java:120) > >>> at > >>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.findMappingsForL > >>> if > >>> ecycle(DefaultLifecycleExecutor.java:1059) > >>> ... 17 more > >>> [INFO] > >>> -------------------------------------------------------------------- > >>> -- > >>> -- > >>> > >>> > >>> > >>> Please help with this ! What am I doing wrong ? > >>> > >>> > >>> -- > >>> Open WebMail Project (http://openwebmail.org) > >>> > > ------- End of Original Message ------- > > > > <WindowsWebobjectsLocator.patch.gz> ------- End of Original Message -------



    This archive was generated by hypermail 2.0.0 : Fri Nov 03 2006 - 10:33:18 EST