Re: custom packaging problem
Hi, I found a workaround. I use the version 2.2 of plexus-archiver instead of version 2.3. Guillaume Boucherie 2008/7/2 Guillaume Boucherie <[EMAIL PROTECTED]>: > Hi all, > > I'm trying to make my own packaging type for my skin project. > So I create a plugin with a components.xml that define my ArtifactHandler > and my LifecycleMapping. > But when I launch an mvn clean install on a project with my own packaging I > have the following error : > > [FATAL ERROR] com.ideo.maven.plugins.skin.SkinBundledMojo#execute() caused > a linkage error (java.lang.IncompatibleClassChangeError) and may be > out-of-date. Check the realms: > [FATAL ERROR] Plugin realm = > app0.child-container[com.ideo.maven.plugins:maven-skin-plugin] > urls[0] = > file:/E:/tools/maven/repository-maven2/com/ideo/maven/plugins/maven-skin-plugin/1.0-SNAPSHOT/maven-skin-plugin-1.0-SNAPSHOT.jar > urls[1] = > file:/E:/tools/maven/repository-maven2/org/apache/maven/maven-archiver/2.3/maven-archiver-2.3.jar > urls[2] = > file:/E:/tools/maven/repository-maven2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar > urls[3] = > file:/E:/tools/maven/repository-maven2/org/codehaus/plexus/plexus-archiver/1.0-alpha-9/plexus-archiver-1.0-alpha-9.jar > urls[4] = > file:/E:/tools/maven/repository-maven2/org/codehaus/plexus/plexus-component-api/1.0-alpha-15/plexus-component-api-1.0-alpha-15.jar > > urls[5] = > file:/E:/tools/maven/repository-maven2/org/codehaus/plexus/plexus-classworlds/1.2-alpha-6/plexus-classworlds-1.2-alpha-6.jar > urls[6] = > file:/E:/tools/maven/repository-maven2/org/codehaus/plexus/plexus-io/1.0-alpha-1/plexus-io-1.0-alpha-1.jar > [FATAL ERROR] Container realm = plexus.core > urls[0] = file:/E:/tools/maven/maven-2.0.9/lib/maven-2.0.9-uber.jar > urls[1] = > file:/E:/tools/maven/repository-maven2/com/ideo/sweetdev/sweetdev-build-tools/1.0/sweetdev-build-tools-1.0.jar > urls[2] = > file:/E:/tools/maven/repository-maven2/com/ideo/maven/ideo-build-tools/1.0/ideo-build-tools-1.0.jar > [INFO] > > [ERROR] FATAL ERROR > [INFO] > > [INFO] Class org.codehaus.plexus.logging.console.ConsoleLogger does not > implement the requested interface org.codehaus.plexus.logging.Logger > > [INFO] > > [INFO] Trace > java.lang.IncompatibleClassChangeError: Class > org.codehaus.plexus.logging.console.ConsoleLogger does not implement the > requested interface org.codehaus.plexus.logging.Logger > at > org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:318) > at > org.codehaus.plexus.archiver.zip.AbstractZipArchiver.execute(AbstractZipArchiver.java:242) > at > org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:673) > at > com.ideo.maven.plugins.skin.SkinBundledMojo.performPackaging(SkinBundledMojo.java:143) > at > com.ideo.maven.plugins.skin.SkinBundledMojo.execute(SkinBundledMojo.java:124) > 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:597) > 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) > > Can someone help me please ? > Thanks > > Guillaume Boucherie >
Re: Custom packaging question
"Eric Redmond" <[EMAIL PROTECTED]> writes: > I wrote a little bit about it here - though I suppose it wouldn't hurt going > into more depth. > > http://www.sonatype.com/book/repository.html#tips_and_tricks > > Please read, and request any clarifications so I can fix the book. Thanks :) > Hello, Thanks for the pointer, I have read it before but could not put my hands on it. I still have a problem. I defined the following custom artifacthandler and lifecycle: oqube.maven.patch.mojo.Transporter default oqube.maven.patch.mojo.DefaultTransporter org.apache.maven.lifecycle.mapping.LifecycleMapping patch org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping oqube.maven:patch-maven-plugin:fetch,oqube.maven:patch-maven-plugin:patch org.apache.maven.plugins:maven-resources-plugin:resources org.apache.maven.plugins:maven-compiler-plugin:compile org.apache.maven.plugins:maven-resources-plugin:testResources org.apache.maven.plugins:maven-compiler-plugin:testCompile org.apache.maven.plugins:maven-surefire-plugin:test org.apache.maven.plugins:maven-jar-plugin:jar org.apache.maven.plugins:maven-install-plugin:install org.apache.maven.plugins:maven-deploy-plugin:deploy org.apache.maven.artifact.handler.ArtifactHandler patch org.apache.maven.artifact.handler.DefaultArtifactHandler patch jar patch jar java true I also defined integration tests, with the following pom: 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";> 4.0.0 oqube.maven.patch test-patch-plugin patch 1 junit junit 3.8.1 org.apache.maven.plugins maven-compiler-plugin 1.5 1.5 oqube.maven patch-maven-plugin true oqube.maven patch-gnu 1.0-SNAPSHOT 1.0-it-SNAPSHOT file:///${basedir}/src/resources/sources.jar jar patch1.patch patch2.patch patch3.patch The artifact gets installed as expected, which is great, but not with the expected components; I have installed: oqube.maven.patch/test-patch-plugin/1/test-patch-plugin-1.patch but given the descriptor, I would have expected: oqube.maven.patch/test-patch-plugin/1/test-patch-plugin-1-patch.jar Are my expectations wrong ? Thanks for your help. -- OQube < software engineering \ génie logiciel > Arnaud Bailly, Dr. \web> http://www.oqube.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom packaging question
I wrote a little bit about it here - though I suppose it wouldn't hurt going into more depth. http://www.sonatype.com/book/repository.html#tips_and_tricks Please read, and request any clarifications so I can fix the book. Thanks :) -- Eric Redmond http://blog.propellors.net On 8/8/07, Insitu <[EMAIL PROTECTED]> wrote: > > Hello, > While creating a custom packaging, I ran into slight problems with > configuring the components.xml for plexus. I would like to understand > what are the roles/differences of the various configuration elements > for an artifact and how to define them properly. I can see from > maven-core's samples that we have in ArtifactHandler: > - extension > - type > - classifier > - packaging > - language > > Another question is: How is this definition related to the > lifecycle mapping definition ? > > Thanks, > -- > OQube < software engineering \ génie logiciel > > Arnaud Bailly, Dr. > \web> http://www.oqube.com > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Custom Packaging
I want to replace the jar test phase goal binding from surefire to cobertura since cobertura fires off surefire on it's own there is no need to run surefire in the test phase. I've tried every permutation known to man to prevent the tests from running twice. That's all i want to change. How would i create a custom lifecycle? Brandon On 2/15/07, Jason van Zyl <[EMAIL PROTECTED]> wrote: On 15 Feb 07, at 5:25 PM 15 Feb 07, Brandon Goodin wrote: > Is it possible to implement your own packaging like the > jar? > There is a lifecycle associated with making a JAR, which is the default, if you want to stick different things into the JAR then you could make a new lifecycle which is similar to the JAR lifecycle. What is it you're trying to do? Jason. > Brandon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom Packaging
On 15 Feb 07, at 5:25 PM 15 Feb 07, Brandon Goodin wrote: Is it possible to implement your own packaging like the jar? There is a lifecycle associated with making a JAR, which is the default, if you want to stick different things into the JAR then you could make a new lifecycle which is similar to the JAR lifecycle. What is it you're trying to do? Jason. Brandon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom Packaging
On 15 Feb 07, at 5:39 PM 15 Feb 07, Mark Derricutt wrote: I was thinking of asking the same thing actually. In our current Ant based build we're unjaring the Apache James .sar file, copying in our own .jar file along with our custom configuration files, and then rejaring the .sar as our own "application". That's called an assembly. Look at the assembly plugin, what you want is not really packaging. Jason. I could see this being a good use of a custom plugin. On 2/16/07, Brandon Goodin <[EMAIL PROTECTED]> wrote: Is it possible to implement your own packaging like the jar? Brandon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom Packaging
I was thinking of asking the same thing actually. In our current Ant based build we're unjaring the Apache James .sar file, copying in our own .jar file along with our custom configuration files, and then rejaring the .sar as our own "application". I could see this being a good use of a custom plugin. On 2/16/07, Brandon Goodin <[EMAIL PROTECTED]> wrote: Is it possible to implement your own packaging like the jar? Brandon
Re: Custom packaging type
If that does not work, check out the assembly plugin[1]. Eric [1] http://maven.apache.org/plugins/maven-assembly-plugin/ On 1/31/07, 秋秋 <[EMAIL PROTECTED]> wrote: Hi, I think you have met with the same issue with me,I hope the following configuration can help you: <--builder jar and war--> src/main/java src/test target/classes target/test-classes src/main/java <--this comfiguration can package the xml file which are distribute the different directory with .java files together--> **/*.xml <-<-directory > appoint the file's address--> src/main/config/ejb <--appoint the address where you want to package--> META-INF/ <--appoint whick files you want to package--> *.xml src/main/config/biz * src/main/process ./ 2007/1/31, Rahamim, Zvi (Zvi) <[EMAIL PROTECTED]>: > Hi, > I have a new project type, > In this type I need to create a zip file that contain both directory > structure from version control and dependency files (e.g. jars/wars...) > (each file should be copied to a specific path - and this should be > configured in the pom.xml file) > It seems that I need to overwrite the prepare-sources and package and in > addition use the default install and deploy phases. > > Can you give me a hint how to start with it? > Thanks! > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Eric Redmond http://codehaus.org/~eredmond
Re: Custom packaging type
Hi, I think you have met with the same issue with me,I hope the following configuration can help you: <--builder jar and war--> src/main/java src/test target/classes target/test-classes src/main/java <--this comfiguration can package the xml file which are distribute the different directory with .java files together--> **/*.xml <-<-directory > appoint the file's address--> src/main/config/ejb <--appoint the address where you want to package--> META-INF/ <--appoint whick files you want to package--> *.xml src/main/config/biz * src/main/process ./ 2007/1/31, Rahamim, Zvi (Zvi) <[EMAIL PROTECTED]>: Hi, I have a new project type, In this type I need to create a zip file that contain both directory structure from version control and dependency files (e.g. jars/wars...) (each file should be copied to a specific path - and this should be configured in the pom.xml file) It seems that I need to overwrite the prepare-sources and package and in addition use the default install and deploy phases. Can you give me a hint how to start with it? Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom Packaging Types
on the second thought, if you can whip you installer easily thru a small ant script, you can use maven-antrun-plugin to create the installer, then use build-helper-maven-plugin to attach your output to be installed/deploy -D On 4/25/06, Martin Cooper <[EMAIL PROTECTED]> wrote: > > On 4/25/06, dan tran <[EMAIL PROTECTED]> wrote: > > > > take a look at > http://mojo.codehause.org/maven-native/native-maven-plugin > > > That would be: > > http://mojo.codehaus.org/maven-native/native-maven-plugin/ > > (No 'e' on the end of codehaus ;) > > -- > Martin Cooper > > > it uses build lifecyle extension to provide its own packaging type. > > > > -Dan > > > > > > On 4/25/06, Marteijn Nouwens <[EMAIL PROTECTED]> wrote: > > > > > > Hello everybody maybe are repost but my subscribing went wrong, > > > > > > I am new to maven 2.0. but experienced 1.0 user. > > > > > > Do i understand correctly that packaging defines the type of product > > that > > > is > > > being build. If so, can you define more than one and define your own > > > custom > > > types. like installer and application. With matching plugins. > > > > > > Thanks > > > > > > > > > > > >
Re: Custom Packaging Types
On 4/25/06, dan tran <[EMAIL PROTECTED]> wrote: > > take a look at http://mojo.codehause.org/maven-native/native-maven-plugin That would be: http://mojo.codehaus.org/maven-native/native-maven-plugin/ (No 'e' on the end of codehaus ;) -- Martin Cooper it uses build lifecyle extension to provide its own packaging type. > > -Dan > > > On 4/25/06, Marteijn Nouwens <[EMAIL PROTECTED]> wrote: > > > > Hello everybody maybe are repost but my subscribing went wrong, > > > > I am new to maven 2.0. but experienced 1.0 user. > > > > Do i understand correctly that packaging defines the type of product > that > > is > > being build. If so, can you define more than one and define your own > > custom > > types. like installer and application. With matching plugins. > > > > Thanks > > > > > >
Re: Custom Packaging Types
take a look at http://mojo.codehause.org/maven-native/native-maven-plugin it uses build lifecyle extension to provide its own packaging type. -Dan On 4/25/06, Marteijn Nouwens <[EMAIL PROTECTED]> wrote: > > Hello everybody maybe are repost but my subscribing went wrong, > > I am new to maven 2.0. but experienced 1.0 user. > > Do i understand correctly that packaging defines the type of product that > is > being build. If so, can you define more than one and define your own > custom > types. like installer and application. With matching plugins. > > Thanks > >