On Mon, Nov 07, 2005 at 01:19:11PM +0000, Brett Porter wrote: > Sorry, what option are you referring to?
I'm sorry if I was not clear. Basically, I'd like to produce a jar with debug info and a jar without debug info (for a very size constrained environment). So I have a profile (nodebug), where I configure the fact that debug should be disabled. By taking the example maven-model as you suggested, M2 produces two jars, each of them without debug info: - somejar-1.0.jar - somejar-1.0-nodebug.jar My only small issue remaining is that when I ask M2 to perform an "install", both jars are installed and the jar with debug info (installed with the standard profile) is replaced by the jar without debug info by the same name. -- Julien > Configuration inside the execution will be restricted to that execution. > > - Brett > > On 11/7/05, Julien Stern <[EMAIL PROTECTED]> wrote: > > On Mon, Nov 07, 2005 at 10:10:58AM +1100, Brett Porter wrote: > > > Take a look at maven-model in the Maven sources. It does exactly this, > > > and last time I checked it worked :) > > > > Getting closer... :) > > > > I was doing: > > > > <configuration> > > <classifier>nodebug</classifier> > > </configuration> > > <executions> > > <execution> > > <phase>package</phase> > > <goals> > > <goal>jar</goal> > > </goals> > > </execution> > > </executions> > > > > which failed as I described, and when I change it to: > > > > <executions> > > <execution> > > <phase>package</phase> > > <goals> > > <goal>jar</goal> > > </goals> > > <configuration> > > <classifier>nodebug</classifier> > > </configuration> > > </execution> > > </executions> > > > > the build does not fail anymore. > > > > However, it produces two jars: > > - somejar-1.0.jar > > - somejar-1.0-nodebug.jar > > > > but it applies the option from the profile to BOTH jars. > > I would like it either to produce a single jar, or to produce two > > of them, but without applying the profile rules to both jars ! > > > > Thanks. > > > > -- > > Julien Stern > > > > > > > > - Brett > > > > > > On 11/4/05, Julien Stern <[EMAIL PROTECTED]> wrote: > > > > On Fri, Nov 04, 2005 at 09:22:25AM +1100, Brett Porter wrote: > > > > > I think you need: > > > > > > > > > > <phase>package</phase> > > > > > > > > > > and > > > > > > > > > > <goals> > > > > > <goal>jar</goal> > > > > > </goals> > > > > > > > > > > in the jar plugin as it is not being run otherwise. > > > > > > > > > > - Brett > > > > > > > > No luck with this either unfortunately. > > > > I still have: > > > > > > > > [INFO] [jar:jar] > > > > [INFO] Building jar: > > > > /home/julien/cvs/java/libs/attr/target/libattr-3.0-nodebug.jar > > > > [INFO] [install:install] > > > > [INFO] Installing /home/julien/cvs/java/libs/attr/target/classes to > > > > /home/julien/.m2/repository/unicity/libattr/3.0/libattr-3.0.jar > > > > > > > > I guess I'll file a bug report :) > > > > Thanks for your help. > > > > > > > > -- > > > > Julien > > > > > > > > > On 11/3/05, Julien Stern <[EMAIL PROTECTED]> wrote: > > > > > > On Thu, Nov 03, 2005 at 10:05:50AM +1100, Brett Porter wrote: > > > > > > > How are you calling it? > > > > > > > > > > > > > > Sounds like you are running install:install over a multiproject - > > > > > > > instead you should use "install". > > > > > > > > > > > > Well, I believe I'm doing something fairly standard. > > > > > > I'm calling: > > > > > > > > > > > > $ mvn -Pnodebug install > > > > > > or > > > > > > $ mvn -Pnodebug clean install > > > > > > > > > > > > With "nodebug" containing: > > > > > > > > > > > > <build> > > > > > > <plugins> > > > > > > <plugin> > > > > > > <inherited>true</inherited> > > > > > > <groupId>org.apache.maven.plugins</groupId> > > > > > > <artifactId>maven-compiler-plugin</artifactId> > > > > > > <configuration> > > > > > > <fork>true</fork> > > > > > > <debug>false</debug> > > > > > > <verbose>true</verbose> > > > > > > <compilerArguments> > > > > > > <g:none></g:none> > > > > > > </compilerArguments> > > > > > > </configuration> > > > > > > </plugin> > > > > > > <plugin> > > > > > > <inherited>true</inherited> > > > > > > <groupId>org.apache.maven.plugins</groupId> > > > > > > <artifactId>maven-jar-plugin</artifactId> > > > > > > <configuration> > > > > > > <classifier>nodebug</classifier> > > > > > > </configuration> > > > > > > </plugin> > > > > > > </plugins> > > > > > > </build> > > > > > > > > > > > > There are two levels of POM inheritance if that may also diagnose... > > > > > > > > > > > > By the way, thanks a lot for your answers to my other emails, > > > > > > I'll try to find time to add improvements requests in JIRA. > > > > > > > > > > > > -- > > > > > > Julien Stern > > > > > > > > > > > > > > > > > > > > > > > > > > I've used this successfully with classifiers before. > > > > > > > > > > > > > > -Brett > > > > > > > > > > > > > > On 11/3/05, Julien Stern <[EMAIL PROTECTED]> wrote: > > > > > > > > The install plugin does not seem to work when used with > > > > > > > > classifiers. > > > > > > > > When I use the jar plugin with a classifier, the install fails > > > > > > > > (the install plugin tries to use "$MYPROJECTDIR/target/classes" > > > > > > > > as the artifact name to install. > > > > > > > > > > > > > > > > Is it forbidden to use classifier with install/deploy ? > > > > > > > > Or is it a bug ? > > > > > > > > Or is there a correct way to configure the use of this case ? > > > > > > > > > > > > > > > > Thanks, > > > > > > > > > > > > > > > > -- > > > > > > > > Julien Stern > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > > > 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] > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > 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] > > > > > > > --------------------------------------------------------------------- > > 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]
