Re: Create 2 jars for a project
Sure it is, but not wihout some extra jelly code. Do it with the Ant Jar tag in your maven.xml or you can make one project as a subproject of the other using the reactor component. But be aware that if you do, you will loose the maven.artifact. The artifact of a maven project is, by default, unique. A single jar. We have a project here that builds over 30 jars and its not really an issue. The product we build is not a simple artifact anyway so nowhere in our build is the unique artifact refered. Hope it helps. Eric. Adrian Tarau wrote: Hi, It is possible to create 2 jars in the same maven project? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Create 2 jars for a project
I can use the ant:jar but I want to use the code behind the jar:jar goal which add to Manifest.MF a lots o useful information extracted from POM. One solution it will be to add it also in maven.xml but is not so beautiful. Do you know if I can make a postGoal fro jar:jar, change the jar plugin properties, call again jar:jar goal but skiping the postGoal the second time?. Can be a pre or post goal skipped programmatic? -Original Message- From: Eric Giguere [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 3:56 PM To: Maven Users List Subject: Re: Create 2 jars for a project Sure it is, but not wihout some extra jelly code. Do it with the Ant Jar tag in your maven.xml or you can make one project as a subproject of the other using the reactor component. But be aware that if you do, you will loose the maven.artifact. The artifact of a maven project is, by default, unique. A single jar. We have a project here that builds over 30 jars and its not really an issue. The product we build is not a simple artifact anyway so nowhere in our build is the unique artifact refered. Hope it helps. Eric. Adrian Tarau wrote: Hi, It is possible to create 2 jars in the same maven project? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Create 2 jars for a project
Yes, I gues it can be done if you program this accordingly with a flag. But instead of doing this and having to cope with some maybe unwanted behavior from calling jar:jar twice and trying to fool the plugin, you could take the jelly code in the jar plugin and use it directly in your project? You know what, maybe my approach I took with the legacy project could fit you more. Create a master project that is responsible for compiling all you sources. Then, pass control to 2 sub-projects that will take care of producing the jars on the classes build by the master project. It involves setting this in the sub-projects: parent.base.dir=${basedir}/../..-- depends on where you put you sub-project # # maven default source directory override to get parent's instead # maven.build.dir=${parent.base.dir}/target maven.src.dir=${parent.base.dir}/src/java With this, all projects will use the same sources and same classes. So your master compiles, sub-projects jar using all maven built in mechanism. What do you think? Eric. Adrian Tarau wrote: I can use the ant:jar but I want to use the code behind the jar:jar goal which add to Manifest.MF a lots o useful information extracted from POM. One solution it will be to add it also in maven.xml but is not so beautiful. Do you know if I can make a postGoal fro jar:jar, change the jar plugin properties, call again jar:jar goal but skiping the postGoal the second time?. Can be a pre or post goal skipped programmatic? -Original Message- From: Eric Giguere [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 3:56 PM To: Maven Users List Subject: Re: Create 2 jars for a project Sure it is, but not wihout some extra jelly code. Do it with the Ant Jar tag in your maven.xml or you can make one project as a subproject of the other using the reactor component. But be aware that if you do, you will loose the maven.artifact. The artifact of a maven project is, by default, unique. A single jar. We have a project here that builds over 30 jars and its not really an issue. The product we build is not a simple artifact anyway so nowhere in our build is the unique artifact refered. Hope it helps. Eric. Adrian Tarau wrote: Hi, It is possible to create 2 jars in the same maven project? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Create 2 jars for a project
Thanks for the tips; I think the first one with the flag is better. First of all, I will be synchronized with all the updates made to the JAR plugin and second the project is already included into a multiproject and the multiproject solution is not so good. -Original Message- From: Eric Giguere [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 4:14 PM To: Maven Users List Subject: Re: Create 2 jars for a project Yes, I gues it can be done if you program this accordingly with a flag. But instead of doing this and having to cope with some maybe unwanted behavior from calling jar:jar twice and trying to fool the plugin, you could take the jelly code in the jar plugin and use it directly in your project? You know what, maybe my approach I took with the legacy project could fit you more. Create a master project that is responsible for compiling all you sources. Then, pass control to 2 sub-projects that will take care of producing the jars on the classes build by the master project. It involves setting this in the sub-projects: parent.base.dir=${basedir}/../..-- depends on where you put you sub-project # # maven default source directory override to get parent's instead # maven.build.dir=${parent.base.dir}/target maven.src.dir=${parent.base.dir}/src/java With this, all projects will use the same sources and same classes. So your master compiles, sub-projects jar using all maven built in mechanism. What do you think? Eric. Adrian Tarau wrote: I can use the ant:jar but I want to use the code behind the jar:jar goal which add to Manifest.MF a lots o useful information extracted from POM. One solution it will be to add it also in maven.xml but is not so beautiful. Do you know if I can make a postGoal fro jar:jar, change the jar plugin properties, call again jar:jar goal but skiping the postGoal the second time?. Can be a pre or post goal skipped programmatic? -Original Message- From: Eric Giguere [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 3:56 PM To: Maven Users List Subject: Re: Create 2 jars for a project Sure it is, but not wihout some extra jelly code. Do it with the Ant Jar tag in your maven.xml or you can make one project as a subproject of the other using the reactor component. But be aware that if you do, you will loose the maven.artifact. The artifact of a maven project is, by default, unique. A single jar. We have a project here that builds over 30 jars and its not really an issue. The product we build is not a simple artifact anyway so nowhere in our build is the unique artifact refered. Hope it helps. Eric. Adrian Tarau wrote: Hi, It is possible to create 2 jars in the same maven project? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]