Re: getting maven failure code in ant
Hi when maven fails it returns with an exit code != 0 as most other tools commands Check for that in Ant. Cheers Lucas On 02/03/2011 05:30 AM, kamilofski wrote: Thanks for the quick response. I am actually already running maven from within ANT, except I am not sure how to signal ant to say 'build failure' when the maven build fails. Currently it is saying 'build successful' in ANT but 'build failure' in maven. -- Lucas Persson | Principal Member of Technical Staff Phone: +4684773644 | | | Mobile: +46730946656 Oracle Communications Platform ORACLE Sweden | Folkungagatan 122 | 116 30 Stockholm Oracle Svenska AB, Kronborgsgränd 17, S-164 28 KISTA, reg.no. 556254-6746 Oracle is committed to developing practices and products that help protect the environment
Using a Maven Archetype programmatically
Hi All, I have a requirement of using a maven archetype programmatically and create a maven project. Can someone provide me some references on this? Thanks and Regards, Harshana Martin -- Harshana Eranga Martin Software Engineer, WSO2 Inc. Web: http://wso2.com http://wso2.org ECF Committer: http://www.eclipse.org/ecf/ Blog: http://harshana05.blogspot.com Profile: https://www.google.com/profiles/harshana05
Running The HSQLDB org.hsqldb.Server Java in the background!
Hi, I tried to run the HSQLdb server using the maven exec:java plugin. But the Server is starting in the background. But my requirement needs it to run in the background, since I want to execute the sql scripts using the same command prompt.So, 1) Is there any way to tell the maven to run exec-maven-plugin java goal in the background? 2) And what is best way to shutdown the hsqldb server using maven (goals)? thanks, Santhosh -- View this message in context: http://maven.40175.n5.nabble.com/Running-The-HSQLDB-org-hsqldb-Server-Java-in-the-background-tp3369095p3369095.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Brand new to Maven, first build, didn't go well.
Hi all, I'm a QA tester who is researching functional testing tools for an upcoming Agile project. One of the projects I want to build requires Maven. I have some intermittent experience building from source. I will add that I'm at work and behind a firewall. I believe there is also a proxy through which all of my HTTP requests go. I downloaded Maven 3.0.2 and tried to do a build. Here are the errors I got: Any help, advice, will be appreciated. Thanks. [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for org.concordion:concordion-extensions-demo-selenium2:jar:1.0.1.1 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-comp iler-plugin is missing. @ line 130, column 15 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-sure fire-plugin is missing. @ line 138, column 15 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten t he stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support buildin g such malformed projects. [WARNING] [INFO] [INFO] [INFO] Building concordion-extensions-demo-selenium2 1.0.1.1 [INFO] Downloading: http://repo1.maven.org/maven2/org/codehaus/gmaven/gmaven-plugin/1.3 /gmaven-plugin-1.3.pom [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 5.488s [INFO] Finished at: Thu Feb 03 09:56:56 EST 2011 [INFO] Final Memory: 1M/15M [INFO] [ERROR] Plugin org.codehaus.gmaven:gmaven-plugin:1.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.gmave n:gmaven-plugin:jar:1.3: Could not transfer artifact org.codehaus.gmaven:gmaven- plugin:pom:1.3 from/to central (http://repo1.maven.org/maven2): Error transferri ng file: repo1.maven.org: Unknown host repo1.maven.org -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti onException
Re: Brand new to Maven, first build, didn't go well.
On Thu, Feb 3, 2011 at 10:28 AM, Amy wrote: > I will add that I'm at work and behind a firewall. I believe there is also a > proxy through which all of my HTTP requests go. Here is some information about configuring Maven to go through your http proxy: http://maven.apache.org/guides/mini/guide-proxies.html Are the developers in your organization already using Maven? If so, they should have an internal Maven repository that you can build against -- ask them for advice on what to put in your settings.xml file. -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
AW: Brand new to Maven, first build, didn't go well.
And you need "-Dhttp.auth.preference=Basic" in case your firewall is from MS and knows NTLM and Basic authentication schemas; It would be so nice from maven if maven's settings.xml could express this as well ! all in one place :-) Got old unless I got that far and from OpenVMS through the firewall. Not required from a PC wich does NTLM by default. Josef -Ursprüngliche Nachricht- Von: Wendy Smoak [mailto:wsm...@gmail.com] Gesendet: Donnerstag, 3. Februar 2011 16:34 An: Maven Users List; Amy Betreff: Re: Brand new to Maven, first build, didn't go well. On Thu, Feb 3, 2011 at 10:28 AM, Amy wrote: > I will add that I'm at work and behind a firewall. I believe there is also a > proxy through which all of my HTTP requests go. Here is some information about configuring Maven to go through your http proxy: http://maven.apache.org/guides/mini/guide-proxies.html Are the developers in your organization already using Maven? If so, they should have an internal Maven repository that you can build against -- ask them for advice on what to put in your settings.xml file. -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Running The HSQLDB org.hsqldb.Server Java in the background!
It is best to write a plugin start/stop your db this may help: http://jira.codehaus.org/browse/MOJO-557 On Thu, Feb 3, 2011 at 2:41 AM, Santhosh Nayak wrote: > > Hi, > I tried to run the HSQLdb server using the maven exec:java plugin. But > the Server is starting in the background. But my requirement needs it to run > in the background, since I want to execute the sql scripts using the same > command prompt.So, > 1) Is there any way to tell the maven to run exec-maven-plugin java goal > in the background? > 2) And what is best way to shutdown the hsqldb server using maven > (goals)? > > thanks, > Santhosh > > -- > View this message in context: > http://maven.40175.n5.nabble.com/Running-The-HSQLDB-org-hsqldb-Server-Java-in-the-background-tp3369095p3369095.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Running The HSQLDB org.hsqldb.Server Java in the background!
assuming dbmanager.rc and setup.rc are located in your home folder and are configured properly what happens when you execute the Server class with & java -cp ../lib/hsqldb.jar org.hsqldb.Server -database.0 file:mydb -dbname.0 xdb &(appending & to run in background) ? http://www.hsqldb.org/doc/guide/ch01.html#N10148 Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Thu, 3 Feb 2011 09:00:08 -0800 > Subject: Re: Running The HSQLDB org.hsqldb.Server Java in the background! > From: dant...@gmail.com > To: users@maven.apache.org > > It is best to write a plugin start/stop your db > > this may help: http://jira.codehaus.org/browse/MOJO-557 > > > > On Thu, Feb 3, 2011 at 2:41 AM, Santhosh Nayak wrote: > > > > Hi, > >I tried to run the HSQLdb server using the maven exec:java plugin. But > > the Server is starting in the background. But my requirement needs it to run > > in the background, since I want to execute the sql scripts using the same > > command prompt.So, > > 1) Is there any way to tell the maven to run exec-maven-plugin java goal > > in the background? > > 2) And what is best way to shutdown the hsqldb server using maven > > (goals)? > > > > thanks, > > Santhosh > > > > -- > > View this message in context: > > http://maven.40175.n5.nabble.com/Running-The-HSQLDB-org-hsqldb-Server-Java-in-the-background-tp3369095p3369095.html > > Sent from the Maven - Users mailing list archive at Nabble.com. > > > > - > > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > > For additional commands, e-mail: users-h...@maven.apache.org > > > > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org >
Re: Running The HSQLDB org.hsqldb.Server Java in the background!
> I tried to run the HSQLdb server using the maven exec:java plugin. But > the Server is starting in the background. But my requirement needs it to run > in the background, since I want to execute the sql scripts using the same > command prompt.So, You may want to ask a similar question on the HSQLdb User list. There may be HSQLdb users who are doing this in their own Maven builds who have some suggestions for you. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Dependencies get unpacked over and over again
> Good news. I delved into this last week and came up with an even > better patch, and the developer Brian Fox just applied it! Great job, Phillip. We need more people like you around. ;-) Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Fwd: maven plugin for findbugs
I have also posted this to findbugs-disc...@cs.umd.edu - with no response. Sorry if this is not the correct place to post this. I have been searching for about 2 hours now for an appropriate place, and this is the only place I seem to have found. When using the fundbugs-plugin for Maven, I get the following message, and no analysis is performed: [INFO] Locale is en [java] Scanning archives (message truncated for this email) [java] Pass 2: Analyzing classes (0 / 16) - 00% completeDone with analysis [java] The following classes needed for analysis were missing: [java] java.lang.StringBuilder [java] java.lang.CharSequence [java] java.lang.StackTraceElement [java] java.math.BigDecimal [java] java.lang.Enum [java] Missing classes: 5 I have compiled my source using JDK 1.6. Not sure why it cannot find these core Java classes. Does anyone have any ideas? Thanks. --Mike
Imported JAR causes problems in suboptimal situation
I am being forced to use maven temporarily in a situation where Internet access is disallowed. (Don't even ask). Amazingly by copying an entire local repository from another machine, I am able to function most of the time. The one problem comes up when maven wants to look at Maven Central for a file it won't find there. This file is a POM for a third-party JAR that was imported into the repository. When run from a machine that has Internet connectivity, it attempts to download this non-existent POM, fails to find it, and lets me off with a warning. When run from a machine that has no Internet connectivity the build fails with: "connection refused". Is there a way to tell Maven to use only a local repository and never try to connect to maven central? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Imported JAR causes problems in suboptimal situation
That's the "-o" CLI switch as "offline". There is also the "-h" CLI switch for "help". ;) Thanks, ~t~ On Thu, Feb 3, 2011 at 10:51 PM, Steve Cohen wrote: > I am being forced to use maven temporarily in a situation where Internet > access is disallowed. (Don't even ask). > > Amazingly by copying an entire local repository from another machine, I am > able to function most of the time. The one problem comes up when maven > wants to look at Maven Central for a file it won't find there. This file is > a POM for a third-party JAR that was imported into the repository. When run > from a machine that has Internet connectivity, it attempts to download this > non-existent POM, fails to find it, and lets me off with a warning. When > run from a machine that has no Internet connectivity the build fails with: > "connection refused". > > Is there a way to tell Maven to use only a local repository and never try to > connect to maven central? > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Maven Seam Template
I am looking at this project http://code.google.com/p/seam-maven-refimpl/ and since we're using Seam in a multi-module project here, it seems a good fit. Has anyone here used it? Any feedback? Only thing is that we don't use EJB, nor JBoss server (all Tomcat here so far) and we deploy war files. I am not familiar enough with archetypes to know if I can use this and modify it to generate archetypes that will suit our needs from our projects... Any ideas? Thanks!! Ginni -- View this message in context: http://maven.40175.n5.nabble.com/Maven-Seam-Template-tp3370036p3370036.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Releasing/Deploying multiple artefacts with maven-assembly-plugin : what is your opinion ?
Nobody has any piece of advice against these options ? :( On Sun, Jan 30, 2011 at 3:13 AM, Frederic Camblor wrote: > Hi all ! > > My context : > - 1 pom Artefact > - This artefact generate N zip artefacts via the maven-assembly-plugin. > These N artefact are contextualized upon a target deployment environnment. > - N = ~5 for the moment, but it can evolve depending on the number of > environnment that will grow in the future > - The N artefacts are not inevitably used (staging) > - I can't change my zip artefact content/architecture (let's say it's fixed > by my customer) > - My zip artefacts are relatively big (~200Mo each) > - They diverge only by 4-5 configuration files packed into the zip at > different places > - I'm frequently releasing using maven-release-plugin. Build > reproductibility is a top level requirement. > > I'm wondering about the best approach to take to have something viable for > the project. > > I already listed 3 way of agencing my pom : > 1/ I use N maven-assembly-plugin , with different > / > Drawbacks : > - mvn package take a lng time because it archives N * 200Mo files > - when launching release:perform (and thus, calling the deploy goal), I > deploy N*200Mo files in my maven repository ... even if I don't use the > artefacts in every deployment environnment. I find it really overdimensioned > since only a few configuration files differ between my N artefacts :( > > 2/ I use only 1 maven-assembly-plugin with "variabilized" > / . > For example : > assemblies/${target.env}-assembly.xml > When building, I must set -Dtarget.env property key to switch between > environnments > Drawbacks : > - Doesn't satisfy the build reproductibility requirement very well, since I > must specify my target environnment during the build and during the tag (and > this information is nowhere persisted) > > 3/ Same as 2/ except that I put maven-assembly-plugin configuration into an > inactive profile. > That is, by default, no zip artefact will be produced during mvn package. > During release:prepare, I will only tag the pom and the assemblies > configuration files. > When calling release:perform, I'll have to specify a -Dtarget.env to > determine on which environnment I want to deploy my artefact. > My artefact will then be uploaded on my maven repository, too. > Drawbacks : > - I must separate my release:prepare & release:perform calls in my CI > server. The first one will be called once for a release. The second one will > be called several times after release:prepare, to deploy my artefact on my N > environnments. > > Obviously, I find the 3rd choice the best one... > I'm interested in your feedback / opinion on the question. Is there a > silver bullet here ? > > Frédéric >
Re: Releasing/Deploying multiple artefacts with maven-assembly-plugin : what is your opinion ?
On 3 February 2011 15:48, Frederic Camblor wrote: > Nobody has any piece of advice against these options ? :( N artifacts is (as I think you've already discovered) not very scalable. :-) So take the configuration out of the WAR. Create a single WAR that can be (re)used by all environments. Use a known (relative) file location, a known URL, or some other way to find/access the configuration at runtime. I'm sure it will take some effort in the short term but the long term benefits should be obvious. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Releasing/Deploying multiple artefacts with maven-assembly-plugin : what is your opinion ?
On Thu, Feb 3, 2011 at 6:48 PM, Frederic Camblor wrote: > Nobody has any piece of advice against these options ? :( When you tell us you can't change anything, there's not much to say. Either move the configuration out of the war, or put it *all* in there and use something (like Spring) that can sense which environment it is running in and select the right config file. In any case, you want *one* artifact that can be used in the different environments. -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Dependencies get unpacked over and over again
fyi, I'll try to cut the release this weekend. On Thu, Feb 3, 2011 at 2:31 PM, Wayne Fay wrote: >> Good news. I delved into this last week and came up with an even >> better patch, and the developer Brian Fox just applied it! > > Great job, Phillip. We need more people like you around. ;-) > > Wayne > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven 3.0.1 pulling in transient dependencies of a "provided" dependency as "compile"-scoped
Aren't these coming from another dependencies. If you flip the maven version on the exact same project, do you get any difference? S. On Mon, Dec 27, 2010 at 12:31 PM, radai wrote: > i have a maven project that contains the following dependency: > > > org.jboss.ejb3 > jboss-ejb3-core > 1.6.3 > provided > > > this is part of a module that produces an ear artifact. according to the > maven dependency scope doc ( > http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html) > the transient dependencies of a "provided"-scoped dependency are either > scoped as "provided" or not treated at all. and yet in my case im seeing > this as part of the build (produced with -X): > > [DEBUG] com.emc.illuminator:illuminator-ear:ear:6.0-SNAPSHOT > [DEBUG] ...some direct dependencies edited out for brevity's sake... > [DEBUG] org.jboss.ejb3:jboss-ejb3-core:jar:1.6.3:provided > [DEBUG] javassist:javassist:jar:3.7.1.GA:compile > [DEBUG] org.hibernate:hibernate-core:jar:3.3.1.GA:provided > [DEBUG] antlr:antlr:jar:2.7.6:provided > [DEBUG] dom4j:dom4j:jar:1.6.1:compile > > notice that javassist and dom4j are "upgraded" to compile-scoped, and they > are also packaged as part of the ear. these are not the only artifacts > "upgraded". > this project builds just fine with maven 2. before i start adding a lot of > exclusions, what am i missing here ? > > thanks in advance for any help/ideas/comments/clues, > > radai. > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
WARNINGS in Maven Build: maven-compiler-plugins missing
[INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for org.sonatype.mavenbook.custom:simple-weather:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 69, column 12 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] .. .. Project builds and runs fine. But I really want to take care of these WARNINGS! Have not had much luck with tutorial, "Maven by Example" or online resources. Went to this as last resource! Thanks much!
Re: WARNINGS in Maven Build: maven-compiler-plugins missing
A very similar question was asked on the list some weeks ago. You need to lock down the (specify) the version of maven-compiler-plugin. You do that in the pluginManagement section. An example is here: http://maven.apache.org/pom.html#Plugin_Management (Note: You don't need to specify any executions though.) /Anders On Fri, Feb 4, 2011 at 06:16, Jonthan DeMaagd wrote: > [INFO] Scanning for projects... > > [WARNING] > > [WARNING] Some problems were encountered while building the effective model > for org.sonatype.mavenbook.custom:simple-weather:jar:1.0 > > [WARNING] 'build.plugins.plugin.version' for > org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 69, > column > 12 > > [WARNING] > > [WARNING] It is highly recommended to fix these problems because they > threaten the stability of your build. > > [WARNING] > > [WARNING] For this reason, future Maven versions might no longer support > building such malformed projects. > > [WARNING] > > .. > > .. > > > > Project builds and runs fine. > > But I really want to take care of these WARNINGS! > > > > Have not had much luck with tutorial, "Maven by Example" or online > resources. > > Went to this as last resource! > > > > Thanks much! > > > >
maven 3, deploy:deploy-file and dav:http
Hi. I am trying to deploy a custom artifact to our internal repo using maven 3.0.2: mvn deploy:deploy-file -Dfile=file.jar -Dversion=1.0.0 -DgroupId=com.example -DartifactId=artifact -Dpackaging=jar -DrepositoryId=internal -Durl=dav:http://10.1.1.7/maven_repo where a corresponding element with id internal is in my settings.xml, and it has a username and password corresponding to a local user on the machine I am trying to deploy to. This doesn't work, I get: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy-file (default-cli) on project standalone-pom: Failed to deploy artifacts/metadata: No connector available to access repository remote-repository (dav:http://10.1.1.7/maven) of type default using the available factories WagonRepositoryConnectorFactory -> [Help 1] When I remove the dav prefix, I get: Uploading: http://10.1.1.7/maven/com/test/test/1/test-1.jar Uploading: http://10.1.1.7/maven/com/test/test/1/test-1.pom [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 1.312s [INFO] Finished at: Fri Feb 04 08:15:35 CET 2011 [INFO] Final Memory: 4M/117M [INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy-file (default-cli) on project standalone-pom: Failed to deploy artifacts: Could not transfer artifact com.test:test:jar:1 from/to remote-repository (http://10.1.1.7/maven): Access denied to: http://10.1.1.7/maven/com/test/test/1/test-1.jar -> [Help 1] Which I think it means it tries to upload, but there is something wrong with the credentials? How can I configure this correctly? In maven 2, the first approach used to work, with the dav:http protocol, it all changed in maven 3, or at least is seems so. Thanks. -- View this message in context: http://maven.40175.n5.nabble.com/maven-3-deploy-deploy-file-and-dav-http-tp3370548p3370548.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org