maven-enforcer-plugin to ban a transitive provided dependency
Hi, I have the following scenario: my project (A) has a number of compile dependencies on other internal projects (B0, B1, B2 ...). I would like to break the build of A in case Bx has been built depending on an older release of A. So for instance: A:2.0-SNAPSHOT depends on B3:2.3 and B3:2.3 depends on A:1.0 and this dependency is provided. I tried to use the maven-enforcer-plugin to break the build of A in case there is a transitive dependency whose groupId and artifactId are the same as A, but it doesn't work because the dependency A:1.0 is provided. Any suggestions? -- View this message in context: http://maven.40175.n5.nabble.com/maven-enforcer-plugin-to-ban-a-transitive-provided-dependency-tp5752733.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: maven
hi Miri, first, go to the folder project, where is pom.xml and execute mvn clean install, that sentences clean, compile and deploy the project into repository. Second, execute mvn eclipse:eclipse and then import maven project from eclipse. Let us know how about was. regards Alonso Isidoro Roman. Mis citas preferidas (de hoy) : Si depurar es el proceso de quitar los errores de software, entonces programar debe ser el proceso de introducirlos... - Edsger Dijkstra My favorite quotes (today): If debugging is the process of removing software bugs, then programming must be the process of putting ... - Edsger Dijkstra If you pay peanuts you get monkeys 2013/4/5 Hossein Miri hm...@me.com Hi everyone, I have a folder that contains some Java code, written specifically for Linux. There is a pom.xml file and two folders called: src and build I have installed Eclipse Juno on my Mac (10.7.5) and I understand it already has Maven included. On the Linux machine, the code is executed by entering mvn package at the command line. But after this stage, it doesn't run on my Mac, because some of the commands are specific to Linux (I am told). How do I import the whole project into Maven on my Mac? I mean where do I copy the folders and pom file? p.s. I am only just beginning to learn Java programming using the Eclipse IDE and my installation details are in the image attached... Thank you, H [image: mvn.tiff]
Re: maven-enforcer-plugin to ban a transitive provided dependency
provided scope is not transitive, so that is why the build will not fail using the enforcer rule that scans transitive dependencies. You probably will need to write your own rule if this is something that you need On 5 April 2013 09:47, dsilve davide.silves...@gmail.com wrote: Hi, I have the following scenario: my project (A) has a number of compile dependencies on other internal projects (B0, B1, B2 ...). I would like to break the build of A in case Bx has been built depending on an older release of A. So for instance: A:2.0-SNAPSHOT depends on B3:2.3 and B3:2.3 depends on A:1.0 and this dependency is provided. I tried to use the maven-enforcer-plugin to break the build of A in case there is a transitive dependency whose groupId and artifactId are the same as A, but it doesn't work because the dependency A:1.0 is provided. Any suggestions? -- View this message in context: http://maven.40175.n5.nabble.com/maven-enforcer-plugin-to-ban-a-transitive-provided-dependency-tp5752733.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: maven
Thank you . .I did the first two things, by moving to the folder that contains the pom.xmlfileand then running the following two commands in the Terminal:mvn clean installmvn eclipse:eclipseWhat do you mean by your last sentence?and then import maven project from eclipse.Do you mean in the Eclipse Juno IDE?When I go toEclipse,Help,Install New Softwareand look atWhat is already installedit shows thatm2e - Maven Integration for Eclipseis already installed.Is that what you mean?Hosseinhi Hossein, first, go to the folder project, where is pom.xml and execute mvn clean install, that sentences clean, compile and deploy the project into repository. Second, execute mvn eclipse:eclipseand then import maven project from eclipse.Let us know how about was.regardsAlonso Isidoro Roman.Hi everyone,I have a folder that contains some Java code, written specifically for Linux.There is a pom.xmlfile and two folders called: srcand buildI have installed Eclipse Juno on my Mac (10.7.5) and I understandit already has Maven included.On the Linux machine, the code isexecuted by enteringmvn packageat the command line.But after this stage, it doesn't run on my Mac, because some of thecommands are specific to Linux (I am told).How do I import thewhole project into Maven on my Mac?I mean where do I copythe folders and pom file?p.s. I am only just beginning to learn Java programming using the Eclipse IDEand my installation details are in the image attached...Thank you,H
Re: maven
Hi, If you use Juno with the corresponding m2e , you *MUST NOT* use eclipse:eclipse. if you already have remove the .project .classpath and .settings first, Then import the project as existing maven project. (in eclipse, File import Existing maven projects select the project folder ...) Also it is generaly not a good idea to use mvn install (prefer mvn package), especially if you intend to use with m2e/eclipse. If you have errors after the import, you may have a look at http://wiki.eclipse.org/M2E_plugin_execution_not_covered . On Fri, Apr 5, 2013 at 1:56 PM, Hossein Miri hm...@me.com wrote: Thank you . . I did the first two things, by moving to the folder that contains the pom.xml file and then running the following two commands in the Terminal: mvn clean install mvn eclipse:eclipse What do you mean by your last sentence? and then import maven project from eclipse. Do you mean in the Eclipse Juno IDE? When I go to Eclipse , Help , Install New Software and look at What is already installed it shows that m2e - Maven Integration for Eclipse is already installed. Is that what you mean? Hossein hi Hossein, first, go to the folder project, where is pom.xml and execute mvn clean install, that sentences clean, compile and deploy the project into repository. Second, execute mvn eclipse:eclipse and then import maven project from eclipse. Let us know how about was. regards Alonso Isidoro Roman. Hi everyone, I have a folder that contains some Java code, written specifically for Linux. There is a pom.xml file and two folders called: src and build I have installed Eclipse Juno on my Mac (10.7.5) and I understand it already has Maven included. On the Linux machine, the code is executed by entering mvn package at the command line. But after this stage, it doesn't run on my Mac, because some of the commands are specific to Linux (I am told). How do I import the whole project into Maven on my Mac? I mean where do I copy the folders and pom file? p.s. I am only just beginning to learn Java programming using the Eclipse IDE and my installation details are in the image attached... Thank you, H -- Adrien Rivard
Re: maven
Uh, oh. mvn eclipse:eclipse is the wrong answer, probably. There are two ways to integrate Maven and eclipse. The older way is to run mvn eclipse:eclipse to create Eclipse metadata, and then you import into Eclipse as you would open any existing Eclipse project. This has a number of limitations and is no longer actively maintained. The newer way is to use the Eclipse command to import an existing Maven project. This has a different set of problems, but is under active development, and is what you will see described in current Eclipse documentation. This is called 'm2e'. These days, I think that most people are happier with m2e, which has its own mailing lists to consult if you do have problems. On Fri, Apr 5, 2013 at 7:56 AM, Hossein Miri hm...@me.com wrote: Thank you . . I did the first two things, by moving to the folder that contains the pom.xml file and then running the following two commands in the Terminal: mvn clean install mvn eclipse:eclipse What do you mean by your last sentence? and then import maven project from eclipse. Do you mean in the Eclipse Juno IDE? When I go to Eclipse , Help , Install New Software and look at What is already installed it shows that m2e - Maven Integration for Eclipse is already installed. Is that what you mean? Hossein hi Hossein, first, go to the folder project, where is pom.xml and execute mvn clean install, that sentences clean, compile and deploy the project into repository. Second, execute mvn eclipse:eclipse and then import maven project from eclipse. Let us know how about was. regards Alonso Isidoro Roman. Hi everyone, I have a folder that contains some Java code, written specifically for Linux. There is a pom.xml file and two folders called: src and build I have installed Eclipse Juno on my Mac (10.7.5) and I understand it already has Maven included. On the Linux machine, the code is executed by entering mvn package at the command line. But after this stage, it doesn't run on my Mac, because some of the commands are specific to Linux (I am told). How do I import the whole project into Maven on my Mac? I mean where do I copy the folders and pom file? p.s. I am only just beginning to learn Java programming using the Eclipse IDE and my installation details are in the image attached... Thank you, H - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-enforcer-plugin to ban a transitive provided dependency
Thank you Stephen! Does anybody knows if there is already a plugin able to this? David PS: Guys don't publish unrelated posts on this thread. -- View this message in context: http://maven.40175.n5.nabble.com/maven-enforcer-plugin-to-ban-a-transitive-provided-dependency-tp5752733p5752745.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: maven
El viernes, 5 de abril de 2013, Hossein Miri escribió: Thank you . . I did the first two things, by moving to the folder that contains the pom.xml file and then running the following two commands in the Terminal: mvn clean install mvn eclipse:eclipse What do you mean by your last sentence? and then import maven project from eclipse. Do you mean in the Eclipse Juno IDE? When I go to Eclipse , Help , Install New Software and look at What is already installed it shows that m2e - Maven Integration for Eclipse is already installed. Is that what you mean? Hossein Nop, i Mean that in eclipse you need to import the Maven project. I m using STS but i think is the same in every eclipse. Go File, Import,Maven,Existing maven projects... then you need to supply root maven project, the folder with pom.xml and click Finish. Tell us what about. hi Hossein, first, go to the folder project, where is pom.xml and execute mvn clean install, that sentences clean, compile and deploy the project into repository. Second, execute mvn eclipse:eclipse and then import maven project from eclipse. Let us know how about was. regards Alonso Isidoro Roman. Hi everyone, I have a folder that contains some Java code, written specifically for Linux. There is a pom.xml file and two folders called: src and build I have installed Eclipse Juno on my Mac (10.7.5) and I understand it already has Maven included. On the Linux machine, the code is executed by entering mvn package at the command line. But after this stage, it doesn't run on my Mac, because some of the commands are specific to Linux (I am told). How do I import the whole project into Maven on my Mac? I mean where do I copy the folders and pom file? p.s. I am only just beginning to learn Java programming using the Eclipse IDE and my installation details are in the image attached... Thank you, H
Sonatype Nexus and Read - Error transferring file: Read timed out
Hi all, Does anyone know how to control the timeout settings for a mirror in the maven settings file or in the dependency plugin? I see that I can modify timeout settings for a server but not a repository or a mirror. I assume there's a relationship between them but I'm unsure of how to get maven to report about (effective-pom and -X doesn't seem to list server setting information on dependency:resolve) Since upgrading nexus oss from 1.8.0 to 2.3x and moving to a VM I'm seeing problems with timeouts and nothing useful in the nexus debug log alas. I figure I have two options: improve nexus server performance or configure maven settings to wait longer for artifacts. I don't see much to do with my server so I'm looking into the maven side. *maven error* Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project foo: from/to snapshots (http://mycorp.com/nexus/content/repositories /snapshots): Error transferring file: Read timed out - [Help 1] Please let me know if you know to configure maven's wagon etc to relax its timeout. Thanks Peter -- Peter Kahn citizenk...@gmail.com http://www.google.com/profiles/citizenkahn Awareness - Intention - Action
package R does not exist in android project
I am trying to build with maven our android existing project that has been build with eclipse. I had to do a lot of changes and tinkering around pom.xml files. Project is dependent on other projects, so they have their own pom.xml files. I was able to individually compile these projects with their pom.xml's but the master project I am getting this error: cannot find symbol: class R package R does not exist I am using intellij12. The master pom.xml is given below. ?xml version=1.0 encoding=UTF-8? project xmlns=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/POM/4.0.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/POM/4.0.0http://maven.apache.org/xsd/maven-4.0.0.xsd http://maven.apache.org/xsd/maven-4.0.0.xsd modelVersion4.0.0/modelVersion artifactId corp /artifactId version1.0-SNAPSHOT/version parent groupIdcom.corp/groupId artifactId corp-android/artifactId version1.0/version relativePath../pom.xml/relativePath /parent repositories !--TODO remove absolute paths-- repository idlibGoogleAnalyticsV2/id urlfile:///Users/malugus/code/android/corp/libs/libGoogleAnalyticsV2.jar/url /repository repository idflurryagent/id urlfile:///Users/malugus/code/android/corp/libs/FlurryAgent.jar/url /repository repository idbeacon-utils/id urlfile:///Users/malugus/code/android/corp/libs/beacon-utils-0.0.8.jar/url /repository /repositories dependencies dependency groupIdcom.google.analytics/groupId artifactIdlibGoogleAnalyticsV2/artifactId versionr2/version /dependency dependency groupIdcom.flurry.android.FlurryAgent/groupId artifactIdflurryagent/artifactId version1.0.0/version scopeprovided/scope /dependency dependency groupIdus.beacondigital.utils/groupId artifactIdbeacon-utils/artifactId version1.0.0/version /dependency dependency groupIdcom.viewpagerindicator/groupId artifactIdlibrary/artifactId version2.4.1/version typeapklib/type /dependency dependency groupIdcom.actionbarsherlock/groupId artifactIdactionbarsherlock/artifactId version4.2.0/version /dependency dependency groupIdcom.slidingmenu/groupId artifactIdslidingmenu/artifactId version1.2.2/version /dependency /dependencies build finalName${project.artifactId}/finalName plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-resources-plugin/artifactId executions execution !-- use the copy resources instead of resources, which adds it to the eclipse buildpath -- phaseinitialize/phase goals goalcopy-resources/goal /goals configuration outputDirectory${project.basedir}/res/outputDirectory resources resource directory${project.basedir}/src/templates/res/directory targetPath${project.basedir}/res/targetPath filteringtrue/filtering /resource /resources /configuration /execution /executions /plugin plugin groupIdcom.jayway.maven.plugins.android.generation2/groupId artifactIdandroid-maven-plugin/artifactId extensionstrue/extensions configuration manifest debuggabletrue/debuggable /manifest /configuration executions execution idmanifestUpdate/id phaseprocess-resources/phase goals goalmanifest-update/goal /goals /execution execution idalignApk/id phasepackage/phase goals goalzipalign/goal /goals /execution /executions /plugin /plugins /build /project There are few things I want to mention about this I am only sure about the dependencies part, the plugin part is something I pasted from other sample projects and this is where I think the trouble is. Also ignore the parent part I think it has no use for me. Based on the error seems like project is not building in the correct order, first it needs to build/compile R and then so on, right? Pointers in right direction are appreciated. -Satyajit
Re: Sonatype Nexus and Read - Error transferring file: Read timed out
Am 05.04.2013 18:26 schrieb Peter Kahn citizenk...@gmail.com: Hi all, Does anyone know how to control the timeout settings for a mirror in the maven settings file or in the dependency plugin? I see that I can modify timeout settings for a server but not a repository or a mirror. I assume there's a relationship between them but I'm unsure of how to get maven to report about (effective-pom and -X doesn't seem to list server setting information on dependency:resolve) Since upgrading nexus oss from 1.8.0 to 2.3x and moving to a VM I'm seeing problems with timeouts and nothing useful in the nexus debug log alas. Could as well be a firewall/routing issue. Check whether you can DL an artifact using curl or wget. Increase firewall logging (any packets dropped? Whitelisting rule missing for new VM?) I figure I have two options: improve nexus server performance or configure maven settings to wait longer for artifacts. I don't see much to do with my server so I'm looking into the maven side. *maven error* Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project foo: from/to snapshots (http://mycorp.com/nexus/content/repositories /snapshots): Error transferring file: Read timed out - [Help 1] Please let me know if you know to configure maven's wagon etc to relax its timeout. Thanks Peter -- Peter Kahn citizenk...@gmail.com http://www.google.com/profiles/citizenkahn Awareness - Intention - Action
Re: Sonatype Nexus and Read - Error transferring file: Read timed out
Alas, my problem is an intermittent one not a consistent one. Sorry, should have mentioned that. My build plans routinely scrape their local repos to make sure builds are clean and not succeeding artificially. Every 6 builds or so hits this problem.My current plan is to move from maven 3.0.3 to 3.0.5 as the wagon changed with different defaults for timeouts. However, I feel like I should be able to artificially induce this problem by adding server settings to my pom/settings files. However, I don't understand the relationship between server / repository and settings. Nor do I see anything about wagon timeouts in my effective-pom or debug output (mvn -X ...). So, I don't know if I am having any impact when I foolishly try to set timeouts to one millisecond. I'd expect that settings for server with ids matching repositories force maven to use those settings when it gets and puts artifacts. Since I use a mirror, I'd expect those settings to get transferred to the mirror as well. Peter On Fri, Apr 5, 2013 at 3:14 PM, Ansgar Konermann ansgar.konerm...@googlemail.com wrote: Am 05.04.2013 18:26 schrieb Peter Kahn citizenk...@gmail.com: Hi all, Does anyone know how to control the timeout settings for a mirror in the maven settings file or in the dependency plugin? I see that I can modify timeout settings for a server but not a repository or a mirror. I assume there's a relationship between them but I'm unsure of how to get maven to report about (effective-pom and -X doesn't seem to list server setting information on dependency:resolve) Since upgrading nexus oss from 1.8.0 to 2.3x and moving to a VM I'm seeing problems with timeouts and nothing useful in the nexus debug log alas. Could as well be a firewall/routing issue. Check whether you can DL an artifact using curl or wget. Increase firewall logging (any packets dropped? Whitelisting rule missing for new VM?) I figure I have two options: improve nexus server performance or configure maven settings to wait longer for artifacts. I don't see much to do with my server so I'm looking into the maven side. *maven error* Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project foo: from/to snapshots (http://mycorp.com/nexus/content/repositories /snapshots): Error transferring file: Read timed out - [Help 1] Please let me know if you know to configure maven's wagon etc to relax its timeout. Thanks Peter -- Peter Kahn citizenk...@gmail.com http://www.google.com/profiles/citizenkahn Awareness - Intention - Action -- Peter Kahn citizenk...@gmail.com http://www.google.com/profiles/citizenkahn Awareness - Intention - Action
osxappbundle-maven-plugin
I'm not a Mac user and I'm new to Maven, so I'm completely out of my element here. I'm trying to use osxappbundle-maven-plugin to build app bundles on Linux. The bundle I produced doesn't appear to do anything at all. My app doesn't start, but there are no error messages. I think it may have something to do with my info.plist settings, but I have no idea what the plugin expects. Does anyone have any experience with this plugin? Could I ditch it and build an app bundle using a custom assembly descriptor? ~K Here's how I'm using it: plugin groupIdorg.codehaus.mojo/groupId artifactIdosxappbundle-maven-plugin/artifactId version1.0-alpha-2/version configuration mainClasskrum.weaponm.WeaponM/mainClass jvmVersion1.6+/jvmVersion javaApplicationStub${basedir}/osx/JavaAppLauncher/javaApplicationStub iconFile${basedir}/osx/WeaponM.icns/iconFile zipFile${project.build.directory}/${project.build.finalName}-osx.zip/zipFile /configuration executions execution phasepackage/phase goals goalbundle/goal /goals /execution /executions /plugin - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org