Re: Maven-bundle-plugin and Swing
Any suggestions please? -- View this message in context: http://www.nabble.com/Maven-bundle-plugin-and-Swing-tp21476430p21494022.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: exclude jars during filtering
> I have some jar files under src/test/resources folder. I have enabled > filter for the test resources. Now during filtering jar files get > corrupted. I have tried the following configuration but does not seem Many people use /src/main/resources/filtered and /src/main/resources/unfiltered for this very reason (or /src/test). You will, of course, have to configure the resources directories manually in the pom as a result of this, as the default configuration (convention) will no longer apply. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
How to update property value of POM.xml in a maven plugin?
Hi, I have a question about developing maven plugin. A plugin can get the property value of POM.xml, as "@parameter" annotation does. But how can I create a new property in maven plugin, which can also be accessed in POM.xml? That is, how can I update the property value of POM.xml in a maven plugin? I have searched for the documents, but no example found. Could anyone help to give an example? Thanks! Delos
exclude jars during filtering
I have some jar files under src/test/resources folder. I have enabled filter for the test resources. Now during filtering jar files get corrupted. I have tried the following configuration but does not seem to work. org.apache.maven.plugins maven-resources-plugin jar Any help?
Executing a plugin from another plugin
Hi, I have a custom plugin that I've written, and I need it to call out to some other plugin. For example, I've got the following code in a POM: maven-assembly-plugin installer package directory-single src/assembly/production-assembly.xml I want to take all that code out of the POM and have it execute inside my plugin instead. I assume this would require invoking the Mojo API. Any tips on how to do this? Thanks, Trevor - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
dependency not found - fails to replace the version with the property for parent pom
Let`s say we have 2 branches Infrastructure and Web. The project web-core depends on infra-persist. We want to be able to manage the versions of the infra-persist and at the same time have a default value of 0.0.1-SNAPSHOT if no version is specified. Infrastructure infra-parent infra-persist and others Web web-parent web-core and others In web-core I have web-core jar ${web.core.version} com.abc.xyz ../web-parent/pom.xml web-parent ${web.parent.version} com.abc.xyz infra-persist ${infra.persist.version} In web-parent I have ${web.parent.version} Holds common settings 0.0.1-SNAPSHOT ${web.parent.version} 0.0.1-SNAPSHOT 0.0.1-SNAPSHOT ../web-core In infra-persist I have : infra-persist ${infra.persist.version} com.abc.xyz ../infra-parent/pom.xml infra-parent ${infra.parent.version} In infra-parent I have : infra-parent ${infra.parent.version} pom 0.0.1-SNAPSHOT 0.0.1-SNAPSHOT ../infra-persist My build of infra started from infra-parent with mvn clean install works. My build of we started from web-parent with mvn clean install fails with [INFO] [INFO] Building WEB interface [INFO]task-segment: [clean, install] [INFO] [INFO] [clean:clean] [INFO] Deleting directory C:\4\Web\web-core\target [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. Downloading: http://com.abc.xyz:8080/maven-proxy-webapp/repository/com/abc/xyz/infra-parent/${infra.parent.version}/infra-parent-${infra.parent.version}.pom [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. The only way I can make it work is if i hardcode in infra-persist infra-persist ${infra.persist.version} com.abc.xyz ../infra-parent/pom.xml infra-parent 0.0.1-SNAPSHOT Thank you for all your hints and ideas, Lucian -- View this message in context: http://www.nabble.com/dependency-not-found---fails-to-replace-the-version-with-the-property-for-parent-pom-tp21488666p21488666.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
Uploading files created by assembly to server
Hi, I want to modify my "release:perform" goal, so it will automatically upload my assemblies to sourceforge, so I can easily provide them on the sourceforge download page. Yet I can build the assemblies and upload the site on using "release:perform" by using this: --- SNIP --- maven-release-plugin https: true assembly:assembly site-deploy --- SNAP --- So I wonder, how I can perform uploading of four files. There is Maven Wagon without any documentation: http://maven.apache.org/wagon/index.html And I found Maven Upload Plugin, that can upload a whole directory, but I want only four files saved in target directory: http://docs.atlassian.com/maven-upload-plugin/1.1/usage.html Perhaps someone can me help me on this. Thanks a lot. With regards signature.asc Description: This is a digitally signed message part.
Re: Maven EAR Plugin ContextRoot
> For now I've worked around the issue by using the applicationXml > configuration to point to my own application.xml with the context-root being > set, instead of using the generated one. I'd still like to know if this is > just broken for everyone, or if there's something I'm missing so I can > decide how to file a bug. Take a look at the source code: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/WebModule.java?revision=728546&view=markup If I were you, I'd debug that class/method in an IDE or add some System.out's to see what's going on during the execution of the code. (This assumes you pull down the entire plugin and rebuild it with a new version eg 2.3.99 which you'd build and install locally, and then specify it in your pom.xml file -- make sure you delete it later!) Without doing that, I'm not sure if there's a bug here or not. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven EAR Plugin ContextRoot
On Wed, Jan 14, 2009 at 5:39 PM, Stephen Duncan Jr wrote: > I'm following the instructions here to set the context-root for my web > modules as specified here: > http://maven.apache.org/plugins/maven-ear-plugin/examples/customizing-context-root.html > > It seems to have no effect on the generated application.xml, the > context-root still has the default values. I couldn't find any mention of > this problem. Can anyone else indicate if this works or not in the current > release of the maven-ear-pluging (2.3.1)? > > -- > Stephen Duncan Jr > www.stephenduncanjr.com > For now I've worked around the issue by using the applicationXml configuration to point to my own application.xml with the context-root being set, instead of using the generated one. I'd still like to know if this is just broken for everyone, or if there's something I'm missing so I can decide how to file a bug. -- Stephen Duncan Jr www.stephenduncanjr.com
Re: How to exclude a package from compile
> I've got a java package (along with the jar dependencies it uses) that I do > not want to be added to the war file we send to our client. Also, I do not > want the pom.xml to be part of the war file. I would move the code in that java package and its dependencies out of the war to its own module, so you can manage its use more effectively. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to add a dependency dynamically during the build in a plugin?
>> I just started to write my first plugin which should add some JARs >> dynamically to the project's dependencies. Adding dependencies dynamically during the build is generally regarded as a "bad idea" for various reasons. So, I don't expect that you will get much of a response to this... Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Build problem using profiles
Hi, I have two profiles defined in pom.xml. Any ways I can build two wars of both profiles in on line of command? i.e. mvn install -P development,production and place them at different location? Thanks in advance, Vincent -- View this message in context: http://www.nabble.com/Build-problem-using-profiles-tp21483041p21483041.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
APT into HTML without sidebar/header/footer
Hi, I have some documents authored in APT that get bundled with the project web site when doing "mvn site". This transforms the APTs into separate HTML files, but each one has a copy of the site's sidebar, header, and footer. This is fine when viewing the document as part of the site, but if I want to, say, email one of the documents to an outside party, it will include this extraneous information that they don't want to see. So, I need to generate a version of the HTML without all the site-specific stuff. What's the best way to do this? Will I have to write a script to invoke doxia-converter or aptconvert explicitly? If so, how would I integrate that script into the Maven project? Thanks, Trevor
Re: Using maven with eclipse
there's also Eclipse IAM (formerly Q4E) http://code.google.com/p/q4e/ re: dependency tree, I use all the time Q4E dependency analysis http://code.google.com/p/q4e/wiki/DependencyAnalysis On Thu, Jan 15, 2009 at 3:43 PM, Adam Leggett wrote: > Try this if you want an Eclipse plug-in to manage the integration: > http://m2eclipse.sonatype.org/ [1] > > Try this if you want a Maven plug-in instead: > http://maven.apache.org/plugins/maven-eclipse-plugin/ [2] > > I tend to lean to [2], but then I'm happier just using command line > mojos to get some of the additional value add that's in [1] (and it does > have some pretty slick features, which you'll see if you try it). For > example, I'd do something like mvn dependency:tree > deps.log etc. > Just feels like an instinctively lighter approach which I prefer. > > Adam > > -Original Message- > From: Farrukh Najmi [mailto:farr...@wellfleetsoftware.com] > Sent: 15 January 2009 14:30 > To: users@maven.apache.org > Subject: Using maven with eclipse > > > Hello, > > I am experienced with maven but new to Eclipse IDE. I have used maven > with Netbeans IDE and the mevenide Netbeans plugin. WHat I liked about > it was how Netbeans was completely driven by the pom configuration and > how natural and familiar everything was for a maven user. > > I would like to try Eclipse IDE with my existing multi-module project. > What is the best approack for doing this? Which plugin should I use? > Please share any links and pointers. Thanks. > > -- > Regards, > Farrukh > > Web: http://www.wellfleetsoftware.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 > > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Using maven with eclipse
Adam Leggett wrote: > > I tend to lean to [2], but then I'm happier just using command line > mojos to get some of the additional value add that's in [1] (and it does > have some pretty slick features, which you'll see if you try it). For > example, I'd do something like mvn dependency:tree > deps.log etc. > Just feels like an instinctively lighter approach which I prefer. > The m2eclipse provides a nice an interactive UI for that command. You can see how it look like at http://docs.codehaus.org/display/M2ECLIPSE/Maven+POM+editor#MavenPOMeditor-DependencyHierarchyviewer The upcoming m2eclipse 0.9.7 release should be very exiting. The following wiki page provides and overview of the new and noteworthy features http://docs.codehaus.org/display/M2ECLIPSE/New+and+Noteworthy#NewandNoteworthy-latest regards, Eugene -- View this message in context: http://www.nabble.com/Using-maven-with-eclipse-tp21478705p21480290.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: AW: How to add a dependency dynamically during the build in a plugin?
Eric, Short answer, please don't do it. Plugins that add dependencies like that cause major grief to any ide integrations and also make it impossible to change versions of used dependencies, essentially making your plugin less useful. regards, Eugene Lewis, Eric-2 wrote: > > Anyone? :-) > >> -Ursprüngliche Nachricht- >> Von: Lewis, Eric [mailto:eric.le...@ipi.ch] >> Gesendet: Dienstag, 13. Januar 2009 14:15 >> An: Maven Users List >> Betreff: How to add a dependency dynamically during the build >> in a plugin? >> >> Hi >> >> I just started to write my first plugin which should add some JARs >> dynamically to the project's dependencies. >> Unfortunately, I found no documentation about how to add a >> dependency at >> runtime (Sonatype book, Maven site, blogs...). >> >> I have the project injected by Plexus and want to add some >> dependencies >> like this: >> Dependency dependency = new Dependency(); >> dependency.setGroupId(groupId); >> dependency.setArtifactId(artifactId); >> dependency.setVersion(version); >> dependency.setScope("system"); >> dependency.setSystemPath(jarFile.getAbsolutePath()); >> this.project.getDependencies().add(dependency); >> >> When using this.project.getDependencies() later on, I find those >> dependencies. >> >> However, I also added the Maven dependency plugin later in >> the build to >> have a list of dependencies: >> >> org.apache.maven.plugins >> maven-dependency-plugin >> >> >> package >> >> list >> >> >> >> >> true >> >> true >> >> >> >> But it only shows the existing dependencies from the POM: >> [INFO] [dependency:list {execution: default}] >> [INFO] >> [INFO] The following files have been resolved: >> [INFO]commons-lang:commons-lang:jar:2.4:compile:C:\Documents and >> Settings\xyz\.m2\repository\commons-lang\commons-lang\2.4\comm >> ons-lang-2 >> .4.jar >> >> So obviously, it doesn't work. >> >> I also tried >> this.project.getDependencyManagement().addDependency(dependency); >> >> which didn't change anything. >> >> Is there a reference about the internals of the dependency mechanism? >> >> Best regards, >> Eric > -- View this message in context: http://www.nabble.com/How-to-add-a-dependency-dynamically-during-the-build-in-a-plugin--tp21435580p21480117.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: Using maven with eclipse
Try this if you want an Eclipse plug-in to manage the integration: http://m2eclipse.sonatype.org/ [1] Try this if you want a Maven plug-in instead: http://maven.apache.org/plugins/maven-eclipse-plugin/ [2] I tend to lean to [2], but then I'm happier just using command line mojos to get some of the additional value add that's in [1] (and it does have some pretty slick features, which you'll see if you try it). For example, I'd do something like mvn dependency:tree > deps.log etc. Just feels like an instinctively lighter approach which I prefer. Adam -Original Message- From: Farrukh Najmi [mailto:farr...@wellfleetsoftware.com] Sent: 15 January 2009 14:30 To: users@maven.apache.org Subject: Using maven with eclipse Hello, I am experienced with maven but new to Eclipse IDE. I have used maven with Netbeans IDE and the mevenide Netbeans plugin. WHat I liked about it was how Netbeans was completely driven by the pom configuration and how natural and familiar everything was for a maven user. I would like to try Eclipse IDE with my existing multi-module project. What is the best approack for doing this? Which plugin should I use? Please share any links and pointers. Thanks. -- Regards, Farrukh Web: http://www.wellfleetsoftware.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: Using maven with eclipse
On Thursday 15 January 2009 Farrukh Najmi wrote: > I am experienced with maven but new to Eclipse IDE. I have used maven > with Netbeans IDE and the mevenide Netbeans plugin. WHat I liked about > it was how Netbeans was completely driven by the pom configuration and > how natural and familiar everything was for a maven user. > > I would like to try Eclipse IDE with my existing multi-module project. > What is the best approack for doing this? Which plugin should I use? > Please share any links and pointers. Thanks. See [0] for a comparison of the available plugins. The maven-eclipse-plugin just creates eclipse configuration files for your projects, no further intergration. This is simple, quite robust but doesn't provide as much comfort as the other two options. I didn't use m2eclipse or q4e recently but they follow a completely different approach. They are plugins for eclipse and try to adapt your IDE and add new features to it. If you search the list archive you should find some more information. This question is asked every now and then. hth, - martin [0] http://docs.codehaus.org/display/MAVENUSER/Eclipse+Integration signature.asc Description: This is a digitally signed message part.
Using maven with eclipse
Hello, I am experienced with maven but new to Eclipse IDE. I have used maven with Netbeans IDE and the mevenide Netbeans plugin. WHat I liked about it was how Netbeans was completely driven by the pom configuration and how natural and familiar everything was for a maven user. I would like to try Eclipse IDE with my existing multi-module project. What is the best approack for doing this? Which plugin should I use? Please share any links and pointers. Thanks. -- Regards, Farrukh Web: http://www.wellfleetsoftware.com - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: for org/testng/testng/5.8/
Hi! On Thursday 15 January 2009 thomas2004 wrote: > I need the "testng-5.8-jdk15.jar" in my program and I find it under: > http://mirrors.ibiblio.org/pub/mirrors/maven2/org/testng/testng/5.8/ > > I put this dependency in the "pom.xml" as follow but it couldn't find > that. What is the correct writting for ? You can always use http://www.mvnbrowser.com/ or http://mvnindex.org/ to find an artifact and see the corresponding pom-snippet. hth, - martin signature.asc Description: This is a digitally signed message part.
Re: Does the in the setting.xml work?
Yes, it works. The file is supposed to be called settings.xml. On Jan 15, 2009, at 6:05 AM, "linchongsu" wrote: does the pluginGroups in the setting.xml work? anybody comes to this problem? On Mon, Nov 24, 2008 at 3:21 PM, 苏林冲 wrote: > Anybody konw this? > > 2008/11/21 苏林冲 > > Hi, all >> I have set below in setting.xml >> >> com.mycompany.maven.plugins >> >> >> when i run myplugin:exec , maven print these in the console >> >> [INFO] Scanning for projects... >> [INFO] Searching repository for plugin with prefix: 'myplugin'. >> [INFO] >> --- - >> [ERROR] BUILD ERROR >> [INFO] >> --- - >> [INFO] The plugin 'org.apache.maven.plugins:maven-myplugin- plugin' does >> not exist or no valid version could be found >> [INFO] >> --- - >> [INFO] For more information, run Maven with the -e switch >> [INFO] >> --- - >> [INFO] Total time: < 1 second >> [INFO] Finished at: Fri Nov 21 13:05:34 CST 2008 >> [INFO] Final Memory: 1M/2M >> [INFO] >> --- - >> >> why does maven define the groupId "org.apache.maven.plugins" rather than" >> com.mycompany.maven.plugins"? >> >> And below is also the log infomation with -X >> >> >> + Error stacktraces are turned on. >> Maven version: 2.0.9 >> Java version: 1.5.0_16 >> OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows" >> [DEBUG] Building Maven user-level plugin registry from: 'C: \Documents and >> Settings\sulinchong.pt\.m2\plugin-registry.xml' >> [DEBUG] Building Maven global-level plugin registry from: 'D: \Program >> Files\apache-maven-2.0.9\conf\plugin-registry.xml' >> [INFO] Scanning for projects... >> [INFO] Searching repository for plugin with prefix: 'myplugin'. >> [DEBUG] Loading plugin prefixes from group: com.taobao.maven.plugins >> -> does it work? >> [DEBUG] Loading plugin prefixes from group: org.apache.maven.plugins >> [DEBUG] Loading plugin prefixes from group: org.codehaus.mojo >> [DEBUG] maven-myplugin-plugin: using locally installed snapshot >> [DEBUG] Artifact not found - using stub model: Unable to determine the >> latest version >> >> org.apache.maven.plugins:maven-myplugin-plugin:pom:LATEST >> >> >> [DEBUG] Using defaults for missing POM >> org.apache.maven.plugins:maven-myplugin-plugin:pom:LATEST >> [DEBUG] maven-myplugin-plugin: using locally installed snapshot >> [DEBUG] Artifact not found - using stub model: Unable to determine the >> release version >> >> org.apache.maven.plugins:maven-myplugin-plugin:pom:RELEASE >> >> >> [DEBUG] Using defaults for missing POM >> org.apache.maven.plugins:maven-myplugin-plugin:pom:RELEASE >> [INFO] >> --- - >> [ERROR] BUILD ERROR >> [INFO] >> --- - >> [INFO] The plugin 'org.apache.maven.plugins:maven-myplugin- plugin' does >> not exist or no valid version could be found >> [INFO] >> --- - >> [DEBUG] Trace >> org.apache.maven.lifecycle.LifecycleExecutionException: The plugin >> 'org.apache.maven.plugins:maven-myplugin-plugin' does not exist or no valid >> version could be found >> at >> org. apache. maven. lifecycle. DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java: 1303) >> at >> org. apache. maven. lifecycle. DefaultLifecycleExecutor. getMojoDescriptor(DefaultLifecycleExecutor.java:1542) >> at >> org. apache. maven. lifecycle. DefaultLifecycleExecutor. segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:405) >> at >> org. apache. maven. lifecycle. DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:137) >> 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: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.apache.maven.plugin.version.PluginVersionNotFou
Re: for org/testng/testng/5.8/
inbroker wrote: > > > I tried the following in Eclipse and worked fine > > org.testng > testng > 5.8 > jar > jdk15 > compile > > although this was from the central repository. > http://repo1.maven.org/maven2. > > I hope it helps. > Inbroker > Bingo, it works! Thanks. -- View this message in context: http://www.nabble.com/%3Cdenpendency-%3E-for-org-testng-testng-5.8--tp21476664p21476836.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: for org/testng/testng/5.8/
thomas2004 wrote: > > I need the "testng-5.8-jdk15.jar" in my program and I find it under: > http://mirrors.ibiblio.org/pub/mirrors/maven2/org/testng/testng/5.8/ > I tried the following in Eclipse and worked fine org.testng testng 5.8 jar jdk15 compile although this was from the central repository. http://repo1.maven.org/maven2. I hope it helps. Inbroker -- View this message in context: http://www.nabble.com/%3Cdenpendency-%3E-for-org-testng-testng-5.8--tp21476664p21476760.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
for org/testng/testng/5.8/
Hi all, I need the "testng-5.8-jdk15.jar" in my program and I find it under: http://mirrors.ibiblio.org/pub/mirrors/maven2/org/testng/testng/5.8/ I put this dependency in the "pom.xml" as follow but it couldn't find that. What is the correct writting for ? org.testng testng-5.8 5.8-jdk15 -- View this message in context: http://www.nabble.com/%3Cdenpendency-%3E-for-org-testng-testng-5.8--tp21476664p21476664.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
Maven-bundle-plugin and Swing
Hello Maveneers, i am kinda freshman in maven and in java world as well so please excuse me if the question is kinda easy to answer but i am really frustrated. I am developing an OSGI bundle using Eclipse , m2eclipse , maven-bundle-plugin for the packaging and pax cursor for running the OSGI environment. So far I have made some client/server bundles that communicating fine just writing messages on the console. Now i try to show these messages in a simple GUI. When i simply try to import javax.swing and just maven install i get the ERROR message "package javax.swing does not exist" I added in the pom.xml file in the section the javax.swing.*. I tried to find the mavenized project of swing but it didn't exist. What am I doing wrong. >From internet search i have the impression that is totally ok for a bundle to be the UI component. Thanks in advance for your help. -- View this message in context: http://www.nabble.com/Maven-bundle-plugin-and-Swing-tp21476430p21476430.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
Use of profiles
I can't recall where I read the advice but I've been using profiles to set up various test scenarios. This works well as I can then use the dependency logic. These are manually run tests via the command like as in mvn -Ptest1 Within the profile I can then create a database, load it with test data, run test cases against it and so on. What I'm finding is the profiles which effectively implement the test cases are in need of refactoring and something like the ability for one profile to call another would be great. So, for example, a base profile would set up the base database and other profiles would add specific test data to that. So, the first question is, is this use of profiles correct? I can see that primary purpose of profiles is to set up, well profiles, of different scenarios for the build. In this respect the use of profiles for specific tests falls loosely into this category. However, the use of profiles to perform a kind of macro or script does not seem correct. So, my second question is, what alternative is there to perform these types of tests since the clever stuff that Maven does behind the scenes is a requirement and there does not appear to be another way to achieve this functionality? Thanks.
How to exclude a package from compile
Hi, I've got a java package (along with the jar dependencies it uses) that I do not want to be added to the war file we send to our client. Also, I do not want the pom.xml to be part of the war file. (This is the default, the devevelopment war file is build by using a profile). I tried this: ${basedir}/src/main/java/com/package1/package2/package3/** *.* ${basedir}/** pom.xml However, this doesn't work! :-( I also tried this: maven-compiler-plugin 2.0.2 ${javaVersion} ${javaVersion} ${basedir}/src/main/java/com/package1/package2/package3/** **/pom.xml However, this neither worked! :-( Last but not least - when I get this to work - I have a dependency that is only used by the package I want to remove anyway - so I can simply remove this dependency too, or how?? Thanks in advance! Peter
Re: Does the in the setting.xml work?
does the pluginGroups in the setting.xml work? anybody comes to this problem? On Mon, Nov 24, 2008 at 3:21 PM, 苏林冲 wrote: > Anybody konw this? > > 2008/11/21 苏林冲 > > Hi, all >> I have set below in setting.xml >> >> com.mycompany.maven.plugins >> >> >> when i run myplugin:exec , maven print these in the console >> >> [INFO] Scanning for projects... >> [INFO] Searching repository for plugin with prefix: 'myplugin'. >> [INFO] >> >> [ERROR] BUILD ERROR >> [INFO] >> >> [INFO] The plugin 'org.apache.maven.plugins:maven-myplugin-plugin' does >> not exist or no valid version could be found >> [INFO] >> >> [INFO] For more information, run Maven with the -e switch >> [INFO] >> >> [INFO] Total time: < 1 second >> [INFO] Finished at: Fri Nov 21 13:05:34 CST 2008 >> [INFO] Final Memory: 1M/2M >> [INFO] >> >> >> why does maven define the groupId "org.apache.maven.plugins" rather than" >> com.mycompany.maven.plugins"? >> >> And below is also the log infomation with -X >> >> >> + Error stacktraces are turned on. >> Maven version: 2.0.9 >> Java version: 1.5.0_16 >> OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows" >> [DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and >> Settings\sulinchong.pt\.m2\plugin-registry.xml' >> [DEBUG] Building Maven global-level plugin registry from: 'D:\Program >> Files\apache-maven-2.0.9\conf\plugin-registry.xml' >> [INFO] Scanning for projects... >> [INFO] Searching repository for plugin with prefix: 'myplugin'. >> [DEBUG] Loading plugin prefixes from group: com.taobao.maven.plugins >> -> does it work? >> [DEBUG] Loading plugin prefixes from group: org.apache.maven.plugins >> [DEBUG] Loading plugin prefixes from group: org.codehaus.mojo >> [DEBUG] maven-myplugin-plugin: using locally installed snapshot >> [DEBUG] Artifact not found - using stub model: Unable to determine the >> latest version >> >> org.apache.maven.plugins:maven-myplugin-plugin:pom:LATEST >> >> >> [DEBUG] Using defaults for missing POM >> org.apache.maven.plugins:maven-myplugin-plugin:pom:LATEST >> [DEBUG] maven-myplugin-plugin: using locally installed snapshot >> [DEBUG] Artifact not found - using stub model: Unable to determine the >> release version >> >> org.apache.maven.plugins:maven-myplugin-plugin:pom:RELEASE >> >> >> [DEBUG] Using defaults for missing POM >> org.apache.maven.plugins:maven-myplugin-plugin:pom:RELEASE >> [INFO] >> >> [ERROR] BUILD ERROR >> [INFO] >> >> [INFO] The plugin 'org.apache.maven.plugins:maven-myplugin-plugin' does >> not exist or no valid version could be found >> [INFO] >> >> [DEBUG] Trace >> org.apache.maven.lifecycle.LifecycleExecutionException: The plugin >> 'org.apache.maven.plugins:maven-myplugin-plugin' does not exist or no valid >> version could be found >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1303) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1542) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:405) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:137) >> 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: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.apache.maven.plugin.version.PluginVersionNotFoundException: >> The plugin 'org.apache.maven.plugins:maven-myplugin-plugin' does not exist >> or no valid version could be found >> at >> org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:229) >>
Re: How to install Maven plugins locally
zhang's suggestion is better^_^ yes ,copy the local repo from another machine also is good ! On Thu, Jan 15, 2009 at 4:53 PM, Gabriele Columbro < g.colum...@sourcesense.com> wrote: > 2009/1/15 Guofeng Zhang > > > It would be simpler if you could install a Maven Repository Management > > in your Intranet, or copy the local repository from one machine to the > > build machine, then run maven offline. > > > > I agree with Zhang, this is the typical scenario for a Maven repository > manager which proxies your calls to the internet. > As an example, I'm having very good experiences with Nexus from Sonatype > [1]. > > Isn't this an option? > > Hope this helps, > Gab > > > [1] http://nexus.sonatype.org/ > > > > > > > -Original Message- > > From: Thummala, Sandhya [mailto:sandhya.thumm...@ca.com] > > Sent: Thursday, January 15, 2009 1:20 PM > > To: users@maven.apache.org > > Subject: How to install Maven plugins locally > > > > Hi All, > > I am using maven-surefire-report-plugin to generate unit test reports. > > Is there a way to install maven plugins locally? To explain further, if > > my build machine doesn't have internet access, I download the maven > > plugins that are required to run the reports manually, then install each > > of these plugins on the build machine using install-file goal, then use > > it to generate sure-fire reports. > > I tried doing this, maven-surefire-report-plugin is installed in my > > local repository using mvn install, but while executing the build, maven > > is not able to find this plugin. I am getting following error: > > [exec] [ERROR] BUILD ERROR > > [exec] [INFO] > > > > [exec] [INFO] The plugin > > 'org.apache.maven.plugins:maven-surefire-report-plugin' does not exist > > or no valid version could be found > > > > Any pointers would be appreciated. > > Thanks > > Sandhya Thummala > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > > For additional commands, e-mail: users-h...@maven.apache.org > > > > > > > -- > Gabriele Columbro > Alfresco ECM Product Strategy Consultant > +31 627 565 103 > Sourcesense - Making sense of open Source (http://www.sourcesense.com) > -- 漠洋(苏琳冲) SuLinchong Phone 13656669328 Qq387973308 Msn sulinch...@hotmail.com
Re: How to install Maven plugins locally
2009/1/15 Guofeng Zhang > It would be simpler if you could install a Maven Repository Management > in your Intranet, or copy the local repository from one machine to the > build machine, then run maven offline. > I agree with Zhang, this is the typical scenario for a Maven repository manager which proxies your calls to the internet. As an example, I'm having very good experiences with Nexus from Sonatype [1]. Isn't this an option? Hope this helps, Gab [1] http://nexus.sonatype.org/ > > -Original Message- > From: Thummala, Sandhya [mailto:sandhya.thumm...@ca.com] > Sent: Thursday, January 15, 2009 1:20 PM > To: users@maven.apache.org > Subject: How to install Maven plugins locally > > Hi All, > I am using maven-surefire-report-plugin to generate unit test reports. > Is there a way to install maven plugins locally? To explain further, if > my build machine doesn't have internet access, I download the maven > plugins that are required to run the reports manually, then install each > of these plugins on the build machine using install-file goal, then use > it to generate sure-fire reports. > I tried doing this, maven-surefire-report-plugin is installed in my > local repository using mvn install, but while executing the build, maven > is not able to find this plugin. I am getting following error: > [exec] [ERROR] BUILD ERROR > [exec] [INFO] > > [exec] [INFO] The plugin > 'org.apache.maven.plugins:maven-surefire-report-plugin' does not exist > or no valid version could be found > > Any pointers would be appreciated. > Thanks > Sandhya Thummala > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Gabriele Columbro Alfresco ECM Product Strategy Consultant +31 627 565 103 Sourcesense - Making sense of open Source (http://www.sourcesense.com)
RE: How to install Maven plugins locally
It would be simpler if you could install a Maven Repository Management in your Intranet, or copy the local repository from one machine to the build machine, then run maven offline. -Original Message- From: Thummala, Sandhya [mailto:sandhya.thumm...@ca.com] Sent: Thursday, January 15, 2009 1:20 PM To: users@maven.apache.org Subject: How to install Maven plugins locally Hi All, I am using maven-surefire-report-plugin to generate unit test reports. Is there a way to install maven plugins locally? To explain further, if my build machine doesn't have internet access, I download the maven plugins that are required to run the reports manually, then install each of these plugins on the build machine using install-file goal, then use it to generate sure-fire reports. I tried doing this, maven-surefire-report-plugin is installed in my local repository using mvn install, but while executing the build, maven is not able to find this plugin. I am getting following error: [exec] [ERROR] BUILD ERROR [exec] [INFO] [exec] [INFO] The plugin 'org.apache.maven.plugins:maven-surefire-report-plugin' does not exist or no valid version could be found Any pointers would be appreciated. Thanks Sandhya Thummala - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
AW: How to add a dependency dynamically during the build in a plugin?
Anyone? :-) > -Ursprüngliche Nachricht- > Von: Lewis, Eric [mailto:eric.le...@ipi.ch] > Gesendet: Dienstag, 13. Januar 2009 14:15 > An: Maven Users List > Betreff: How to add a dependency dynamically during the build > in a plugin? > > Hi > > I just started to write my first plugin which should add some JARs > dynamically to the project's dependencies. > Unfortunately, I found no documentation about how to add a > dependency at > runtime (Sonatype book, Maven site, blogs...). > > I have the project injected by Plexus and want to add some > dependencies > like this: > Dependency dependency = new Dependency(); > dependency.setGroupId(groupId); > dependency.setArtifactId(artifactId); > dependency.setVersion(version); > dependency.setScope("system"); > dependency.setSystemPath(jarFile.getAbsolutePath()); > this.project.getDependencies().add(dependency); > > When using this.project.getDependencies() later on, I find those > dependencies. > > However, I also added the Maven dependency plugin later in > the build to > have a list of dependencies: > > org.apache.maven.plugins > maven-dependency-plugin > > > package > > list > > > > > true > > true > > > > But it only shows the existing dependencies from the POM: > [INFO] [dependency:list {execution: default}] > [INFO] > [INFO] The following files have been resolved: > [INFO]commons-lang:commons-lang:jar:2.4:compile:C:\Documents and > Settings\xyz\.m2\repository\commons-lang\commons-lang\2.4\comm > ons-lang-2 > .4.jar > > So obviously, it doesn't work. > > I also tried > this.project.getDependencyManagement().addDependency(dependency); > > which didn't change anything. > > Is there a reference about the internals of the dependency mechanism? > > Best regards, > Eric > > - > 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