skip a single junit test from command line
Hi, Is there a way to skip a single junit test while running from command line (without changing the java code or pom.xml?) mvn install -DskipTests -> this will work for all tests so something like mvn install -DskipTests='path/to/test/Test.java' to ignore a single one... ? thanks!
Re: Making findbugs:check fail on only high bugs
can you please explain? Sonar is a server by itself, how i can i use it while running a job on jenkins? is there a maven plugin i can use together with the findbugs without installing sonar? Eyal. On Thu, Apr 28, 2011 at 4:13 PM, Yanko, Curtis wrote: > This might be a good place to try Sonar along with the Build Breaker > plugin. > > > > Curt Yanko > > > > -Original Message- > > From: eyal edri [mailto:eyal.e...@gmail.com] > > Sent: Thursday, April 28, 2011 8:39 AM > > To: Maven Users List > > Subject: Making findbugs:check fail on only high bugs > > > > Hi, > > > > i'm running the maven findbugs plugin (via jenkins) and want > > it to fail only when it find High Level bugs. > > > > when running findbugs:findbugs the build doesn't fail and > > only show the list of plugins. > > when running findbugs:check, the build fails when it > > encouters the low level bugs. > > > > how can i tell it to fail the build only on high ? > > > > i've tried settings the param to high, but i > > believe this only affect the bugs shown on the report and not > > the build fail level. > > > > can anyone help? > > > > thanks > > > > > > Eyal. > > > > This e-mail, including attachments, may include confidential and/or > proprietary information, and may be used only by the person or entity > to which it is addressed. If the reader of this e-mail is not the intended > recipient or his or her authorized agent, the reader is hereby notified > that any dissemination, distribution or copying of this e-mail is > prohibited. If you have received this e-mail in error, please notify the > sender by replying to this message and delete this e-mail immediately. > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Making findbugs:check fail on only high bugs
Hi, i'm running the maven findbugs plugin (via jenkins) and want it to fail only when it find High Level bugs. when running findbugs:findbugs the build doesn't fail and only show the list of plugins. when running findbugs:check, the build fails when it encouters the low level bugs. how can i tell it to fail the build only on high ? i've tried settings the param to high, but i believe this only affect the bugs shown on the report and not the build fail level. can anyone help? thanks Eyal.
findbugs plugin: effect on effort attribute in configuration
Can someone explain what is the effect of the 'effort' attribute in the configuration? is there a risk for false positives with this option? thanks Eyal.
Re: No such command 'status' when running mvn release:prepare
I did actually, that's how i got the trace. here's a line i noticed: [DEBUG] Repository created: host:ctcm, port:5050, depot:CT_Dev_2.1.0, streamName:/CT_Dev_2.1.0_eyale/Server/WebSec/ct-AutoFp, workspaceName:null, checkoutMethod:pop, params:{} i see the workspaceName = null, maybe there is a problem with the scm connection str? e. On Tue, Sep 14, 2010 at 1:01 PM, Prashant Bhate < prashant.mailing.l...@gmail.com> wrote: > Try running command again with verbosity > > mvn -X -e release:prepare > > you might see some clue. > > Prashant Bhate > > On Tue, Sep 14, 2010 at 11:52 AM, eyal edri wrote: > > > Hi, > > > > i configured an scm in my pom.xml file: > > > > > >scm:accurev:@ctcm > > :5050:CT_Dev_2.1.0:/Server/WebSec/ct-AutoFp > > > >scm:accurev:@ctcm > > :5050:CT_Dev:/CT_Dev_2.1.0/Server/WebSec/ct-AutoFp > > > >http://ctcm:5050 > > > > > > when i run mvn scm:list it works fine, but mvn release:prepare fails: > > > > > > [ERROR] BUILD ERROR > > [INFO] > > > > [INFO] An error occurred during the status check process: No such command > > 'status'. > > > > [INFO] > > > > [DEBUG] Trace > > org.apache.maven.lifecycle.LifecycleExecutionException: An error occurred > > during the status check process: No such command 'status'. > > at > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) > > at > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) > > at > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) > > at > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) > > at > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284) > > at > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) > > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) > > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) > > at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) > > at > org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) > > 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:597) > > 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.MojoExecutionException: An error > > occurred > > during the status check process: No such command 'status'. > > at > > > > > org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:165) > > at > > > > > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) > > at > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) > > ... 17 more > > Caused by: org.apache.maven.shared.release.ReleaseExecutionException: An > > error occurred during the status check process: No such command 'status'. > > at > > > > > org.apache.maven.shared.release.phase.ScmCheckModificationsPhase.execute(ScmCheckModificationsPhase.java:103) > > at > > > > > org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:196) > > at > > > > > org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:133) > > at > > > > > org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:96) > > at > > > > > org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.ja
No such command 'status' when running mvn release:prepare
Hi, i configured an scm in my pom.xml file: scm:accurev:@ctcm:5050:CT_Dev_2.1.0:/Server/WebSec/ct-AutoFp scm:accurev:@ctcm:5050:CT_Dev:/CT_Dev_2.1.0/Server/WebSec/ct-AutoFp http://ctcm:5050 when i run mvn scm:list it works fine, but mvn release:prepare fails: [ERROR] BUILD ERROR [INFO] [INFO] An error occurred during the status check process: No such command 'status'. [INFO] [DEBUG] Trace org.apache.maven.lifecycle.LifecycleExecutionException: An error occurred during the status check process: No such command 'status'. at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) 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:597) 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.MojoExecutionException: An error occurred during the status check process: No such command 'status'. at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:165) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more Caused by: org.apache.maven.shared.release.ReleaseExecutionException: An error occurred during the status check process: No such command 'status'. at org.apache.maven.shared.release.phase.ScmCheckModificationsPhase.execute(ScmCheckModificationsPhase.java:103) at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:196) at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:133) at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:96) at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:161) ... 19 more Caused by: org.apache.maven.scm.NoSuchCommandScmException: No such command 'status'. at org.apache.maven.scm.provider.AbstractScmProvider.status(AbstractScmProvider.java:646) at org.apache.maven.scm.provider.AbstractScmProvider.status(AbstractScmProvider.java:639) at org.apache.maven.shared.release.phase.ScmCheckModificationsPhase.execute(ScmCheckModificationsPhase.java:98) ... 23 more [INFO] [INFO] Total time: 4 seconds [INFO] Finished at: Tue Sep 14 12:35:20 IST 2010 [INFO] Final Memory: 16M/151M [INFO] ---- Any ideas? -- Eyal Edri
how to change param value based on os value
Hi, i'm trying to create one profile that will change one of it's param values based on the OS. here is the profile: (used for deploying rpm to yum repository) rpm org.codehaus.mojo wagon-maven-plugin deploy-remote-rpm deploy upload target/rpm/${project.artifactId}/RPMS/noarch *.rpm scp://yumrepo.company.com /ctcfgroot/stable/src/all/${project.artifactId} -> if the OS is fedora 12, the dir should be /ctcfgroot/*stable-fc12* /src. org.codehaus.mojo exec-maven-plugin build-remote-yum-repo deploy exec ssh ${remoteYumRepo} cd /ctcfgroot/stable;make -> if the OS is fedora 12, the dir should be /ctcfgroot/*stable-fc12*/ any ideas? -- Eyal Edri
Re: exec plugin:how to run plugin both in pom parent and pom without overriding executions?
I managed to make it work only when moving the local exec command in the pom to a new profile and making it not activation by default. On Sun, Aug 1, 2010 at 10:55 AM, eyal edri wrote: > Problem is i want both of them to work, > each works at a different lifecycle. > > the parent one is a general exec for rpm deploy, and the local one in pom > is a specific one for open a tar. > > > On Sun, Aug 1, 2010 at 10:44 AM, Stephen Connolly < > stephen.alan.conno...@gmail.com> wrote: > >> why not make the execution in th eparent pom false? >> >> On 1 August 2010 08:27, eyal edri wrote: >> >> > Hi, >> > >> > i'm trying to run an execution of the exec plugin in a pom. >> > the build is the default profile: >> > >> >* * >> > *org.codehaus.mojo* >> > *exec-maven-plugin* >> > ** >> > * * >> > *open-tarball* >> > *validate* >> > ** >> > * exec* >> > ** >> > * * >> > ** >> > ** >> > * tar* >> > * * >> > *-zxvf* >> > *src/main/tar/${tar-ver}.tar.gz* >> > *-C* >> > *src/main/tar/* >> > * * >> > ** >> > * * >> > >> > i also have an execution in the pom parent: >> > >> > ** >> > * rpm-local* >> > * * >> > ** >> > * * >> > *org.codehaus.mojo* >> > *exec-maven-plugin* >> > ** >> > * * >> > *build-local-yum-repo* >> > *deploy* >> > ** >> > * exec* >> > ** >> > * * >> > * * >> > ** >> > * ssh* >> > * * >> > *${localYumRepo}* >> > *cd /rpm-home/;make* >> > * * >> > ** >> > * * >> > ** >> > * * >> > ** >> > >> > the pom overrides the execution on the parent pom, although its in a >> > different profile and have a diff ID. >> > >> > anyone knows how to overcome this? >> > >> > thanks, >> > >> > >> > -- >> > Eyal Edri >> > >> > > > > -- > Eyal Edri > -- Eyal Edri
Re: exec plugin:how to run plugin both in pom parent and pom without overriding executions?
Problem is i want both of them to work, each works at a different lifecycle. the parent one is a general exec for rpm deploy, and the local one in pom is a specific one for open a tar. On Sun, Aug 1, 2010 at 10:44 AM, Stephen Connolly < stephen.alan.conno...@gmail.com> wrote: > why not make the execution in th eparent pom false? > > On 1 August 2010 08:27, eyal edri wrote: > > > Hi, > > > > i'm trying to run an execution of the exec plugin in a pom. > > the build is the default profile: > > > >* * > > *org.codehaus.mojo* > > *exec-maven-plugin* > > ** > > * * > > *open-tarball* > > *validate* > > ** > > * exec* > > ** > > * * > > ** > > ** > > * tar* > > * * > > *-zxvf* > > *src/main/tar/${tar-ver}.tar.gz* > > *-C* > > *src/main/tar/* > > * * > > ** > > * * > > > > i also have an execution in the pom parent: > > > > ** > > * rpm-local* > > * * > > ** > > * * > > *org.codehaus.mojo* > > *exec-maven-plugin* > > ** > > * * > > *build-local-yum-repo* > > *deploy* > > ** > > * exec* > > ** > > * * > > ** > > ** > > * ssh* > > * * > > *${localYumRepo}* > > * cd /rpm-home/;make* > > * * > > ** > > * * > > ** > > * * > > ** > > > > the pom overrides the execution on the parent pom, although its in a > > different profile and have a diff ID. > > > > anyone knows how to overcome this? > > > > thanks, > > > > > > -- > > Eyal Edri > > > -- Eyal Edri
exec plugin:how to run plugin both in pom parent and pom without overriding executions?
Hi, i'm trying to run an execution of the exec plugin in a pom. the build is the default profile: * * *org.codehaus.mojo* *exec-maven-plugin* ** * * *open-tarball* *validate* ** * exec* ** * * ** ** * tar* * * *-zxvf* *src/main/tar/${tar-ver}.tar.gz* *-C* *src/main/tar/* * * ** * * i also have an execution in the pom parent: ** * rpm-local* * * ** * * *org.codehaus.mojo* *exec-maven-plugin* ** * * *build-local-yum-repo* *deploy* ** * exec* ** * * ** ** * ssh* * * *${localYumRepo}* *cd /rpm-home/;make* * * ** * * ** * * ** the pom overrides the execution on the parent pom, although its in a different profile and have a diff ID. anyone knows how to overcome this? thanks, -- Eyal Edri
maven rpm plugin: howto open a tar file and copy the files inside it using
Hi, i have a maven project that contains a tar file, i want the rpm plugin to extract the tar file and copy some of its files to destination folders. what is the best way to do it? -- Eyal Edri
how to config wagon-maven-plugin to copy noarch & os specific rpms
Hi, i'm using the wagon plugin to deploy rpm to our YUM repo. i've used so far the 'true settings in the rpm-maven-plugin configuration, so all the rpm's are created per os (i386/x64...). i want to allow also 'noarch' rpms to be deploy (false), but i can't think on a way to do while still supporting the os specific settings. all our noarch rpms go to yum-server://ctcfgroot/ctstable/src/*all*/ here's the config now: org.codehaus.mojo wagon-maven-plugin deploy-remote-rpm deploy upload target/rpm/${project.artifactId}/RPMS/${os.arch} *.rpm scp://yum-server /ctcfgroot/ctstable/src/${os.arch}/${project.artifactId} any ideas? -- Eyal Edri
how to deploy a local plugin to artifactory plugin repository
Hi, what do i need to write in the distributionManagement tag, in order to deploy a maven plugin i wrote? (to a pluginRepository, so that other developers can use the plugin) i don't mind donating it to the community if someone is interested. it's a plugin for maven-rpm-plugin: it scans current maven dependencies and insert new '' tag for each one. i have the following parent pom as far: . UTF-8 http:///artifactory/libs-snapshots-local<http://ct-repo01:8081/artifactory/libs-snapshots-local> http:///artifactory/libs-releases-local<http://ct-repo01:8081/artifactory/libs-releases-local> xx-repo01 XXX Releases ${releasesRepository} xx-repo01 XXX Snapshots ${snapshotRepository} -- Eyal Edri -- Eyal Edri
Re: maven scm plugin: accurev scm provider
Thanks! can you give me an example of how the connectionUrl should look like with accurev? E. On Fri, Apr 23, 2010 at 11:04 AM, Grant Gardner wrote: > > If you want to use the new version, take the code attached to issue, bump > parent version to 1.3 and change the artifact version to 1.4-SNAPSHOT > then build and install to your local repository. > > Then in your project pom add this as a dependency to the maven-scm-plugin > as follows. > > > > > org.apache.maven.plugins > maven-scm-plugin > 1.3 > > > org.apache.maven.scm > maven-scm-provider-accurev > 1.4-SNAPSHOT > > > > > > > On Wed, 21 Apr 2010 15:56:50 +0300, eyal edri wrote: > > Anyone has used accurev + scm plugin yet? > > > > i know issue 445 on the scm-accurev-provider should fix most problems > once > > ver 1.4 is due, > > is there any way i can use the plugin in the meantime and test connection > > to > > the accurev server? > > > > > > thanks. > > ----- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Eyal Edri
maven scm plugin: accurev scm provider
Anyone has used accurev + scm plugin yet? i know issue 445 on the scm-accurev-provider should fix most problems once ver 1.4 is due, is there any way i can use the plugin in the meantime and test connection to the accurev server? thanks. -- Eyal Edri
Re: including LD_LIBRARY_PATH in JAR manifest file
Yea.. i think that's the only way, what i did is to add a script to /etc/profile.d/set_ld_path.sh with the line: export LD_LIBRARY_PATH=/path/with/the/so/file so it will work for all users. Eyal. On Tue, Apr 13, 2010 at 2:14 PM, Jochen Stiepel wrote: > Hi Eydal, > > as far as I know you need to set the environment variable 'LD_LIBRARY_PATH' > before you start the java application. > > export LD_LIBRARY_PATH=/path/with/the/so/file > after that, starting the java app. > > CU, > Jochen > > > 2010/4/12 eyal edri > > > Hi, > > > > i'm deploying a java application (jar) on a linux server using rpm > > (maven-rpm-plugin). > > > > the jar uses JNI code which needs LD_LIBRARY_PATH defined, in order to > find > > the .so files. > > > > can i define it in the manifest file (similar to class-path?) > > > > what's the best practice to do it? > > > > I've tried putting it in the cron file that launch the app but > > it doesn't work.. > > > > thanks. > > > > -- > > Eyal Edri > > > -- Eyal Edri
including LD_LIBRARY_PATH in JAR manifest file
Hi, i'm deploying a java application (jar) on a linux server using rpm (maven-rpm-plugin). the jar uses JNI code which needs LD_LIBRARY_PATH defined, in order to find the .so files. can i define it in the manifest file (similar to class-path?) what's the best practice to do it? I've tried putting it in the cron file that launch the app but it doesn't work.. thanks. -- Eyal Edri
Re: adding executables to an archetype
I'm thinking on turning the whole thing to a maven plugin, anyone has a quicker suggestion? thanks, Eyal. On Thu, Mar 25, 2010 at 4:06 PM, eyal edri wrote: > i'm creating a generic archetype that includes a pom + bash scripts > (located in src/main/scripts/*.sh) > > when adding those scripts on in the archetype.xml file: > > $ cat archetype.xml > > ExternalLibrary > > src/main/scripts/run1.sh > src/main/scripts/run2.sh > > > > > it changes the filemod of the scripts to non-executables (i assume it's > because its a resource). > > from the guide: > http://maven.apache.org/guides/mini/guide-creating-archetypes.html > i don't see a tag for including executables, is that possible? > > > -- > Eyal Edri > -- Eyal Edri
adding executables to an archetype
i'm creating a generic archetype that includes a pom + bash scripts (located in src/main/scripts/*.sh) when adding those scripts on in the archetype.xml file: $ cat archetype.xml ExternalLibrary src/main/scripts/run1.sh src/main/scripts/run2.sh it changes the filemod of the scripts to non-executables (i assume it's because its a resource). from the guide: http://maven.apache.org/guides/mini/guide-creating-archetypes.html i don't see a tag for including executables, is that possible? -- Eyal Edri
Re: reading dependency list from pom into rpm plugin require
you mean that the pom packaging will be set to rpm? but then, the development env (not deploy) won't work i think.. cause the maven dependencies will look for the jar in the repository. that way i create a jar which is deployed to the repository (for normal dev env) and also an rpm which is used for deployment on production. i didn't understood your last sentence... > deps which are type>rpm wrote: > I think you really want an rpm packaging type then the listed deps which > are > type>rpm > not sure if the plugin supports the above > > On 24 March 2010 13:20, eyal edri wrote: > > > Hi, > > > > i'm looking for the best way to auto fill the field in the rpm > > plugin. > > since we're using rpm/yum as the deployer of our java apps, > > i don't want to mange a duplicate set of dependencies in the pom file, > > in order to do so, i want to fill the tag auto from the maven > > dependencies list in the pom file. > > > > for example, the following pom will create an rpm with rpm dependencies > > similar to the maven ones. > > (marked in yellow) > > > > a few 'rules' needs to be followed: > > 1. each rpm will always have the same name of the artifactId. > > 2. each maven dependency will be packed in its own rpm > > > > any ideas? (gmaven maybe..) > > > > *the pom:* > > > > http://maven.apache.org/POM/4.0.0"; xmlns:xsi=" > > http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation=" > > http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/maven-v4_0_0.xsd > > "> > > 4.0.0 > > com.company.url.miscats > > Application > > jar > > 2.0.0-3 > > Application > > > > Parent > > com.company.maven.pom > > 2.0.0-5 > > > > the app > > > > > > > >org.codehaus.mojo > >rpm-maven-plugin > >false > > > > > > > > rpm > > > > > > > > > >${project.organization.name} > >XXX > >Sample/Apps > >${user.name} > > ${project.name} > > ${project.description} > > true > > true > > > > > > Dep1 > > Dep2 > > > > > > > > > > > > /usr/lib/java/${project.artifactId} > > 750 > > root > > root > > > > > > /etc/${project.artifactId} > > 750 > > root > > root > > > > > > > > src/main/resources/App.properties > > > > src/main/resources/log4j.properties > > > > > > > > > > /etc/cron.d/ > > 750 > > root > > root > > > > > > src/main/resources/App.cron > > > > > > > > > > > > echo "installing ${artifactId} on arch > > ${os.arch}" > > > > > > > > > > > > > > > > com.company.sql > > Dep1 > > 2.0.0-4 > > > > > > com.company.stub > > Dep2 > > 2.0.0-2 > > > > > > > > > > -- > > Eyal Edri > > > -- Eyal Edri
reading dependency list from pom into rpm plugin require
Hi, i'm looking for the best way to auto fill the field in the rpm plugin. since we're using rpm/yum as the deployer of our java apps, i don't want to mange a duplicate set of dependencies in the pom file, in order to do so, i want to fill the tag auto from the maven dependencies list in the pom file. for example, the following pom will create an rpm with rpm dependencies similar to the maven ones. (marked in yellow) a few 'rules' needs to be followed: 1. each rpm will always have the same name of the artifactId. 2. each maven dependency will be packed in its own rpm any ideas? (gmaven maybe..) *the pom:* http://maven.apache.org/POM/4.0.0"; xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 com.company.url.miscats Application jar 2.0.0-3 Application Parent com.company.maven.pom 2.0.0-5 the app org.codehaus.mojo rpm-maven-plugin false rpm ${project.organization.name} XXX Sample/Apps ${user.name} ${project.name} ${project.description} true true Dep1 Dep2 /usr/lib/java/${project.artifactId} 750 root root /etc/${project.artifactId} 750 root root src/main/resources/App.properties src/main/resources/log4j.properties /etc/cron.d/ 750 root root src/main/resources/App.cron echo "installing ${artifactId} on arch ${os.arch}" com.company.sql Dep1 2.0.0-4 com.company.stub Dep2 2.0.0-2 -- Eyal Edri
Re: maven plugin to run a command line after 'deploy' phase
i know, but somehow (don't know exactly why), it runs after another plugin that runs in the deploy phase (which was my intention) , maybe because it's written after it the pom? /Eyal On Wed, Mar 24, 2010 at 12:10 PM, Anders Hammar wrote: > You know this won't be run *after* the deploy phase (as asked), but in that > phase? The deploy phase is the last phase btw. > > /Anders > > On Wed, Mar 24, 2010 at 10:56, eyal edri wrote: > > > found it! :) > > > > > >maven-antrun-plugin > > > > > >deploy > > > > > > > dir="${basedir}" > > executable="${basedir}/src/main/scripts/run-yum-make.sh" > > failonerror="true"> > > > > > > > > > > run > > > > > > > > > > > > On Wed, Mar 24, 2010 at 11:20 AM, eyal edri wrote: > > > > > is there a maven plugin i can use in order to run a bash script/code > > after > > > the deploy phase is run? > > > > > > thanks! > > > > > > -- > > > Eyal Edri > > > > > > > > > > > -- > > Eyal Edri > > > -- Eyal Edri
Re: maven plugin to run a command line after 'deploy' phase
found it! :) maven-antrun-plugin deploy run On Wed, Mar 24, 2010 at 11:20 AM, eyal edri wrote: > is there a maven plugin i can use in order to run a bash script/code after > the deploy phase is run? > > thanks! > > -- > Eyal Edri > -- Eyal Edri
maven plugin to run a command line after 'deploy' phase
is there a maven plugin i can use in order to run a bash script/code after the deploy phase is run? thanks! -- Eyal Edri
running remote SSH command after scp via wagon to remote server
Hi, i'm using the rpm plugin 2.0.1 with the wagon plugin. everything works great, including scp to the remote yum server. i only need to run a remote command on the remote server i'm SCP'ing to. (the equivalent bash command: ssh yum.remote.com "cd /target/dir;make") is it possible via the wagon plugin? org.codehaus.mojo wagon-maven-plugin 1.0-beta-3 rpm deploy upload target/rpm/${artifactId}/RPMS/${os.arch} *.rpm scp://yum.server.com /ctcfgroot/ctstable/src/${os.arch}/${artifactId} org.codehaus.mojo rpm-maven-plugin false rpm ${project.organization.name} Commons/Log ${user.name} ${project.name} ${project.description} true jre /usr/lib/ctch/java/commons 750 root root log4j:log4j:1.2.14 javax.mail:mail javax.activation:activation junit:junit /etc/ctch/LogUtil 750 root root src/main/resources/log4j.properties echo "installing ${artifactId} on arch ${os.arch}" -- Eyal Edri
Re: [bug?] Getting null in manifest when using custom
i manged to use the dependency plugin to write a classpath.txt file, but still i don't know how to access the list of dependencies, so for e.g. , i can tell it each dependency is located at it's own dir. here's the dependency conf: org.apache.maven.plugins maven-dependency-plugin 2.0 build-classpath generate-sources build-classpath src/main/resources/${artifactId}-classpath.txt /usr/lib/ctch/java/ On Tue, Mar 9, 2010 at 10:58 AM, eyal edri wrote: > OK, > > after using the -X option , i verifed that jar plugin 2.3 uses archiver > 2.4: > > [DEBUG] Plugin dependencies for: > > org.apache.maven.plugins:maven-jar-plugin:2.3 > > are: > > org.apache.maven:maven-plugin-api:jar:2.0.6:runtime > org.apache.maven:maven-project:jar:2.0.6:runtime > org.apache.maven:maven-model:jar:2.0.6:runtime > org.apache.maven:maven-artifact:jar:2.0.6:runtime > *org.apache.maven:maven-archiver:jar:2.4:runtime* > org.codehaus.plexus:plexus-archiver:jar:1.0-alpha-12:runtime > commons-lang:commons-lang:jar:2.1:runtime > org.codehaus.plexus:plexus-utils:jar:1.4.9:runtime > > > i'm also trying to work out the dependency:build-classpath goal..and see if > it can create a custom cp.txt file to use instead of the manifest. > > Eyal. > > > > On Tue, Mar 9, 2010 at 10:00 AM, eyal edri wrote: > >> Hi Wayne, >> >> i'm using jar plugin 2.3. >> >> i've notice that those new features (custom layout) are implemented in the >> Archiver plugin ver 2.4 - should i do something to enforce using >> the archiver ver 2.4? >> >> I replaced ${artifact.artifactId} with a fixed string (log4j) and it >> worked: >> >> >> Manifest-Version: 1.0 >> Archiver-Version: Plexus Archiver >> Created-By: Apache Maven >> Built-By: eyale >> Build-Jdk: 1.6.0_18 >> Main-Class: com.commtouch.url.unknowns.IncreasePriority >> Class-Path: /usr/lib/ctch/java/log4j /usr/lib/ctch/java/log4j /usr/lib >> /ctch/java/log4j /usr/lib/ctch/java/log4j /usr/lib/ctch/java/log4j >> >> so what is missing here, is a code/param to fetch the list of all the >> artifact dependencies. >> >> my goal is to build a class-path entry in the manifest without the >> -version suffix every dependency has. >> >> Eyal. >> >> >> On Mon, Mar 8, 2010 at 11:03 AM, eyal edri wrote: >> >>> Hello, >>> >>> i don't know if this a bug or a misuse of the archiver. >>> >>> when using a custom layout in manifest, i get 'null' for every value i >>> use: >>> >>> >>> >>> >>> org.apache.maven.plugins >>> maven-jar-plugin >>> >>> >>> >>> >>> true >>> >>> ${project.groupId}.${project.artifactId} >>> custom >>> >>> /usr/lib/ctch/java/${artifact.artifactId} >>> >>> >>> >>> >>> >>> >>> >>> the manifest.mf: >>> >>> Manifest-Version: 1.0 >>> Archiver-Version: Plexus Archiver >>> Created-By: Apache Maven >>> Built-By: eyale >>> Build-Jdk: 1.6.0_18 >>> Main-Class: com.commtouch.url.unknowns.IncreasePriority >>> Class-Path: /usr/lib/ctch/java/null/null /usr/lib/ctch/java/null/null >>> /usr/lib/ctch/java/null/null /usr/lib/ctch/java/null/null /usr/lib/ct >>> ch/java/null/null >>> >>> >>> i'm following the guidelines on the sample page: >>> >>> http://maven.apache.org/shared/maven-archiver/examples/classpath.html#Custom >>> >>> >>> -- >>> Eyal Edri >>> >>> >>> >>> -- >>> Eyal Edri >>> >> >> >> >> -- >> Eyal Edri >> > > > > -- > Eyal Edri > -- Eyal Edri
Re: [bug?] Getting null in manifest when using custom
OK, after using the -X option , i verifed that jar plugin 2.3 uses archiver 2.4: [DEBUG] Plugin dependencies for: org.apache.maven.plugins:maven-jar-plugin:2.3 are: org.apache.maven:maven-plugin-api:jar:2.0.6:runtime org.apache.maven:maven-project:jar:2.0.6:runtime org.apache.maven:maven-model:jar:2.0.6:runtime org.apache.maven:maven-artifact:jar:2.0.6:runtime *org.apache.maven:maven-archiver:jar:2.4:runtime* org.codehaus.plexus:plexus-archiver:jar:1.0-alpha-12:runtime commons-lang:commons-lang:jar:2.1:runtime org.codehaus.plexus:plexus-utils:jar:1.4.9:runtime i'm also trying to work out the dependency:build-classpath goal..and see if it can create a custom cp.txt file to use instead of the manifest. Eyal. On Tue, Mar 9, 2010 at 10:00 AM, eyal edri wrote: > Hi Wayne, > > i'm using jar plugin 2.3. > > i've notice that those new features (custom layout) are implemented in the > Archiver plugin ver 2.4 - should i do something to enforce using > the archiver ver 2.4? > > I replaced ${artifact.artifactId} with a fixed string (log4j) and it > worked: > > > Manifest-Version: 1.0 > Archiver-Version: Plexus Archiver > Created-By: Apache Maven > Built-By: eyale > Build-Jdk: 1.6.0_18 > Main-Class: com.commtouch.url.unknowns.IncreasePriority > Class-Path: /usr/lib/ctch/java/log4j /usr/lib/ctch/java/log4j /usr/lib > /ctch/java/log4j /usr/lib/ctch/java/log4j /usr/lib/ctch/java/log4j > > so what is missing here, is a code/param to fetch the list of all the > artifact dependencies. > > my goal is to build a class-path entry in the manifest without the -version > suffix every dependency has. > > Eyal. > > > On Mon, Mar 8, 2010 at 11:03 AM, eyal edri wrote: > >> Hello, >> >> i don't know if this a bug or a misuse of the archiver. >> >> when using a custom layout in manifest, i get 'null' for every value i >> use: >> >> >> >> >> org.apache.maven.plugins >> maven-jar-plugin >> >> >> >> >> true >> >> ${project.groupId}.${project.artifactId} >> custom >> >> /usr/lib/ctch/java/${artifact.artifactId} >> >> >> >> >> >> >> >> the manifest.mf: >> >> Manifest-Version: 1.0 >> Archiver-Version: Plexus Archiver >> Created-By: Apache Maven >> Built-By: eyale >> Build-Jdk: 1.6.0_18 >> Main-Class: com.commtouch.url.unknowns.IncreasePriority >> Class-Path: /usr/lib/ctch/java/null/null /usr/lib/ctch/java/null/null >> /usr/lib/ctch/java/null/null /usr/lib/ctch/java/null/null /usr/lib/ct >> ch/java/null/null >> >> >> i'm following the guidelines on the sample page: >> >> http://maven.apache.org/shared/maven-archiver/examples/classpath.html#Custom >> >> >> -- >> Eyal Edri >> >> >> >> -- >> Eyal Edri >> > > > > -- > Eyal Edri > -- Eyal Edri
Re: [bug?] Getting null in manifest when using custom
Hi Wayne, i'm using jar plugin 2.3. i've notice that those new features (custom layout) are implemented in the Archiver plugin ver 2.4 - should i do something to enforce using the archiver ver 2.4? I replaced ${artifact.artifactId} with a fixed string (log4j) and it worked: Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Created-By: Apache Maven Built-By: eyale Build-Jdk: 1.6.0_18 Main-Class: com.commtouch.url.unknowns.IncreasePriority Class-Path: /usr/lib/ctch/java/log4j /usr/lib/ctch/java/log4j /usr/lib /ctch/java/log4j /usr/lib/ctch/java/log4j /usr/lib/ctch/java/log4j so what is missing here, is a code/param to fetch the list of all the artifact dependencies. my goal is to build a class-path entry in the manifest without the -version suffix every dependency has. Eyal. On Mon, Mar 8, 2010 at 11:03 AM, eyal edri wrote: > Hello, > > i don't know if this a bug or a misuse of the archiver. > > when using a custom layout in manifest, i get 'null' for every value i use: > > > > > org.apache.maven.plugins > maven-jar-plugin > > > > > true > > ${project.groupId}.${project.artifactId} > custom > > /usr/lib/ctch/java/${artifact.artifactId} > > > > > > > > the manifest.mf: > > Manifest-Version: 1.0 > Archiver-Version: Plexus Archiver > Created-By: Apache Maven > Built-By: eyale > Build-Jdk: 1.6.0_18 > Main-Class: com.commtouch.url.unknowns.IncreasePriority > Class-Path: /usr/lib/ctch/java/null/null /usr/lib/ctch/java/null/null > /usr/lib/ctch/java/null/null /usr/lib/ctch/java/null/null /usr/lib/ct > ch/java/null/null > > > i'm following the guidelines on the sample page: > > http://maven.apache.org/shared/maven-archiver/examples/classpath.html#Custom > > > -- > Eyal Edri > > > > -- > Eyal Edri > -- Eyal Edri
[bug?] Getting null in manifest when using custom
Hello, i don't know if this a bug or a misuse of the archiver. when using a custom layout in manifest, i get 'null' for every value i use: org.apache.maven.plugins maven-jar-plugin true ${project.groupId}.${project.artifactId} custom /usr/lib/ctch/java/${artifact.artifactId} the manifest.mf: Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Created-By: Apache Maven Built-By: eyale Build-Jdk: 1.6.0_18 Main-Class: com.commtouch.url.unknowns.IncreasePriority Class-Path: /usr/lib/ctch/java/null/null /usr/lib/ctch/java/null/null /usr/lib/ctch/java/null/null /usr/lib/ctch/java/null/null /usr/lib/ct ch/java/null/null i'm following the guidelines on the sample page: http://maven.apache.org/shared/maven-archiver/examples/classpath.html#Custom -- Eyal Edri -- Eyal Edri
Re: getting a pom property value in runtime
Well, i think some won't like my end goal, saying it's not the "MAVEN WAY", or say that maven was not designed for it. but i'll explain nonetheless, since some might like the idea and make use of it also. In the beginning there were a few friends: Perl, MAKE and RPM. they all played together and once in a while RPM left and gone to YUM :) When the rpm wanted to be on production, YUM installed it (with all his Dependant friends that tag a long with him wherever he goes, although they are each unique and can be installed via YUM separately). Now the company has decided to move to JAVA programming, so the new friends are: Java, Maven and Jar. and once in a while JAR went to Artifactory (or Nexus sometimes). But.. when the JAR file wanted to be installed on production, Artifactory didn't know what he wanted, since he only servers development environment. But it doesn't make sense. Maven has an amazing dependency architecture that overcomes many of RPM's problems and can be easily be used like YUM for actual production deployment. Unfortunately, i didn't find any plugin that does the job, nor did any of the usual solutions were relevant (wagon, assembly, uber-jar, containers..) So i decided to use maven plugins like "dependency:copy-dependencies" and the GMaven plugin to accomplish this, which i then wrapped in a bash script to run all the maven properties together. I created a generic POM file that will install any project i'll tell him via the -D command line options. it works beautifully, with a small issue regarding the unjaring of resources with GMaven. *of course the final end game is to create a new "Maven Production Installer" plugin.* * * *but until then, i want to create a working environment and close the loop.* * * This is probably a result of my company unique status, where all of the code is deployed to a center which is manged by US, and there is no end-customer that waits for a complete .tar.gz pacakge. * * *I hope i made my goal clear, * * * *Eyal. * On Sun, Feb 21, 2010 at 3:53 PM, Stephen Connolly < stephen.alan.conno...@gmail.com> wrote: > the problem with that us always going to be transitives... > > if I depend on your module, unless I know how to get the property values, I > will be unable to get your transitive dependencies... so as such the only > way maven could determine what your transitive dependencies are, would be to > fire up a lifecycle on your pom... but I only have your pom downloaded from > the remote repo, and not your full project... > > that is why what you are trying to do is a bad plan... perhaps if you > describe your ultimate end game, but I suspect you are putting scripting > into your pom because you want to avoid creating a maven plugin for "this > one special case"... sometimes it's just easier to create a plugin... > > we have one project that did some code generation by using a peel script to > parse a C++ header file generate some XML which was then passed through xslt > to generate the java source code... it's a one off... but in the end it was > better off writing a maven plugin... and now we gave replaced the perl with > java code to parse... so our whole build is now in java... easier bootstrap > for new devs > > but 3 years ago I almost said, just hack it with antrun and exec... > > Sent from my [rhymes with tryPod] ;-) > > > On 21 Feb 2010, at 13:19, eyal edri wrote: > > hi, >> >> is it possible to read a property that is calculated by maven in runtime: >> >> 4.0.0 >> com.company.install >> JavaInstaller >> pom >> 0.0.2-SNAPSHOT >> Java Installer >> Installer for maven java projects >> >> com.company.maven.pom >> CtchParent >> 0.0.16-SNAPSHOT >> >> * * >> *0.0.1-SNAPSHOT* >> * * >> >> >> ${installedGroupId} >> ${installedArtifactId} >> * (${installedVersion},) -> this will install the >> latest version available from the repo.* >> >> >> >> >> can i access the project.dependencies.dependency.version value? >> >> i need it in a groovy code that is run afterward using GMaven plugin. >> >> thanks! >> >> -- >> Eyal Edri >> > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Eyal Edri
Re: getting a pom property value in runtime
I found a cool way to iterate pom's dependencies with GMaven: *project.dependencies.each () {* *log.info("extracting project ${it.artifactId} version ${it.version}")* * }* but still, it gives me the predefined literal version: (0.0.1-SNAPSHOT,), instead of the range calculated one: 0.0.16 any ideas? On Sun, Feb 21, 2010 at 3:19 PM, eyal edri wrote: > hi, > > is it possible to read a property that is calculated by maven in runtime: > > 4.0.0 > com.company.install > JavaInstaller > pom > 0.0.2-SNAPSHOT > Java Installer > Installer for maven java projects > > com.company.maven.pom > CtchParent > 0.0.16-SNAPSHOT > > * * > *0.0.1-SNAPSHOT* > * * > > > ${installedGroupId} > ${installedArtifactId} > * (${installedVersion},) -> this will install the > latest version available from the repo.* > > > > > can i access the project.dependencies.dependency.version value? > > i need it in a groovy code that is run afterward using GMaven plugin. > > thanks! > > -- > Eyal Edri > -- Eyal Edri
Re: building, installing, using maven COMPLETELY OFFLINE (setting up local mini repository)
you can also try artifactory: http://www.jfrog.org/products.php <http://www.jfrog.org/products.php>very nice and easy repository. Eyal. On Thu, Feb 18, 2010 at 5:25 PM, Ron Wheeler wrote: > Brett Porter wrote: > >> I run a repository manager (Archiva) on my local machine, allowing me to >> clean my local repository at any time without concern, and getting other >> advantages like less configuration, whitelist/blacklist, search, etc. >> >> What type of errors are you getting in offline mode? Is it missing >> artifacts that weren't obtained before you went offline, or attempts to get >> things that you should already have? >> >> BTW, for search, there are several alternative archives on the mailing >> lists page, but you can also google with "site: >> http://mail-archives/mod_mbox/maven-users/"; >> >> > Nexus is very nice and easy to setup and has a very modern-looking browser > based user interface. > We just started using it in a shared mode and it really helps. > > Ron > > On 18/02/2010, at 5:26 AM, Edward Peschko wrote: >> >> >> >>> All, >>> >>> I need to support a project where I cannot access the internet, even >>> by proxy. And I'd like to use some tools that require maven support >>> for building (apache commons, for example). >>> >>> I see offline mode, and gave it a try, but it STILL seems to still >>> want to connect to the internet when both building maven, and when >>> building apache commons. This is as of 2.1.0. >>> >>> Anyways, what I was hoping to do was to trick maven to run from a sole >>> pre setup repository; ie: to build a cache on another machine, tar up >>> that complete cache and move that cache to the local directory to >>> build it from there. I would have thought this would be simple (in >>> fact it should work out of the box IMO) but I don't see any HOWTO >>> document offhand. >>> >>> Any help on this would be great and IMO this should be a FAQ. >>> >>> Thanks much, >>> >>> Ed >>> >>> (ps - BTW - I did try to do a search, but the mail archive at >>> >>> http://mail-archives.apache.org/mod_mbox/maven-users/ >>> >>> doesn't have a search feature for some odd reason. >>> ) >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >>> For additional commands, e-mail: users-h...@maven.apache.org >>> >>> >>> >> >> -- >> Brett Porter >> br...@apache.org >> http://brettporter.wordpress.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 > > -- Eyal Edri
getting a pom property value in runtime
hi, is it possible to read a property that is calculated by maven in runtime: 4.0.0 com.company.install JavaInstaller pom 0.0.2-SNAPSHOT Java Installer Installer for maven java projects com.company.maven.pom CtchParent 0.0.16-SNAPSHOT * * *0.0.1-SNAPSHOT* * * ${installedGroupId} ${installedArtifactId} * (${installedVersion},) -> this will install the latest version available from the repo.* can i access the project.dependencies.dependency.version value? i need it in a groovy code that is run afterward using GMaven plugin. thanks! -- Eyal Edri
Re: Assemble a jar with dependent jars next to it
you can also try the dependency:copy-dependencies plugin. it will copy all your dependencies jar to the folder you want (classpath). On Fri, Feb 19, 2010 at 4:20 PM, Yaakov Chaikin wrote: > Thanks! I'll try that out. > > Yaakov. > > On Fri, Feb 19, 2010 at 9:18 AM, Aleksey Didik > wrote: > > The way to put jar + dependencies jars in one folder is: > > > > > > bundle > > > > zip > > tar.gz > > > > > > false > > > > > > > > / > > > > > > > > > > Aleksey. > > > > > > 19.02.2010 18:07, Yaakov Chaikin пишет: > >> > >> Thanks, but what I am really looking for is jar + dependencies in lib > >> folder type of outcome. Is there a way to tweak what is on that page > >> to get assembly to produce that? > >> > >> Thanks, > >> Yaakov. > >> > >> On Fri, Feb 19, 2010 at 9:02 AM, Anders Hammar > wrote: > >> > >>> > >>> I think this is what you're looking for: > >>> > >>> > http://www.sonatype.com/people/2009/08/how-to-make-an-executable-jar-in-maven/ > >>> > >>> /Anders > >>> > >>> On Fri, Feb 19, 2010 at 14:57, Yaakov > >>> Chaikinwrote: > >>> > >>> > >>>> > >>>> Hi all, > >>>> > >>>> Tried Googling, but nothing that useful came up... I am pretty sure > >>>> it's possible to do this though... > >>>> > >>>> I have a multi-module project and one of the modules is a standalone > >>>> executable with dependencies on other modules as well as other 3rd > >>>> party libraries. > >>>> > >>>> I need to run an assembly such that the executable module ends up as a > >>>> JAR with Class-Path in its manifest pointing to all of its JAR > >>>> dependencies and place all the other dependencies (whatever they are - > >>>> I don't want to have to specify them all by hand in assembly.xml) > >>>> should be brought into the same directory and the Class-Path should > >>>> have relative path pointing to them. > >>>> > >>>> Does anyone have some snippets they can share to accomplish this? The > >>>> assembly documentation is pretty thin so I would so much love to avoid > >>>> trial-and-error pattern. > >>>> > >>>> Any help would be greatly appreciated. > >>>> > >>>> Thanks, > >>>> Yaakov. > >>>> > >>>> - > >>>> 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 > > > > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Eyal Edri
Re: error using a new archetype from local index
Problem fixed. i've used a property in the parent called: classpath. apparantly this caused errors. changed it to ctch.classpath and now it works! great way to create a default project scheme to all the developers. On Sun, Feb 14, 2010 at 4:07 PM, eyal edri wrote: > Hi, > > i've created a new archetype: (the pom.xml) > > *com.company.maven.archetype > Generic > jar > 0.0.1 > Company Generic archetype > default archetype for company maven projects > > com.company.maven.pom > Parent > 0.0.15 > > * > *deployed to it: http://ct-repo01:8081/artifactory/libs-releases-local* > > *manually created the catalog file: ~/.m2/archetype-catalog.xml* > > > > > > com.company.maven.archetype > Generic > 0.0.1 > http://ct-repo01:8081/artifactory/libs-releases-local > > Generic Company ArcheType for Maven > Projects > > > > > when trying to use it from eclipse (using New->Project->Maven Project),and > picking from the default-local catalog the Generic archetype. > > i get an error after writing the basic pom info: > > *Failed to create project. > Unable to create project from archetype > [com.company.maven.archetype:Generic:0.0.1 -> > http://ct-repo01:8081/artifactory/libs-releases-local] > Failed to generate project from the old archetype** > * > > -- > Eyal Edri > -- Eyal Edri
error using a new archetype from local index
Hi, i've created a new archetype: (the pom.xml) *com.company.maven.archetype Generic jar 0.0.1 Company Generic archetype default archetype for company maven projects com.company.maven.pom Parent 0.0.15 * *deployed to it: http://ct-repo01:8081/artifactory/libs-releases-local* *manually created the catalog file: ~/.m2/archetype-catalog.xml* com.company.maven.archetype Generic 0.0.1 http://ct-repo01:8081/artifactory/libs-releases-local Generic Company ArcheType for Maven Projects when trying to use it from eclipse (using New->Project->Maven Project),and picking from the default-local catalog the Generic archetype. i get an error after writing the basic pom info: *Failed to create project. Unable to create project from archetype [com.company.maven.archetype:Generic:0.0.1 -> http://ct-repo01:8081/artifactory/libs-releases-local] Failed to generate project from the old archetype** * -- Eyal Edri
Re: when using "copy-dependencies" goal in dependency plugin, how can i install old version to overwrite a new one
no, i mean that it will delete the new one and install the old one. today, (when you install a newer version, maven deletes the old and install the new - if you config to overwrite). On Fri, Feb 12, 2010 at 4:16 PM, Baptiste MATHUS wrote: > You mean the new version will stay, but the older will also be added in the > target directory? > > > 2010/2/12 eyal edri > > > let's say I've got a maven project that when i install it, it installs > all > > the dependencies to the classPath. > > > > but now i found that i need one of the dependencies in a version that is > > older than what i installed. > > so i go to the pom.xml and change it to an older version. > > > > in the current configuration, after running mvn install, nothing will > > happen > > (the newer version of the dependency will stay). > > > > (of course i can go to the classpath and manually delete the newer > > dependency.jar, but i rather maven will do it :). > > > > any ideas? > > > > > > > > On Fri, Feb 12, 2010 at 2:48 PM, Baptiste MATHUS wrote: > > > > > *Hi,* > > > > > > What do you mean? You'd like that the target directory doesn't contain > > bad > > > dependency version? If so, then couldn't you just add the "clean" > option > > > before your goal? (mvn clean). > > > > > > *Cheers.* > > > > > > 2010/2/11 eyal edri > > > > > > > I'm trying to installer an older version of my project (to check > > rollback > > > > option), > > > > > > > > how can i tell maven to remove the new versions installed and replace > > > with > > > > older one? > > > > > > > > the other way works perfect. > > > > > > > > > > > > my pom: > > > > > > > > > > > > > > > >org.apache.maven.plugins > > > >maven-dependency-plugin > > > > > > > > > > > >copy > > > >install > > > > > > > > copy > > > > > > > > > > > > > > > > > > > > ${project.groupId} > > > > ${project.artifactId} > > > > ${project.version} > > > > ${project.packaging} > > > > true > > > > ${classpath} > > > > > > > > > > > > > > > > > > > > > > > > > > > >copy-dependencies > > > >install > > > > > > > > copy-dependencies > > > > > > > > > > > > ${classpath} > > > > true > > > > true > > > > true > > > > false > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > Eyal Edri > > > > > > > > > > > > > > > > -- > > > Baptiste MATHUS - http://batmat.net > > > Sauvez un arbre, > > > Mangez un castor ! > > > > > > > > > > > -- > > Eyal Edri > > > > > > -- > Baptiste MATHUS - http://batmat.net > Sauvez un arbre, > Mangez un castor ! > -- Eyal Edri
Re: when using "copy-dependencies" goal in dependency plugin, how can i install old version to overwrite a new one
let's say I've got a maven project that when i install it, it installs all the dependencies to the classPath. but now i found that i need one of the dependencies in a version that is older than what i installed. so i go to the pom.xml and change it to an older version. in the current configuration, after running mvn install, nothing will happen (the newer version of the dependency will stay). (of course i can go to the classpath and manually delete the newer dependency.jar, but i rather maven will do it :). any ideas? On Fri, Feb 12, 2010 at 2:48 PM, Baptiste MATHUS wrote: > *Hi,* > > What do you mean? You'd like that the target directory doesn't contain bad > dependency version? If so, then couldn't you just add the "clean" option > before your goal? (mvn clean). > > *Cheers.* > > 2010/2/11 eyal edri > > > I'm trying to installer an older version of my project (to check rollback > > option), > > > > how can i tell maven to remove the new versions installed and replace > with > > older one? > > > > the other way works perfect. > > > > > > my pom: > > > > > > > >org.apache.maven.plugins > >maven-dependency-plugin > > > > > >copy > >install > > > > copy > > > > > > > > > > ${project.groupId} > > ${project.artifactId} > > ${project.version} > > ${project.packaging} > > true > > ${classpath} > > > > > > > > > > > > > >copy-dependencies > >install > > > > copy-dependencies > > > > > > ${classpath} > > true > > true > > true > > false > > > > > > > > > > > > -- > > Eyal Edri > > > > > > -- > Baptiste MATHUS - http://batmat.net > Sauvez un arbre, > Mangez un castor ! > -- Eyal Edri
when using "copy-dependencies" goal in dependency plugin, how can i install old version to overwrite a new one
I'm trying to installer an older version of my project (to check rollback option), how can i tell maven to remove the new versions installed and replace with older one? the other way works perfect. my pom: org.apache.maven.plugins maven-dependency-plugin copy install copy ${project.groupId} ${project.artifactId} ${project.version} ${project.packaging} true ${classpath} copy-dependencies install copy-dependencies ${classpath} true true true false -- Eyal Edri
Re: removing version in manifest file
OK, found the missing dependencies: org.apache.maven maven-archiver 2.4 commons-lang commons-lang 2.1 org.codehaus.plexus plexus-utils 1.1 but still something is not playing with this conf: org.apache.maven.plugins maven-jar-plugin true /usr/lib/ctch/java custom ${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension} it only gives me 'null' values... On Wed, Feb 3, 2010 at 4:44 PM, eyal edri wrote: > is there an option to tell the jar plugin, that when he creates the > classPath entries in the MANIFEST file, it will strip the version numbers? > > here is it now: > > $ cat MANIFEST.MF (inside the jar file) > Manifest-Version: 1.0 > Archiver-Version: Plexus Archiver > Created-By: Apache Maven > Built-By: me > Build-Jdk: 1.6.0_16 > Main-Class: com.company.url.unknowns.IncreasePriority > *Class-Path: /usr/lib/ctch/java/mail-1.4.1.jar /usr/lib/ctch/java/activ > ation-1.1.jar /usr/lib/ctch/java/DbUtil-0.0.14-SNAPSHOT.jar /usr/lib/ > ctch/java/sqljdbc-2.0.jar /usr/lib/ctch/java/log4j-1.2.14.jar > * > > here is what i need: > > Class-Path: /usr/lib/ctch/java/mail.jar /usr/lib/ctch/java/activ > ation.jar /usr/lib/ctch/java/DbUtil.jar /usr/lib/ctch/java/sqljdbc.jar > /usr/lib/ctch/java/log4j.jar > > > i looked in the maven archiver reference guide, but didn't find anything. > > i guess i could write a customize jar plugin if it's not supported. > > > -- > Eyal Edri > -- Eyal Edri
Re: removing version in manifest file
i think i may have found the solution. http://maven.apache.org/shared/maven-archiver/examples/classpath.html#Repository you can use the tag: maven-war-plugin true custom ${artifact.artifactId}.${artifact.extension} but, they say it's avaliable only from ver 2.4, and i can't seem to download it or 2.3-SNAPSHOT when i define it in the parent pom pluginManagement tag. any ideas? On Wed, Feb 3, 2010 at 4:44 PM, eyal edri wrote: > is there an option to tell the jar plugin, that when he creates the > classPath entries in the MANIFEST file, it will strip the version numbers? > > here is it now: > > $ cat MANIFEST.MF (inside the jar file) > Manifest-Version: 1.0 > Archiver-Version: Plexus Archiver > Created-By: Apache Maven > Built-By: me > Build-Jdk: 1.6.0_16 > Main-Class: com.company.url.unknowns.IncreasePriority > *Class-Path: /usr/lib/ctch/java/mail-1.4.1.jar /usr/lib/ctch/java/activ > ation-1.1.jar /usr/lib/ctch/java/DbUtil-0.0.14-SNAPSHOT.jar /usr/lib/ > ctch/java/sqljdbc-2.0.jar /usr/lib/ctch/java/log4j-1.2.14.jar > * > > here is what i need: > > Class-Path: /usr/lib/ctch/java/mail.jar /usr/lib/ctch/java/activ > ation.jar /usr/lib/ctch/java/DbUtil.jar /usr/lib/ctch/java/sqljdbc.jar > /usr/lib/ctch/java/log4j.jar > > > i looked in the maven archiver reference guide, but didn't find anything. > > i guess i could write a customize jar plugin if it's not supported. > > > -- > Eyal Edri > -- Eyal Edri
removing version in manifest file
is there an option to tell the jar plugin, that when he creates the classPath entries in the MANIFEST file, it will strip the version numbers? here is it now: $ cat MANIFEST.MF (inside the jar file) Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Created-By: Apache Maven Built-By: me Build-Jdk: 1.6.0_16 Main-Class: com.company.url.unknowns.IncreasePriority *Class-Path: /usr/lib/ctch/java/mail-1.4.1.jar /usr/lib/ctch/java/activ ation-1.1.jar /usr/lib/ctch/java/DbUtil-0.0.14-SNAPSHOT.jar /usr/lib/ ctch/java/sqljdbc-2.0.jar /usr/lib/ctch/java/log4j-1.2.14.jar * here is what i need: Class-Path: /usr/lib/ctch/java/mail.jar /usr/lib/ctch/java/activ ation.jar /usr/lib/ctch/java/DbUtil.jar /usr/lib/ctch/java/sqljdbc.jar /usr/lib/ctch/java/log4j.jar i looked in the maven archiver reference guide, but didn't find anything. i guess i could write a customize jar plugin if it's not supported. -- Eyal Edri
Re: pom without artifacts?
you can using the "copy-dependencies" goal of the dependency plugin. [...] org.apache.maven.plugins maven-dependency-plugin copy-dependencies package copy-dependencies [...] i used it in my project. On Sat, Jan 30, 2010 at 2:03 PM, tbee wrote: > > > > Alexander-129 wrote: > > > > You are defining this pom project as dependency in module? Right? > > > > I have a series of POM + JARs uploaded to Nexus, e.g. > - xxx-1.1.jar > - xxx-skinA-1.1.jar > - xxx-skinB-1.1.jar > - xxx-skinC-1.1.jar > > This works fine. Now I want a "xxx-all:1.1" pom which will download the > whole bunch above. > In a project I indeed have a denpendency: > ... xxx-all1.1 > > When resolving that project it tries to download "xxx-all-1.1.jar" and > fails > on a missing dependency. > > > > -- > View this message in context: > http://old.nabble.com/pom-without-artifacts--tp27381618p27383258.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 > > -- Eyal Edri
Re: pom without artifacts?
what about setting the packaing to "pom" instead of "jar" ? On Sat, Jan 30, 2010 at 8:38 AM, tbee wrote: > > I have uploaded a swing look-and-feel to our internal repository. The LaF > contains a main jar plus a separate jar for each skin. In order to minimize > the end result, each skin is uploaded separately with its own pom referring > to the main jar. > > But sometimes I want it all skins, so I figured I create a pom with refers > to all skins (which in turn refer to the main), but does not contain any > artifacts itself. > > I can upload the pom without problems, leaving out the packaging. But when > refering to it, it tries to download "xxx-all.jar", so it assumes a default > packaging. > > Is there any way to create such a artifact-less pom? > -- > View this message in context: > http://old.nabble.com/pom-without-artifacts--tp27381618p27381618.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 > > -- Eyal Edri
connectionUrl to accurev provider
i'm trying to use the accurev provider plugin: org.apache.maven.scm maven-scm-provider-accurev 1.3 i understood the connectionUrl has been changed since ISSUE 445? i can't find an example anywhere, can someone help with an example of configuration including the connection url? for the scm/release plugin to work. thanks! -- Eyal Edri
Re: classpathPrefix with depedency subdirectory
you might be right, i'll look into it. i've already used GMaven to use some groovy code in a pom file, and it is quite easy. thanks for the idea. E. On Sun, Jan 24, 2010 at 6:45 PM, Wayne Fay wrote: > > is it possible to tell maven to add a classpathPrefix that will include > the > > artifactId Subdirectory? > > > > i'm using 'copy dependencies' plugin, and i want to keep each artifact in > > its own dir: > > I really think you need to just write your own plugin to do all this > custom file location business related to trying to deploy your apps > into their runtime environment. Its not that terribly difficult and > you could do literally whatever you want, so long as you can code it > (in Java, Ant, Groovy, etc). > > Wayne > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Eyal Edri
classpathPrefix with depedency subdirectory
is it possible to tell maven to add a classpathPrefix that will include the artifactId Subdirectory? i'm using 'copy dependencies' plugin, and i want to keep each artifact in its own dir: org.apache.maven.plugins maven-dependency-plugin copy-dependencies install copy-dependencies ${env.CTCH_JAVA_DIR} true true true true <*useSubDirectoryPerArtifact<http://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html#useSubDirectoryPerArtifact> >truehttp://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html#useSubDirectoryPerArtifact> >* and in the jar plugin (this is in the parent POM) org.apache.maven.plugins maven-jar-plugin 2.3 ${env.CTCH_JAVA_DIR} here' the manifest.mf: Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Created-By: Apache Maven Built-By: eyale Build-Jdk: 1.6.0_16 Main-Class: com.commtouch.url.unknowns.IncreasePriority Class-Path: /usr/lib/ctch/java/mail-1.4.1.jar /usr/lib/ctch/java/activ ation-1.1.jar /usr/lib/ctch/java/DbUtil-0.0.10.jar /usr/lib/ctch/java /sqljdbc-2.0.jar /usr/lib/ctch/java/log4j-1.2.14.jar -- Eyal Edri
Re: best practice to include resources in the jar file and unpack them on target server
I don't agree with the conception that uber (or fat) jar is the way to go. IMO, you loose all the advantages maven dependency supplies if you do so (as i mentioned, you need to install all your application in case you change one line of code in one of your infrastructure jars..) i know maven isn't supposed to be used for deployment, but with a little open mind and flexibility, it can be done. On Thu, Jan 21, 2010 at 1:46 PM, Martin Höller wrote: > Am Donnerstag, 21. Januar 2010 11:54:14 schrieb eyal edri: > > so to my original question, how to i copy the files from the jar after i > > install it on the target server? > > Extract the resource files from the JAR-File using 'jar' or 'zip' > utilities, > and copy them to the location where you want them to be. > > This is not related to maven any more. There was actually a thread about > something similar two days ago... and while searching for it, I found that > you were the original poster. The last mail from Thod Tiessen [0] in this > thread hits the nail on the head, IMHO. > > hth, > - martin > > [0] > > http://old.nabble.com/install-maven-project-from-repository-to-local-fs-to27209691.html#a27227458 > -- Eyal Edri
Re: best practice to include resources in the jar file and unpack them on target server
I'm actually very familiar with maven, and i read both "better builds with maven" and "the definite guide". i wasn't aware that the jar auto packs the resources files as well. i removed the section of the jar plugin below, and i still see the files included: $ jar tf /usr/lib/ctch/java/IncreasePriority/IncreasePriority.jar META-INF/ META-INF/MANIFEST.MF com/ com/company/ com/company/url/ com/company/url/unknowns/ com/company/url/unknowns/IncreasePriority.class increase-priority.properties increase-priority.cron META-INF/maven/ META-INF/maven/com.company.url.unknowns/ META-INF/maven/com.company.url.unknowns/IncreasePriority/ META-INF/maven/com.company.url.unknowns/IncreasePriority/pom.xml META-INF/maven/com.company.url.unknowns/IncreasePriority/pom.properties so to my original question, how to i copy the files from the jar after i install it on the target server? On Thu, Jan 21, 2010 at 12:32 PM, Martin Höller wrote: > Hi! > > Am Donnerstag, 21. Januar 2010 10:25:20 schrieb eyal edri: > > i'v included resource files inside the jar file using the include tag: > > > > > > devel > > > > > > > > org.apache.maven.plugins > > maven-jar-plugin > > > > src/main/resources > > > > **/* > > > > > > > > > > > > > > What you are doing here is telling the maven-jar-plugin, that classes are > found in src/main/resources, which is nonsense! > > What you should do, is put your resources in src/main/resources and they > should end up in target/classes and the produced JAR automatically when > running mvn package or the like. > > It seems you are not familiar with maven and I strongly recommend reading a > maven book, like sonatype's Maven: The Definitve Guide", which is available > online [0] for free. > > hth, > - martin > > [0] http://www.sonatype.com/book/ > -- Eyal Edri
Re: what copy-dependecies add -jar to artifact subDirectory
How can i propose a fix/feature to have a new tag: ? and what are the odds it will be accepted :) ? On Thu, Jan 21, 2010 at 11:31 AM, Entner Harald wrote: > ok, i just realised, that my last answer was not useful (i was too fast and > i realized that it was your intention to place that line, that i suggested > to remove). So here another one with some more sense. Afaics, you can't > change this behaviour, except changing the source. > > From the plugin site: > > useSubDirectoryPerArtifact boolean > > Place each file in a separate subdirectory. (example > /outputDirectory/junit-3.8.1-jar) > So there it is mentioned that the directory is prefixed with a "-jar". > > > I checked the source code and in the class DependencyUtils > >if ( useSubdirsPerType ) > . { > . sb.append( artifact.getType() ).append( "s" ).append( > File.separatorChar ); >} >if ( useSubdirPerArtifact ) >{ >String artifactString = getDependencyId( artifact, > removeVersion ); >sb.append( artifactString ).append( File.separatorChar ); >} > > So i don't think it is possible. > > > -Ursprüngliche Nachricht- > Von: Entner Harald [mailto:entner.har...@afb.de] > Gesendet: Donnerstag, 21. Januar 2010 10:18 > An: Maven Users List > Betreff: AW: what copy-dependecies add -jar to artifact subDirectory > > remove this line > true ;) > > -Ursprüngliche Nachricht- > Von: eyal edri [mailto:eyal.e...@gmail.com] > Gesendet: Donnerstag, 21. Januar 2010 09:08 > An: Maven Users List > Betreff: what copy-dependecies add -jar to artifact subDirectory > > i'm using the following configuration in my pom: > > >org.apache.maven.plugins >maven-dependency-plugin > > >copy-dependencies >install > > copy-dependencies > > > > /usr/lib/ctch/java > true > true > true > true > true > true > > > > > > but maven added a '-jar' suffix to the subdirectories: > > [INFO] Copying junit-4.7.jar to /usr/lib/ctch/java/*junit-jar*/junit.jar > [INFO] Copying junit-4.7.pom to /usr/lib/ctch/java/junit-jar/junit.pom > [INFO] Copying log4j-1.2.14.jar to /usr/lib/ctch/java/*log4j-jar*/log4j.jar > > anyone knows how to remove it? > > -- > Eyal Edri > -- Eyal Edri
Re: what copy-dependecies add -jar to artifact subDirectory
if i do, i'll end up with all the jars in the same dir... (/usr/lib/ctch/java) i want a subdirectory for each artifact, just not the '-jar' :) On Thu, Jan 21, 2010 at 11:17 AM, Entner Harald wrote: > remove this line > true ;) > > -Ursprüngliche Nachricht- > Von: eyal edri [mailto:eyal.e...@gmail.com] > Gesendet: Donnerstag, 21. Januar 2010 09:08 > An: Maven Users List > Betreff: what copy-dependecies add -jar to artifact subDirectory > > i'm using the following configuration in my pom: > > >org.apache.maven.plugins >maven-dependency-plugin > > >copy-dependencies >install > > copy-dependencies > > > > /usr/lib/ctch/java > true > true > true > true > true > true > > > > > > but maven added a '-jar' suffix to the subdirectories: > > [INFO] Copying junit-4.7.jar to /usr/lib/ctch/java/*junit-jar*/junit.jar > [INFO] Copying junit-4.7.pom to /usr/lib/ctch/java/junit-jar/junit.pom > [INFO] Copying log4j-1.2.14.jar to /usr/lib/ctch/java/*log4j-jar*/log4j.jar > > anyone knows how to remove it? > > -- > Eyal Edri > -- Eyal Edri
best practice to include resources in the jar file and unpack them on target server
Hi, i'v included resource files inside the jar file using the include tag: devel org.apache.maven.plugins maven-jar-plugin src/main/resources **/* # jar tf /usr/lib/ctch/java/IncreasePriority-jar/IncreasePriority.jar META-INF/ META-INF/MANIFEST.MF increase-priority.properties increase-priority.cron META-INF/maven/ META-INF/maven/com.url.unknowns/ META-INF/maven/com.url.unknowns/IncreasePriority/ META-INF/maven/com.url.unknowns/IncreasePriority/pom.xml META-INF/maven/com.url.unknowns/IncreasePriority/pom.properties what's the best way (via pom) to copy them to targetDirectories, e.g *.cron to /etc/cron.d *.properties to /etc/${artifactId}/ thanks -- Eyal Edri
what copy-dependecies add -jar to artifact subDirectory
i'm using the following configuration in my pom: org.apache.maven.plugins maven-dependency-plugin copy-dependencies install copy-dependencies /usr/lib/ctch/java true true true true true true but maven added a '-jar' suffix to the subdirectories: [INFO] Copying junit-4.7.jar to /usr/lib/ctch/java/*junit-jar*/junit.jar [INFO] Copying junit-4.7.pom to /usr/lib/ctch/java/junit-jar/junit.pom [INFO] Copying log4j-1.2.14.jar to /usr/lib/ctch/java/*log4j-jar*/log4j.jar anyone knows how to remove it? -- Eyal Edri
Re: install maven project from repository to local fs
so how do you suggest on doing so? let's say you're the sys admin and you know the JARs are in the repository. and you need to install them (with dependencies) on the server. what do you do? (btw, we don't use java application server yet, since we only deploy classic runnalbe java jars (not web or anything like that). On Tue, Jan 19, 2010 at 4:54 PM, Todd Thiessen wrote: > Using maven to install in this way is just wrong IMO. You should be able > to install your product without the person installing knowing anything > about maven. > > --- > Todd Thiessen > > > > -Original Message- > > From: eyal edri [mailto:eyal.e...@gmail.com] > > Sent: Tuesday, January 19, 2010 9:25 AM > > To: Maven Users List > > Subject: Re: install maven project from repository to local fs > > > > Another idea came to mind: > > > > what do you think about the following: > > > > 1. writing + deploying all the projects to the repository. *(done by > > developer).* > > 2. write a small maven project on production system (an > > install project) : > > that uses GMaven (groovy) plugin, to dynamically create a > > local pom that will install the required > >project. (using http GET or just adding the project as a > > dependency and runnnig mvn install...) > > > >for example, the user can run the project with a parameter > > on cli which will contain the project > >name to fetch from artifactory. *done by system guy > > (installs stuff on > > production)* > > > > anyone used the GMaven plugin? > > > > Eyal. > > > > On Tue, Jan 19, 2010 at 4:02 PM, eyal edri > > wrote: > > > > > I also used the "copy dependencies" option, but again this requires > > > you (the developer) to run this from the machine that holds the pom > > > file and deploy it (no sure if it supports remote copy). > > > > > > there might be another option like wayne suggested: > > > http://cargo.codehaus.org/ > > > > > > and using the maven2 plugin: http://cargo.codehaus.org/Maven2+plugin > > > > > > i'm checking it now... hopefully it help give a solution. > > > > > > -Eyal > > > > > > > > > > > > > > > On Tue, Jan 19, 2010 at 3:41 PM, Johannes Schneider < > > > maili...@cedarsoft.com> wrote: > > > > > >> On 01/19/2010 11:30 AM, eyal edri wrote: > > >> > > >>> so you create a 'FAT' jar, as i understand. > > >>> > > >> > > >> Yes. Most of the time. > > >> > > >> One project uses another approach where all dependencies > > are copied > > >> to a lib folder. But this has other disadvantages: It > > isn't deployed > > >> to the > > >> repository: > > >> ... > > >> > > >> > > >>maven-jar-plugin > > >> > > >> > > >> > > >> > > com.cedarsoft.meeting.MeetingTimer > > >> true > > >> > > >> lib > > >> > > >> > > >> > > >> > > >> > > >> > > >>maven-dependency-plugin > > >> > > >> > > >>copy-dependencies > > >>package > > >> > > >> copy-dependencies > > >> > > >> > > >> > > >> > > >> > > >> runtime > > >> > > ${project.build.directory}/lib > > >> > > >> > > >> > > >> ... > > >> > > >> Other projects use JNLP. There are all jars copied to a lib > > >> directory, too. But they are also not deployed to the repository. > > >> > > >> > > >> this can be very troublesome. > > >>> > > >>> think about a scenario where you need to update one of the > > >>> dependencies, and its being used in a lot of application > > jars. you > > >>> will need to update all the applications jars > > >>> > > >> > > >> Yes, but I have to update all projects anyway: I have to > > update the > > >> version information w
Re: install maven project from repository to local fs
Another idea came to mind: what do you think about the following: 1. writing + deploying all the projects to the repository. *(done by developer).* 2. write a small maven project on production system (an install project) : that uses GMaven (groovy) plugin, to dynamically create a local pom that will install the required project. (using http GET or just adding the project as a dependency and runnnig mvn install...) for example, the user can run the project with a parameter on cli which will contain the project name to fetch from artifactory. *done by system guy (installs stuff on production)* anyone used the GMaven plugin? Eyal. On Tue, Jan 19, 2010 at 4:02 PM, eyal edri wrote: > I also used the "copy dependencies" option, but again this requires you > (the developer) to run this from the machine that holds the pom file and > deploy it (no sure if it supports remote copy). > > there might be another option like wayne suggested: > http://cargo.codehaus.org/ > > and using the maven2 plugin: http://cargo.codehaus.org/Maven2+plugin > > i'm checking it now... hopefully it help give a solution. > > -Eyal > > > > > On Tue, Jan 19, 2010 at 3:41 PM, Johannes Schneider < > maili...@cedarsoft.com> wrote: > >> On 01/19/2010 11:30 AM, eyal edri wrote: >> >>> so you create a 'FAT' jar, as i understand. >>> >> >> Yes. Most of the time. >> >> One project uses another approach where all dependencies are copied to a >> lib folder. But this has other disadvantages: It isn't deployed to the >> repository: >> ... >> >> >>maven-jar-plugin >> >> >> >> com.cedarsoft.meeting.MeetingTimer >> true >> >> lib >> >> >> >> >> >> >>maven-dependency-plugin >> >> >>copy-dependencies >>package >> >> copy-dependencies >> >> >> >> >> >> runtime >> ${project.build.directory}/lib >> >> >> >> ... >> >> Other projects use JNLP. There are all jars copied to a lib directory, >> too. But they are also not deployed to the repository. >> >> >> this can be very troublesome. >>> >>> think about a scenario where you need to update one of the dependencies, >>> and >>> its being used in a lot of application jars. you will need to update all >>> the >>> applications jars >>> >> >> Yes, but I have to update all projects anyway: I have to update the >> version information within the pom.xml... >> And "patching" my deployed application (by replacing a dependency jar) >> seems to be a very bad idea. >> >> >> I see basically two options: >> - One big super-jar that is deployed to a repository: See shade, minijar >> and/or assembly plugin). Old versions are archived, very easy deployment: >> Just one wget. >> Disadvantages: Takes more space in the repository (but who cares about >> disk space today), more to download. >> >> - lib directory with dependencies (see example above). Deployment is a >> little bit more complicated. I think rsync might be a good solution. Safes >> disk space and lesser stuff to download. >> >> >> But as long as you don't have problems with disk space, I suggest the >> big-jar approach... >> >> >> Sincerly, >> >> Johannes >> >> >> >> >>> On Tue, Jan 19, 2010 at 12:25 PM, Johannes Schneider< >>> maili...@cedarsoft.com >>> >>>> wrote: >>>> >>> >>> On 01/18/2010 07:28 PM, eyal edri wrote: >>>> >>>> i'm interested in how people do deploy their apps, even if it's not >>>>> directly >>>>> connected to maven. >>>>> >>>>> >>>> I create a runnable jar (with all dependencies) or a war (for web >>>> applications). That is deployed to the repository. >>>> That can be downloaded with a one liner using wget. >>>> >>>> So I think you shouldn't "install" or do any fancy work on you >>>> production >>>> server but just download the latest artifact/jar/war/whatever. >>>>
Re: install maven project from repository to local fs
I also used the "copy dependencies" option, but again this requires you (the developer) to run this from the machine that holds the pom file and deploy it (no sure if it supports remote copy). there might be another option like wayne suggested: http://cargo.codehaus.org/ and using the maven2 plugin: http://cargo.codehaus.org/Maven2+plugin i'm checking it now... hopefully it help give a solution. -Eyal On Tue, Jan 19, 2010 at 3:41 PM, Johannes Schneider wrote: > On 01/19/2010 11:30 AM, eyal edri wrote: > >> so you create a 'FAT' jar, as i understand. >> > > Yes. Most of the time. > > One project uses another approach where all dependencies are copied to a > lib folder. But this has other disadvantages: It isn't deployed to the > repository: > ... > > >maven-jar-plugin > > > > com.cedarsoft.meeting.MeetingTimer > true > > lib > > > > > > >maven-dependency-plugin > > >copy-dependencies >package > > copy-dependencies > > > > > > runtime > ${project.build.directory}/lib > > > > ... > > Other projects use JNLP. There are all jars copied to a lib directory, too. > But they are also not deployed to the repository. > > > this can be very troublesome. >> >> think about a scenario where you need to update one of the dependencies, >> and >> its being used in a lot of application jars. you will need to update all >> the >> applications jars >> > > Yes, but I have to update all projects anyway: I have to update the version > information within the pom.xml... > And "patching" my deployed application (by replacing a dependency jar) > seems to be a very bad idea. > > > I see basically two options: > - One big super-jar that is deployed to a repository: See shade, minijar > and/or assembly plugin). Old versions are archived, very easy deployment: > Just one wget. > Disadvantages: Takes more space in the repository (but who cares about disk > space today), more to download. > > - lib directory with dependencies (see example above). Deployment is a > little bit more complicated. I think rsync might be a good solution. Safes > disk space and lesser stuff to download. > > > But as long as you don't have problems with disk space, I suggest the > big-jar approach... > > > Sincerly, > > Johannes > > > > >> On Tue, Jan 19, 2010 at 12:25 PM, Johannes Schneider< >> maili...@cedarsoft.com >> >>> wrote: >>> >> >> On 01/18/2010 07:28 PM, eyal edri wrote: >>> >>> i'm interested in how people do deploy their apps, even if it's not >>>> directly >>>> connected to maven. >>>> >>>> >>> I create a runnable jar (with all dependencies) or a war (for web >>> applications). That is deployed to the repository. >>> That can be downloaded with a one liner using wget. >>> >>> So I think you shouldn't "install" or do any fancy work on you production >>> server but just download the latest artifact/jar/war/whatever. >>> >>> >>> Johannes >>> >>> >>> >>> maybe i'm biased from our current status, where we use YUM&RPM to >>>> install >>>> our perl code on servers. >>>> >>>> On Mon, Jan 18, 2010 at 8:25 PM, Wayne Fay wrote: >>>> >>>> i can't understand how the project goes from being the in repository to >>>> >>>>> being installed and running on the production server. >>>>>> >>>>>> >>>>> This is outside the domain of Maven. From the website: "Apache Maven >>>>> is a software project management and comprehension tool. Based on the >>>>> concept of a project object model (POM), Maven can manage a project's >>>>> build, reporting and documentation from a central piece of >>>>> information." >>>>> >>>>> Where does it say "Maven will also help you deploy/install your end >>>>> product into your production environment"? >>>>> >>>>> How does Ant or another Java build tool support your use case? >>>>> >>>>> 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 >>> >>> >>> >> >> > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Eyal Edri
Re: install maven project from repository to local fs
so you create a 'FAT' jar, as i understand. this can be very troublesome. think about a scenario where you need to update one of the dependencies, and its being used in a lot of application jars. you will need to update all the applications jars On Tue, Jan 19, 2010 at 12:25 PM, Johannes Schneider wrote: > On 01/18/2010 07:28 PM, eyal edri wrote: > >> i'm interested in how people do deploy their apps, even if it's not >> directly >> connected to maven. >> > > I create a runnable jar (with all dependencies) or a war (for web > applications). That is deployed to the repository. > That can be downloaded with a one liner using wget. > > So I think you shouldn't "install" or do any fancy work on you production > server but just download the latest artifact/jar/war/whatever. > > > Johannes > > > >> maybe i'm biased from our current status, where we use YUM&RPM to install >> our perl code on servers. >> >> On Mon, Jan 18, 2010 at 8:25 PM, Wayne Fay wrote: >> >> i can't understand how the project goes from being the in repository to >>>> being installed and running on the production server. >>>> >>> >>> This is outside the domain of Maven. From the website: "Apache Maven >>> is a software project management and comprehension tool. Based on the >>> concept of a project object model (POM), Maven can manage a project's >>> build, reporting and documentation from a central piece of >>> information." >>> >>> Where does it say "Maven will also help you deploy/install your end >>> product into your production environment"? >>> >>> How does Ant or another Java build tool support your use case? >>> >>> 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 > > -- Eyal Edri
Re: install maven project from repository to local fs
well, it's not entirly true, since you do have some plugins that support it (rpm/assembly). i'm interested in how people do deploy their apps, even if it's not directly connected to maven. maybe i'm biased from our current status, where we use YUM &RPM to install our perl code on servers. On Mon, Jan 18, 2010 at 8:25 PM, Wayne Fay wrote: > > i can't understand how the project goes from being the in repository to > > being installed and running on the production server. > > This is outside the domain of Maven. From the website: "Apache Maven > is a software project management and comprehension tool. Based on the > concept of a project object model (POM), Maven can manage a project's > build, reporting and documentation from a central piece of > information." > > Where does it say "Maven will also help you deploy/install your end > product into your production environment"? > > How does Ant or another Java build tool support your use case? > > Wayne > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Eyal Edri
Re: install maven project from repository to local fs
I know, that's why i'm asking which plugin does install it to a remote server. don't you guys need this functionality? how to you deploy projects? On Mon, Jan 18, 2010 at 8:24 PM, Todd Thiessen wrote: > Perhaps you are getting the concept of "install" confused. Mvn install > does not mean install it on a production server. It means install all > project artifacts to your local maven repository. > > --- > Todd Thiessen > > > > -Original Message- > > From: eyal edri [mailto:eyal.e...@gmail.com] > > Sent: Monday, January 18, 2010 1:13 PM > > To: Maven Users List > > Subject: Re: install maven project from repository to local fs > > > > by repo i meant maven repository (nexus or artifactory). > > > > i don't understand something. > > > > as a developer, i'm developing my maven project on my pc or > > build machine... > > i finish coding, checkin the code then: > > 1. hudson will auto build it and test > > 2. i will mvn deploy it to the artifactory. > > > > i can't understand how the project goes from being the in > > repository to being installed and running on the production server. > > > > i currently know of 2 ways to do it: > > 1. assmebly - create a tar.gz of the project or something. > > 2. rpm - build a FAT rpm that includes all the jars. > > > > i doesnt sound logic that maven doesnt support an option to > > actually "install" an application on a remote server (without > > having the pom or sources locally). > > > > am i'm making sense here? > > > > Eyal. > > > > On Mon, Jan 18, 2010 at 5:31 PM, Adam Leggett (UPCO) < > > adam.legg...@upco.co.uk> wrote: > > > > > When you say 'repo' do you mean source code repository? You can use > > > the Maven SCM plugin get checkout your project, prior to running > > > install - > > > > > > mvn scm:checkout > > > -DconnectionUrl=scm:svn:http://somehost/somepath/someproject > > > > > > On Mon, 2010-01-18 at 14:40 +0200, eyal edri wrote: > > > > I'm not sure this plugin is what i need. > > > > > > > > what i would want is simply to run "mvn install > > project-name" from > > > > any directory on the fs and maven will run the 'install' phase > > > > without having the pom & code locally (will read it from > > the repo). > > > > > > > > Eyal. > > > > > > -- > > > Adam Leggett > > > Chief Architect > > > Mike CI - Hosted Continuous Integration http://mikeci.com > > > > > > https://twitter.com/builtbyadam > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > > > For additional commands, e-mail: users-h...@maven.apache.org > > > > > > > > > > > > -- > > Eyal Edri > > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Eyal Edri
Re: install maven project from repository to local fs
by repo i meant maven repository (nexus or artifactory). i don't understand something. as a developer, i'm developing my maven project on my pc or build machine... i finish coding, checkin the code then: 1. hudson will auto build it and test 2. i will mvn deploy it to the artifactory. i can't understand how the project goes from being the in repository to being installed and running on the production server. i currently know of 2 ways to do it: 1. assmebly - create a tar.gz of the project or something. 2. rpm - build a FAT rpm that includes all the jars. i doesnt sound logic that maven doesnt support an option to actually "install" an application on a remote server (without having the pom or sources locally). am i'm making sense here? Eyal. On Mon, Jan 18, 2010 at 5:31 PM, Adam Leggett (UPCO) < adam.legg...@upco.co.uk> wrote: > When you say 'repo' do you mean source code repository? You can use the > Maven SCM plugin get checkout your project, prior to running install - > > mvn scm:checkout > -DconnectionUrl=scm:svn:http://somehost/somepath/someproject > > On Mon, 2010-01-18 at 14:40 +0200, eyal edri wrote: > > I'm not sure this plugin is what i need. > > > > what i would want is simply to run "mvn install project-name" from any > > directory on the fs and maven will run the 'install' phase without > > having > > the pom & code locally (will read it from the repo). > > > > Eyal. > > -- > Adam Leggett > Chief Architect > Mike CI - Hosted Continuous Integration > http://mikeci.com > > https://twitter.com/builtbyadam > > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Eyal Edri
Re: install maven project from repository to local fs
I'm not sure this plugin is what i need. what i would want is simply to run "mvn install project-name" from any directory on the fs and maven will run the 'install' phase without having the pom & code locally (will read it from the repo). Eyal. On Mon, Jan 18, 2010 at 2:22 PM, Erlend Hamnaberg wrote: > Take a look at the maven appassembler plugin > > http://mojo.codehaus.org/appassembler/appassembler-maven-plugin/ > > On Mon, Jan 18, 2010 at 1:16 PM, eyal edri wrote: > > > hi, > > > > how can i use mvn command line (i want to be able to run it via script), > to > > install (not maven install) a project to the file system? > > > > the fs will NOT have the pom file or the source code since it's the > > production server. > > it will only have the settings.xml configed to the maven repository. > > > > here's an example pom file to install : > > > > * > > http://maven.apache.org/POM/4.0.0"; xmlns:xsi=" > > http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation=" > > http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/maven-v4_0_0.xsd > > "> > > 4.0.0 > > com.company.url.unknowns > > IncreasePriority > > jar > > 0.0.2 > > IncreasePriority > > > >com.company.maven.pom > >WebSecParent > >0.0.2 > > > > > > > > > >org.apache.maven.plugins > >maven-dependency-plugin > > > > > >copy-dependencies > >package > > > > copy-dependencies > > > > > > /usr/lib/ctch/java/ > > true > > true > > true > > > > > > > > > > > >org.apache.maven.plugins > >maven-resources-plugin > > > > > >copy-conf > >install > > > > copy-resources > > > > > > > > /etc/ct-urlf-increase-priority/ > > > > > > src/main/resources > > true > > > >**/*.properties > > > > > > > > > > > > > >copy-cron > >install > > > > copy-resources > > > > > > /etc/cron.d/ > > > > > > src/main/resources > > true > > > >**/*.cron > > > > > > > > > > > > > > > > > >org.apache.maven.plugins > >maven-jar-plugin > > > > > > /usr/local/ct-urlf-increase-priority > > > > > > > > com.company.url.unknowns.IncreasePriority > > true > > /usr/lib/ctch/java/ > > > > > > > > > > > > > > > > > > javax.mail > > mail > > 1.4.1 > > > > > > com.company.sql > > DbUtil > > 0.0.4 > > > > > > > > > > * > > -- > > Eyal Edri > > > -- Eyal Edri
install maven project from repository to local fs
hi, how can i use mvn command line (i want to be able to run it via script), to install (not maven install) a project to the file system? the fs will NOT have the pom file or the source code since it's the production server. it will only have the settings.xml configed to the maven repository. here's an example pom file to install : * http://maven.apache.org/POM/4.0.0"; xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 com.company.url.unknowns IncreasePriority jar 0.0.2 IncreasePriority com.company.maven.pom WebSecParent 0.0.2 org.apache.maven.plugins maven-dependency-plugin copy-dependencies package copy-dependencies /usr/lib/ctch/java/ true true true org.apache.maven.plugins maven-resources-plugin copy-conf install copy-resources /etc/ct-urlf-increase-priority/ src/main/resources true **/*.properties copy-cron install copy-resources /etc/cron.d/ src/main/resources true **/*.cron org.apache.maven.plugins maven-jar-plugin /usr/local/ct-urlf-increase-priority com.company.url.unknowns.IncreasePriority true /usr/lib/ctch/java/ javax.mail mail 1.4.1 com.company.sql DbUtil 0.0.4 * -- Eyal Edri
Re: using rpm plugin as a deploy tool instead of maven
yea.. i figured it out :) what i mean is, if i need all the dependencies, i have no other way, no? what about using the "advanced features" like: - provides defines a *virtual package* which is provided by the package being built - requires identifies a package that is required to be installed for the package being built to operate correctly - conflicts identifies a package which must not be installed if the package being built is installed do you use those? another small issue: i'm using wagon plugin to upload the rpm to the yum repo, but i still need to run 2 commands via ssh onj the remote server: 1. CREATE REMOTE DIR WITH PKG NAME \ 2. RUN make -C /ctcfgroot/ctstable ON REMOTE SERVER you have an idea how? * http://maven.apache.org/POM/4.0.0"; xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 com.company.sql DbUtil jar 0.0.5 DbUtil DB Utils to Connect to ctch db com.company.maven.pom WebSecParent 0.0.4 com.microsoft.sqlserver.jdbc sqljdbc 2.0 org.codehaus.mojo rpm-maven-plugin 2.0-beta-4 rpm 2010, Company Fedora 8 Database/Utils Company Inc /usr/lib/ctch/java 775 eyale eyale true target/*.jar x86 org.codehaus.mojo wagon-maven-plugin 1.0-beta-3 upload-rpm deploy upload target/rpm/${artifactId}/RPMS/noarch *.rpm scp://yum-server.company.com /ctcfgroot/ctstable/src/all org.apache.maven.wagon wagon-ssh 1.0-beta-6 * Eyal. On Sun, Jan 17, 2010 at 4:34 PM, Karl Heinz Marbaise wrote: > Hi, > > > >> >> so it means i need a maven repository on development env so it will fetch >> all the jars to the rpm. >> > Yes you need an MVN Repository (may be using an Repository Manager like > nexus, artifactory, archiva etc.)... > > > it that the only way to go? (an rpm that includes all the jars in it?) >> > No... > > You can define the dependencies you include or exclude parts of it, cause > you used means in other words all dependencies... > Take a look into the docs of it: > > http://mojo.codehaus.org/rpm-maven-plugin/map-params.html#dependency > > > >> >> > As mentioned above, but your comment gives me the impression that you know > how it works...(or is it just copy&paste)... > > > > Kind regards > Karl Heinz Marbaise > -- > SoftwareEntwicklung Beratung SchulungTel.: +49 (0) 2405 / 415 893 > Dipl.Ing.(FH) Karl Heinz MarbaiseICQ#: 135949029 > Hauptstrasse 177 USt.IdNr: DE191347579 > 52146 Würselen http://www.soebes.de > -- Eyal Edri
Re: using rpm plugin as a deploy tool instead of maven
i made a little progress. here's what i done so far: 1. created a pom configuration with rpm for a DbUtil.jar project (which depends on log4j(via parentPom) and sqljdbc). 2. the rpm created is a FAT rpm, which includes all the jars inside it. $ rpm -qlp DbUtil-0.0.4-1.noarch.rpm /usr/lib/ctch/java /usr/lib/ctch/java/DbUtil.jar /usr/lib/ctch/java/log4j-1.2.14.jar /usr/lib/ctch/java/sqljdbc-2.0.jar so it means i need a maven repository on development env so it will fetch all the jars to the rpm. it that the only way to go? (an rpm that includes all the jars in it?) here's the pom: http://maven.apache.org/POM/4.0.0"; xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 com.company.sql DbUtil jar 0.0.4 DbUtil DB Utils to Connect to ctch db com.company.maven.pom WebSecParent 0.0.4 com.microsoft.sqlserver.jdbc sqljdbc 2.0 org.codehaus.mojo rpm-maven-plugin 2.0-beta-4 2010, Company Fedora 8 Database/Utils Company Inc /usr/lib/ctch/java 775 eyale eyale true target/DbUtil.jar On Sun, Jan 17, 2010 at 2:43 PM, Karl Heinz Marbaise wrote: > Hi, > > I'm working currently with RPM plugin ( > http://mojo.codehaus.org/rpm-maven-plugin/) and working in relationship > with RPM's and creating dependencies between the RPM's and deploying > RPM's... > > > Hi, >> >> Our IT guys are giving me hard times on installing a second deployment >> arch >> in the production system. >> we're using RPM for now. >> >> i want to know if (and how) i can config a project to build an rpm, deploy >> it to yum. >> then when installing the rpm with yum, it will install all it's >> dependencies >> (from maven repository). >> >> i don't want to manage 2 duplicate dependencies systems (yum + maven). >> >> anyone has experience with the RPM plugin and knows the best way to use >> it? >> >> May be you can explain your needs a litte bit more specific and i can see > if i can help... > > Kind regards > Karl Heinz Marbaise > -- > SoftwareEntwicklung Beratung SchulungTel.: +49 (0) 2405 / 415 893 > Dipl.Ing.(FH) Karl Heinz MarbaiseICQ#: 135949029 > Hauptstrasse 177 USt.IdNr: DE191347579 > 52146 Würselen http://www.soebes.de > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Eyal Edri
using rpm plugin as a deploy tool instead of maven
Hi, Our IT guys are giving me hard times on installing a second deployment arch in the production system. we're using RPM for now. i want to know if (and how) i can config a project to build an rpm, deploy it to yum. then when installing the rpm with yum, it will install all it's dependencies (from maven repository). i don't want to manage 2 duplicate dependencies systems (yum + maven). anyone has experience with the RPM plugin and knows the best way to use it? thanks. -- Eyal Edri
maven install goal on remote server
Hi, I'm trying to configure the "hudson ci server" to retrieve a maven project from the SCM and then build/test/install it on an integration server. is it possible to tell maven that for a certain goal (e.g install remote) so that the hudson will install it on a remote server? (i can then run the 'post build task' plugin and run a shell script to activate certain tests...). right now i use 'copy-dependencies' and 'copy-resources' for installing a project on the local machine (see POM below) is there a way to it remotly? thanks! http://maven.apache.org/POM/4.0.0"; xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 com.company.url.unknowns IncreasePriority jar 0.0.2 IncreasePriority com.company.maven.pom WebSecParent 0.0.2 org.apache.maven.plugins maven-dependency-plugin copy-dependencies package copy-dependencies /usr/lib/ctch/java/ true true true org.apache.maven.plugins maven-resources-plugin copy-conf install copy-resources /etc/ct-urlf-increase-priority/ src/main/resources true **/*.properties copy-cron install copy-resources /etc/cron.d/ src/main/resources true **/*.cron org.apache.maven.plugins maven-jar-plugin /usr/local/ct-urlf-increase-priority com.company.url.unknowns.IncreasePriority true /usr/lib/ctch/java/ javax.mail mail 1.4.1 com.company.sql DbUtil 0.0.4 -- Eyal Edri
Re: error using scm:accurev with the scm plugin
Actually, i might not need the maven scm plugin... if i've got hudson working with accurev - that's settles the automatic building... and i can use accurev plugin for eclipse for checkin/out releases. I've expressed what you said about accurev to my team leader, and he said those are not relevant to our environment.. so in the meantime.. we're going on accurev... -Eyal On Wed, Dec 30, 2009 at 4:04 PM, Stephen Connolly < stephen.alan.conno...@gmail.com> wrote: > I told you already, Accurev does not play well with Maven... and IMHO, > it cannot be made to play well with Maven without Accurev > re-architecting some things. > > -Stephen > > 2009/12/30 eyal edri : > > i'm trying to use the scm plugin with the Accurev SCM. > > > > Here's my pom: > > > > > > http://maven.apache.org/POM/4.0.0"; xmlns:xsi=" > > http://www.w3.org/2001/XMLSchema-instance"; > > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > > http://maven.apache.org/maven-v4_0_0.xsd";> > > 4.0.0 > > com.company.sql > > DbUtil > > jar > > 0.0.3 > > DbUtil > > > >com.company.maven.pom > >WebSecParent > >0.0.1 > > > > > > > >com.microsoft.sqlserver.jdbc > >sqljdbc > >2.0 > > > > > > org.apache.maven.scm > > maven-scm-provider-accurev > >1.1 > > > > > > > >scm:accurev:server:5050/CTTest/DbUtil/ > > > > > > > > > >org.apache.maven.plugins > >maven-scm-plugin > >1.0 > > > > install > > > > > > > > > > > > > > when i run scm:compile: > > > > [INFO] Scanning for projects... > > [INFO] > > > > [INFO] Building DbUtil > > [INFO]task-segment: [scm:validate] (aggregator-style) > > [INFO] > > > > [INFO] Preparing scm:validate > > [INFO] No goals needed for project - skipping > > [INFO] [scm:validate {execution: default-cli}] > > [ERROR] Validation of scm url connection (connectionUrl) failed : > > [ERROR] No such provider installed 'accurev'. > > [ERROR] The invalid scm url connection: > > 'scm:accurev:server:5050/CTTest/DbUtil/'. > > [INFO] > > > > [ERROR] BUILD ERROR > > [INFO] > > ---- > > [INFO] Command failed. Bad Scm URL. > > [INFO] > > > > [INFO] For more information, run Maven with the -e switch > > [INFO] > > > > [INFO] Total time: 4 seconds > > [INFO] Finished at: Wed Dec 30 15:00:28 IST 2009 > > [INFO] Final Memory: 11M/73M > > [INFO] > > > > > > Any idea? > > > > -- > > Eyal Edri > > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Eyal Edri
error using scm:accurev with the scm plugin
i'm trying to use the scm plugin with the Accurev SCM. Here's my pom: http://maven.apache.org/POM/4.0.0"; xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 com.company.sql DbUtil jar 0.0.3 DbUtil com.company.maven.pom WebSecParent 0.0.1 com.microsoft.sqlserver.jdbc sqljdbc 2.0 org.apache.maven.scm maven-scm-provider-accurev 1.1 scm:accurev:server:5050/CTTest/DbUtil/ org.apache.maven.plugins maven-scm-plugin 1.0 install when i run scm:compile: [INFO] Scanning for projects... [INFO] [INFO] Building DbUtil [INFO]task-segment: [scm:validate] (aggregator-style) [INFO] [INFO] Preparing scm:validate [INFO] No goals needed for project - skipping [INFO] [scm:validate {execution: default-cli}] [ERROR] Validation of scm url connection (connectionUrl) failed : [ERROR] No such provider installed 'accurev'. [ERROR] The invalid scm url connection: 'scm:accurev:server:5050/CTTest/DbUtil/'. [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Command failed. Bad Scm URL. [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 4 seconds [INFO] Finished at: Wed Dec 30 15:00:28 IST 2009 [INFO] Final Memory: 11M/73M [INFO] ---- Any idea? -- Eyal Edri
how to add new item to maven menu "run as" under m2eclipse?
when you install the m2eclipse plugin, a new context menu is added to the "run as" with various maven goals. how can i add/change the default goals that appear there? (like Maven deploy...) only option now is to use the build... and choose manually deploy [image: ?ui=2&view=att&th=125df4c88f65192a&attid=0.1&disp=attd&realattid=ii_125df4c88f65192a&zw] -- Eyal Edri
Re: Maven + JUnit, what's the best approach?
yea..by managed, i meant support from a vendor. You don't have to convince me.. i'm the developer :) you need to convince the r&d manager that going to put all the company's source code in an open source project, which if there is a problem... might not someone to yell at :) btw: don't fall off your chair.. but we've been using starteam 6 (from 2005) so far... but.., i hope i'll managed to convince them... i just need strong points.. if you say it works good with maven & hudson.. then it's a good start... On Tue, Dec 29, 2009 at 8:15 PM, Karl Heinz Marbaise wrote: > Hi, > > > I ran away from starteam into accurev :( >> >> is there any other good managed (commerical) SCM out there that works with >> linux? >> > Why do you need a commerical tool ? Why not using Subversion > > Greate community, really good documentation (for free)...which is supported > by many many tools (IDE, Maven, Hudson, etc. )... > > > And what did you understand under "managed" ? Support contract ? > > > Kind regards > Karl Heinz Marbaise > -- > SoftwareEntwicklung Beratung SchulungTel.: +49 (0) 2405 / 415 893 > Dipl.Ing.(FH) Karl Heinz MarbaiseICQ#: 135949029 > Hauptstrasse 177 USt.IdNr: DE191347579 > 52146 Würselen http://www.soebes.de > > ----- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Eyal Edri
Re: Maven + JUnit, what's the best approach?
I ran away from starteam into accurev :( is there any other good managed (commerical) SCM out there that works with linux? Eyal. On Tue, Dec 29, 2009 at 6:31 PM, Stephen Connolly < stephen.alan.conno...@gmail.com> wrote: > 2009/12/29 eyal edri > > > thanks, > > > > actually i've already setup a few things: > > > > - artifactory > > - hudson > > - scm (tesing accurev) > > > > IMHO, accurev is a pile of esp if you want to use Maven. There are > some architectural decisions that they made which make use with Maven a > pain. > > Subversion is great with Maven, and it's free too > > Also having migrated our 11 years worth of source control from Accurev to > Subversion (including writing a tool [which my employers will not let me > publish] to extract the full history into Subversion) I would not > personally > touch Accurev with a 1000 foot barge pole. > > I know others feel differently, and these are my personal opinions, but > anywho, just thought you'd appreciate the feedback > > -Stephen > > P.S. > 1. You cannot export a tree into a subfolder of a workspace (makes using > the maven release plugin a nightmare) > 2. You cannot have a workspace as a subfolder of another workspace (makes > aggregator style projects a pain... You can solve this by using > include/exclude rules and some partial view stuff... but that only works if > you only use one depot...) > 3. Snapshot/workspace names must be unique at any point in time... and you > cannot delete snapshots... makes tagging a pain... try re-rolling a release > with maven-release-plugin > 4. AFAIK, Maven release plugin does not work yet with Accurev (as the SCM > support for maven was not where it needed to be before we ditched Accurev) > I > had written an SCM implementation [which I cannot share] but it was > impossible to get it to work with the release-plugin's workflow > > > - maven2 > > - issue tracking is currently bugzilla, but might be jira > > > > i'm looking at the default test classes maven creates, are they obsolete? > > i saw that maven added junit 3.8.1 instead of 4.x as a dependency and > > auto generated this code: > > > > *import junit.framework.Test; > > import junit.framework.TestCase; > > import junit.framework.TestSuite; > > > > /** > > * Unit test for simple App. > > */ > > public class DbUtilTest > >extends TestCase > > { > >/** > > * Create the test case > > * > > * @param testName name of the test case > > */ > >public DbUtilTest( String testName ) > >{ > >super( testName ); > >} > > > >/** > > * @return the suite of tests being tested > > */ > >public static Test suite() > >{ > >return new TestSuite( DbUtilTest.class ); > >} > > > >/** > > * Rigorous Test :-) > > */ > >public void testApp() > >{ > >assertTrue( true ); > >} > > > > }* > > > > > > should i change the junit in the pom to 4.7? > > in some junit examples they use annotations (@Test), which doesn't work > > with > > that code.. > > > > i'm a bit confused... > > > > > > > > On Tue, Dec 29, 2009 at 3:58 PM, Ognjen Blagojevic > >wrote: > > > > > eyal edri wrote: > > > > > >> I'm new to Java and maven and currently in the process of building the > > >> entire infrastructure for java development in the company. > > >> > > >> i'm not quite familiar with JUnit, but i know maven makes it easy for > > you > > >> by > > >> creating default test tree and test classes in each project. > > >> > > >> where can i read about best practices regarding writing unit tests for > > my > > >> java apps using JUnit with MAVEN? > > >> > > >> thanks. > > >> > > > > > > Start with: > > > > > > http://maven.apache.org/guides/getting-started/index.html > > > http://code.google.com/p/t2framework/wiki/JUnitQuickTutorial > > > > > > I you are building an infrastructure, aside from JUnit and Maven > > knowledge, > > > you will (probably) need to install, in order of importance: > > > > > > 1. Version control system such as Subversion > > > 2. Maven ropository, such as Apache Archiva, Artifactory or Nexus > > > 3. Mailing list manager, such as Mailman > > > 4. Issue tracking system, such as Trac > > > 5. Continuos integration system, such as Apache Continuum > > > > > > Regards, > > > Ognjen > > > > > > > > > - > > > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > > > For additional commands, e-mail: users-h...@maven.apache.org > > > > > > > > > > > > -- > > Eyal Edri > > > -- Eyal Edri
Re: Maven + JUnit, what's the best approach?
On Tue, Dec 29, 2009 at 4:15 PM, Karl Heinz Marbaise wrote: > Hi, > > > actually i've already setup a few things: >> >> - artifactory >> - hudson >> - scm (tesing accurev) >> - maven2 >> - issue tracking is currently bugzilla, but might be jira >> >> i'm looking at the default test classes maven creates, are they obsolete? >> > Maven does not create Test Classes... > It does if you choose 'quickstart' project ... > > i saw that maven added junit 3.8.1 instead of 4.x as a dependency and >> auto generated this code: >> >> should i change the junit in the pom to 4.7? >> > Yes you should, cause if you use JUnit 4.X instead of 3.8 ? > > > > in some junit examples they use annotations (@Test), which doesn't work >> with >> that code.. >> > You have to use JUnit 4.X instead and configure to use Java 1.5 at least to > be able to use Annotations... > i did that, i assume i need to delete the code maven crated and write a new > one. > i had to use the mvn cli to update the junit from 3.8.1 to 4.7 and run mvn eclipse:eclipse. only then i was able to use the code from the example. thanks. > Add a part > > > >org.apache.maven.plugins >maven-compiler-plugin > >1.6 >1.6 >true > > > > > > in your pom to compile with 1.5 or as in this example with 1.6... > > > > Kind regards > Karl Heinz Marbaise > -- > SoftwareEntwicklung Beratung SchulungTel.: +49 (0) 2405 / 415 893 > Dipl.Ing.(FH) Karl Heinz MarbaiseICQ#: 135949029 > Hauptstrasse 177 USt.IdNr: DE191347579 > 52146 Würselen http://www.soebes.de > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Eyal Edri
Re: Maven + JUnit, what's the best approach?
thanks, actually i've already setup a few things: - artifactory - hudson - scm (tesing accurev) - maven2 - issue tracking is currently bugzilla, but might be jira i'm looking at the default test classes maven creates, are they obsolete? i saw that maven added junit 3.8.1 instead of 4.x as a dependency and auto generated this code: *import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; /** * Unit test for simple App. */ public class DbUtilTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ public DbUtilTest( String testName ) { super( testName ); } /** * @return the suite of tests being tested */ public static Test suite() { return new TestSuite( DbUtilTest.class ); } /** * Rigorous Test :-) */ public void testApp() { assertTrue( true ); } }* should i change the junit in the pom to 4.7? in some junit examples they use annotations (@Test), which doesn't work with that code.. i'm a bit confused... On Tue, Dec 29, 2009 at 3:58 PM, Ognjen Blagojevic wrote: > eyal edri wrote: > >> I'm new to Java and maven and currently in the process of building the >> entire infrastructure for java development in the company. >> >> i'm not quite familiar with JUnit, but i know maven makes it easy for you >> by >> creating default test tree and test classes in each project. >> >> where can i read about best practices regarding writing unit tests for my >> java apps using JUnit with MAVEN? >> >> thanks. >> > > Start with: > > http://maven.apache.org/guides/getting-started/index.html > http://code.google.com/p/t2framework/wiki/JUnitQuickTutorial > > I you are building an infrastructure, aside from JUnit and Maven knowledge, > you will (probably) need to install, in order of importance: > > 1. Version control system such as Subversion > 2. Maven ropository, such as Apache Archiva, Artifactory or Nexus > 3. Mailing list manager, such as Mailman > 4. Issue tracking system, such as Trac > 5. Continuos integration system, such as Apache Continuum > > Regards, > Ognjen > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Eyal Edri
Maven + JUnit, what's the best approach?
I'm new to Java and maven and currently in the process of building the entire infrastructure for java development in the company. i'm not quite familiar with JUnit, but i know maven makes it easy for you by creating default test tree and test classes in each project. where can i read about best practices regarding writing unit tests for my java apps using JUnit with MAVEN? thanks. -- Eyal Edri
Re: success building project from cli, failed from m2eclipse
OK, 1st i added version numbers to all the plugins in the parent pom project (i assume that if i use any of the plugin in the children i dont need to mention version, they inherit it). it didn't solve the problem. btw, i use a parent pom not for multi project, but for reuse and order in our maven projects. as for the build failed in eclipse, i 'unticked' the option 'Resolve Workspace Artifacts' and it did the job. (can't say i can explain it, but it worked :) nevertheless, i will follow your advice on working with snapshots when i figure out how to use them :) thanks, On Mon, Dec 28, 2009 at 3:12 PM, Stephen Connolly < stephen.alan.conno...@gmail.com> wrote: > yes. release versions are never checked for updates, snapshots are. so > during devel your project should alway be a snapshot. at release time you > change to a release build and do deploy and thenchange to the next snapshot > version. maven release plugin will do that for you > > > Sent from my [rhymes with tryPod] ;-) > > On 28 Dec 2009, at 12:34, eyal edri wrote: > > I'm really just in the testing phase of maven + java... so it's not >> production yet. >> i haven't fully grasped the concept of SNAPSHOT versions and how to use >> them... >> >> what you're saying is i need to change all my apps ver to ver-SNAPSHOT? >> and the maven release plugin will be used to change it to a real build >> ver? >> >> E. >> >> On Mon, Dec 28, 2009 at 1:56 PM, Stephen Connolly < >> stephen.alan.conno...@gmail.com> wrote: >> >> another issue is your project version is a non-snapshot version... you >>> should really only build release versions in conjunction with the maven >>> release plugin, or else you really really need to know exactly what you >>> are >>> doing (ie your release workflow being different from the release plugin, >>> so >>> you replicate what it does but for your workflow) >>> >>> I know the above is not related to your question... but you will have >>> other >>> issues with your build if you insist on developing with non-snapshot >>> versions of your projects >>> >>> >>> Sent from my [rhymes with tryPod] ;-) >>> >>> On 28 Dec 2009, at 11:42, eyal edri wrote: >>> >>> i have a m2 project which i can install using the cli interface, but >>> fails >>> >>>> using the m2eclipse plugin... >>>> >>>> anyone has an idea? >>>> >>>> here are the outputs: >>>> >>>> command line: >>>> >>>> [ey...@eyale-f8-32 IncreasePriority]$ mvn install >>>> [INFO] Scanning for projects... >>>> [INFO] >>>> >>>> [INFO] Building IncreasePriority >>>> [INFO]task-segment: [install] >>>> [INFO] >>>> >>>> [INFO] [resources:resources {execution: default-resources}] >>>> [INFO] Using 'UTF-8' encoding to copy filtered resources. >>>> [INFO] Copying 2 resources >>>> [INFO] [compiler:compile {execution: default-compile}] >>>> [INFO] Nothing to compile - all classes are up to date >>>> [INFO] [resources:testResources {execution: default-testResources}] >>>> [INFO] Using 'UTF-8' encoding to copy filtered resources. >>>> [INFO] Copying 0 resource >>>> [INFO] [compiler:testCompile {execution: default-testCompile}] >>>> [INFO] Nothing to compile - all classes are up to date >>>> [INFO] [surefire:test {execution: default-test}] >>>> [INFO] Surefire report directory: >>>> >>>> >>>> /home/eyale/starteam/Work/websec/Main/Projects/IncreasePriority/target/surefire-reports >>>> >>>> --- >>>> T E S T S >>>> --- >>>> Running com.company.url.unknowns.IncreasePriorityTest >>>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.06 sec >>>> >>>> Results : >>>> >>>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 >>>> >>>> [INFO] [jar:jar {execution: default-jar}] >>>> [INFO] [dependency:copy-dependencies {execution: copy-dependencies}] >>>> [INFO] DbUtil-0.0.4.jar al
Re: success building project from cli, failed from m2eclipse
I'm really just in the testing phase of maven + java... so it's not production yet. i haven't fully grasped the concept of SNAPSHOT versions and how to use them... what you're saying is i need to change all my apps ver to ver-SNAPSHOT? and the maven release plugin will be used to change it to a real build ver? E. On Mon, Dec 28, 2009 at 1:56 PM, Stephen Connolly < stephen.alan.conno...@gmail.com> wrote: > another issue is your project version is a non-snapshot version... you > should really only build release versions in conjunction with the maven > release plugin, or else you really really need to know exactly what you are > doing (ie your release workflow being different from the release plugin, so > you replicate what it does but for your workflow) > > I know the above is not related to your question... but you will have other > issues with your build if you insist on developing with non-snapshot > versions of your projects > > > Sent from my [rhymes with tryPod] ;-) > > On 28 Dec 2009, at 11:42, eyal edri wrote: > > i have a m2 project which i can install using the cli interface, but fails >> using the m2eclipse plugin... >> >> anyone has an idea? >> >> here are the outputs: >> >> command line: >> >> [ey...@eyale-f8-32 IncreasePriority]$ mvn install >> [INFO] Scanning for projects... >> [INFO] >> >> [INFO] Building IncreasePriority >> [INFO]task-segment: [install] >> [INFO] >> >> [INFO] [resources:resources {execution: default-resources}] >> [INFO] Using 'UTF-8' encoding to copy filtered resources. >> [INFO] Copying 2 resources >> [INFO] [compiler:compile {execution: default-compile}] >> [INFO] Nothing to compile - all classes are up to date >> [INFO] [resources:testResources {execution: default-testResources}] >> [INFO] Using 'UTF-8' encoding to copy filtered resources. >> [INFO] Copying 0 resource >> [INFO] [compiler:testCompile {execution: default-testCompile}] >> [INFO] Nothing to compile - all classes are up to date >> [INFO] [surefire:test {execution: default-test}] >> [INFO] Surefire report directory: >> >> /home/eyale/starteam/Work/websec/Main/Projects/IncreasePriority/target/surefire-reports >> >> --- >> T E S T S >> --- >> Running com.company.url.unknowns.IncreasePriorityTest >> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.06 sec >> >> Results : >> >> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 >> >> [INFO] [jar:jar {execution: default-jar}] >> [INFO] [dependency:copy-dependencies {execution: copy-dependencies}] >> [INFO] DbUtil-0.0.4.jar already exists in destination. >> [INFO] sqljdbc-2.0.jar already exists in destination. >> [INFO] activation-1.1.jar already exists in destination. >> [INFO] mail-1.4.1.jar already exists in destination. >> [INFO] junit-3.8.1.jar already exists in destination. >> [INFO] log4j-1.2.14.jar already exists in destination. >> [INFO] [install:install {execution: default-install}] >> [INFO] Installing >> /usr/local/ct-urlf-increase-priority/IncreasePriority.jar >> to >> >> /home/eyale/.m2/repository/com/company/url/unknowns/IncreasePriority/0.0.2/IncreasePriority-0.0.2.jar >> [INFO] [resources:copy-resources {execution: copy-conf}] >> [INFO] Using 'UTF-8' encoding to copy filtered resources. >> [INFO] Copying 1 resource >> [INFO] [resources:copy-resources {execution: copy-cron}] >> [INFO] Using 'UTF-8' encoding to copy filtered resources. >> [INFO] Copying 1 resource >> [INFO] >> >> *[INFO] BUILD SUCCESSFUL* >> [INFO] >> >> [INFO] Total time: 10 seconds >> [INFO] Finished at: Mon Dec 28 13:37:58 IST 2009 >> [INFO] Final Memory: 18M/74M >> [INFO] >> >> [ey...@eyale-f8-32 IncreasePriority]$ >> >> >> from eclipse: >> >> [INFO] Scanning for projects... >> [INFO] >> >> [INFO] Building IncreasePriority >> [INFO] >> [INFO] Id: com.company.url.unknowns:IncreasePriority:jar:0.0.2 >> [INFO] task-segmen
success building project from cli, failed from m2eclipse
- [INFO] For more information, run with the -e flag [INFO] *[INFO] BUILD FAILED* [INFO] [INFO] Total time: 12 seconds [INFO] Finished at: Mon Dec 28 13:37:30 IST 2009 [INFO] Final Memory: 10M/79M [INFO] the POM: http://maven.apache.org/POM/4.0.0"; xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 com.company.url.unknowns IncreasePriority jar 0.0.2 IncreasePriority com.company.maven.pom WebSecParent 0.0.1 org.apache.maven.plugins maven-dependency-plugin copy-dependencies package copy-dependencies /usr/lib/ctch/java false false true org.apache.maven.plugins maven-resources-plugin copy-conf install copy-resources /etc/ct-urlf-increase-priority/ src/main/resources true **/*.properties copy-cron install copy-resources /etc/cron.d/ src/main/resources true **/*.cron org.apache.maven.plugins maven-jar-plugin /usr/local/ct-urlf-increase-priority com.company.url.unknowns.IncreasePriority true /usr/lib/ctch/java javax.mail mail 1.4.1 com.company.sql DbUtil 0.0.4 -- Eyal Edri
Re: Maven initial deploy on production server
I've set up the jpackage repo on my server. i don't quite understand how this helps me install the production system. ok, i can now install various java pkg and maven pkg from the jpackage repo, but i will have the artifactory for that (after maven will be installed). does jpackage servers another purpose other than being an updated yum repository for java pkgs? thanks, On Wed, Dec 23, 2009 at 11:48 AM, Henri Gomez wrote: > You should find all of these RPMs on : > > http://www.jpackage.org/ > > > 2009/12/23 eyal edri : > > Hi, > > > > i'm looking for the best way to install maven on a production system. > > I've already set up the development environment including: > > > > - maven2 > > - artifactory > > - hudson > > > > > > now i want to be able to give our guys that manages the center servers a > > script/pkg so they could install without knowing maven at all, > > which after that we'll be able to install java maven projects on the > > servers. > > > > what i had in mind was maybe creating an rpm and deploy it to our yum > > repository, this rpm could include: > > > > 1. maven (the untarred 2.2.1 version). > > 2. bash script that will set up M2_HOME > > 3. a pre-defined settings.xml that will define the url for the maven > > repository. > > > > does that sound right? am i missing anything? > > > > thanks! > > > > > > > > -- > > Eyal Edri > > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Eyal Edri
Maven initial deploy on production server
Hi, i'm looking for the best way to install maven on a production system. I've already set up the development environment including: - maven2 - artifactory - hudson now i want to be able to give our guys that manages the center servers a script/pkg so they could install without knowing maven at all, which after that we'll be able to install java maven projects on the servers. what i had in mind was maybe creating an rpm and deploy it to our yum repository, this rpm could include: 1. maven (the untarred 2.2.1 version). 2. bash script that will set up M2_HOME 3. a pre-defined settings.xml that will define the url for the maven repository. does that sound right? am i missing anything? thanks! -- Eyal Edri
Re: RPM dependencies
i found that the rpm plugin only worked with maven 2.0.6 - 2.0.10. i found a solution for coping file using the resouces:copy-resoucres plugin or use the assembly pluging to create a dist pkg of .tar.gz. here's a 'build' for pom.xml i've created: org.apache.maven.plugins maven-dependency-plugin copy-dependencies package copy-dependencies /usr/lib/ctch/java false false true maven-resources-plugin 2.4.1 copy-conf install copy-resources /etc/ct-urlf-increase-priority/ src/main/resources true **/*.properties copy-cron install copy-resources /etc/cron.d/ src/main/resources true **/*.cron org.apache.maven.plugins maven-jar-plugin /usr/local/ct-urlf-increase-priority com.commtouch.url.unknowns.IncreasePriority true /usr/lib/ctch/java On Mon, Nov 23, 2009 at 3:47 PM, Gajo Csaba wrote: > I have been actually using the rpm plugin, found a few bugs in it etc... > The problem is, when you install C++ projects, you want some .h files to be > copied to /usr/include, some .so files to /usr/lib etc. so it cannot work as > easily as for Java projects. I'm guessing it's easy for Perl as well, since > you've got packages... > > > > eyal edri wrote: > >> you can try playing with the rpm plugin from mojo: >> http://mojo.codehaus.org/rpm-maven-plugin/ >> >> i'm actually in the same boat as you are. >> >> we've been programming in perl till now, using rpm & yum for deployment. >> >> but from what i learned so far about Maven, you might find that it can >> replace >> any functionality you got from rpm/yum, thus rendering the use of rpm >> packaging redundant. >> >> Eyal. >> >> >> 2009/11/23 Gajo Csaba >> >> >> >>> Hello, >>> >>> We would like to use RPMs similarly to JARs. This means that, when we >>> install a project, its rpm would go into the repository. When another >>> project is using this project, then the rpm should be fetched from the >>> repository and installed. Is there a good way to do this? >>> >>> The problem might also be that we need to install the rpms in su mode, >>> though this can be solved for now by running "sudo mvn" >>> >>> All ideas are welcome! >>> >>> Thanks, Csaba >>> >>> >>> >>> >>> >>> ----- >>> 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 > > -- Eyal Edri
Re: RPM dependencies
you can try playing with the rpm plugin from mojo: http://mojo.codehaus.org/rpm-maven-plugin/ i'm actually in the same boat as you are. we've been programming in perl till now, using rpm & yum for deployment. but from what i learned so far about Maven, you might find that it can replace any functionality you got from rpm/yum, thus rendering the use of rpm packaging redundant. Eyal. 2009/11/23 Gajo Csaba > Hello, > > We would like to use RPMs similarly to JARs. This means that, when we > install a project, its rpm would go into the repository. When another > project is using this project, then the rpm should be fetched from the > repository and installed. Is there a good way to do this? > > The problem might also be that we need to install the rpms in su mode, > though this can be solved for now by running "sudo mvn" > > All ideas are welcome! > > Thanks, Csaba > > > > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Eyal Edri
Re: how to copy jar (also) to target installation dir
Maven says that antrun copy corresponds to "maven-resource-plugin", (from http://maven.apache.org/plugins/maven-antrun-plugin/usage.html). Can i use the maven-resources-plugin instead? i'm already using it to copy conf & cron files: maven-resources-plugin 2.4.1 copy-conf install copy-resources /etc/ct-urlf-increase-priority/ src/main/resources true **/*.properties i just thought it's not intended to copy jars also resources... Eyal. On Sun, Nov 22, 2009 at 4:21 PM, Sony Antony wrote: > It should work with the antrun plugin ( and ant's task. ) > > ( configure an antrun plugin execution to attach to install phase ) > > --sony > > On Sun, Nov 22, 2009 at 8:43 AM, eyal edri wrote: > > > I want to config the pom project to copy the final jar file to an > > installation dir and bind it to the 'install' phase. > > > > meaning, when i "just" build the project, the jar will be built into the > > default target/project.jar. > > > > but when i "install" it should be also should be copied to > > /usr/local/application/project.jar. > > > > i tried adding " in the 'jar' plugin, but it just > changed > > the default target. > > > > -- > > Eyal Edri > > > -- Eyal Edri
how to copy jar (also) to target installation dir
I want to config the pom project to copy the final jar file to an installation dir and bind it to the 'install' phase. meaning, when i "just" build the project, the jar will be built into the default target/project.jar. but when i "install" it should be also should be copied to /usr/local/application/project.jar. i tried adding " in the 'jar' plugin, but it just changed the default target. -- Eyal Edri
maven post install plugin?
Is there a maven plugin/configuration that enables you to run post install actions? in rpm.spec file you can specify %post actions such as "mkdir -p /var/spool/app/logs" or running bash scripts. is there an equivalent plugin in maven? or one has to write a new plugin in order to accomplish this ? thanks! -- Eyal Edri
Re: maven assembly: how to create an execution JAR without packing the dependencies
Finally it worked ! :) (thanks Alexander!) Summarizing: in order to create an executable JAR file that will depend on other libraries/jars from other internal project or external without including them inside the JAR's project: 1. use maven jar plugin to define the mail class in the manifest: 2. use maven dependency plugin to copy the dependencies to your classpath. one last thing, how to i tell the pom to copy the executable jar to it's target dir (e.g. /usr/local/bin). i can do it with copy-resources, but i don't think it was meant for it.. here's the full pom.xml: http://maven.apache.org/POM/4.0.0"; xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 com.company.url.unknowns IncreasePriority jar 1.00. IncreasePriority http://maven.apache.org company http://www.company.com ${env.USER} ${user.name} ${env.us...@company.com company http://www.company.com developer +2 org.apache.maven.plugins maven-dependency-plugin copy-dependencies package copy-dependencies /usr/lib/company/java false false true maven-resources-plugin 2.4.1 copy-conf install copy-resources /etc/ct-urlf-increase-priority/ src/main/resources true **/*.properties copy-cron install copy-resources /etc/cron.d/ src/main/resources true **/*.cron org.apache.maven.plugins maven-jar-plugin com.company.url.unknowns.IncreasePriority true /usr/lib/company/java org.apache.maven.plugins maven-compiler-plugin 2.0.2 1.6 1.6 org.apache.maven.plugins maven-deploy-plugin 2.4 ${project.groupId}-${project.artifactId} junit junit 3.8.1 test javax.mail mail 1.4.1 com.company.file.IniFile IniFile 1.00. com.company.sql.DbUtil DbUtil 1.00.0001 UTF-8 company http://localhost:8081/nexus/content/repositories/company/ company company Maven Repository file://localhost/home/eyale/sonatype-work/nexus/storage/company/ On Tue, Nov 17, 2009 at 8:33 PM, Alexander wrote: > Question was how make executable jar without including all dependencies in > application jar but in separate folder. > > 2009/11/18 Brian Fox > > > > > > http://www.sonatype.com/people/2009/08/how-to-make-an-executable-jar-in-maven/ > > > > On Tue, Nov 17, 2009 at 1:12 PM, eyal edri wrote: > > > i will, once i get to work tomorrow :) > > > > > > thanks for the help. > > > > > > On Tue, Nov 17, 2009 at 8:05 PM, Alexander > > wrote: > > > > > >> Dont be shy, just try it. > > >> > > >> 2009/11/17 eyal edri > > >> > > >> > can i use the 'dependency:copy-dependencies< > > >> > > > >> > > > http://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html > > >> > >' > > >> > goal in this project to tell it to copy all it's > > >> > dependencies to the "lib" dir? > > >> > like shown in here: > > >> > > > >> > > > >> > > > >> > > > >> > > > >> >org.apache.maven.plugins > > >> >maven-dependency-plugin > > >> > > > >> > > > >> >copy-dependencies > > >> >package > > >>
Re: maven assembly: how to create an execution JAR without packing the dependencies
i will, once i get to work tomorrow :) thanks for the help. On Tue, Nov 17, 2009 at 8:05 PM, Alexander wrote: > Dont be shy, just try it. > > 2009/11/17 eyal edri > > > can i use the 'dependency:copy-dependencies< > > > http://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html > > >' > > goal in this project to tell it to copy all it's > > dependencies to the "lib" dir? > > like shown in here: > > > > > > > > > > > >org.apache.maven.plugins > >maven-dependency-plugin > > > > > >copy-dependencies > >package > > > > copy-dependencies > > > > > > /usr/local/app > > false > > false > > true > > > > > > > > > > > > > > > > > > > > btw: (when you said *lib*, > > > > does this means "projectHome/lib" is the classPath?) > > > > > > On Tue, Nov 17, 2009 at 4:51 PM, Alexander > wrote: > > > > > You could do this without assembly plugin. > > > > > > Just copy all dependencies with maven-dependency-plugin to some folder > > and > > > than add this folder as classpath prefix in maven-jar-plugin. > > > > > > example for second part > > > > > > > > >maven-jar-plugin > > > > > > > > > > > >you.main.class > > >true > > >lib > > > > > > > > > > > > > > > > > > 2009/11/17 eyal edri > > > > > > > Hi, > > > > > > > > i'm trying to figure out how can i create a working executable JAR > that > > > has > > > > dependencies > > > > (in-house maven projects plus external lib such as Log4J). > > > > > > > > I tried using the assembly plugin by creating a > > "jar-with-dependencies". > > > > > > > > but this creates a big JAR with all the dependencies included. > > > > > > > > I want to be able to install commons dependencies in a commons > > directory > > > > (/usr/lib/maven-projects/ for e.g.), > > > > and that every project that depends on them can use them. > > > > > > > > What should i do in the pom file of the infrastructure project and > the > > > > project that depends on it? > > > > > > > > i've read almost all the complete "maven-definite-guide", but didn't > > find > > > a > > > > concise answer... > > > > > > > > thanks, > > > > -- > > > > Eyal Edri > > > > > > > > > > > > > > > > -- > > > Regards, > > > Alexander > > > > > > > > > > > -- > > Eyal Edri > > > > > > -- > Regards, > Alexander > -- Eyal Edri
Re: maven assembly: how to create an execution JAR without packing the dependencies
can i use the 'dependency:copy-dependencies<http://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html>' goal in this project to tell it to copy all it's dependencies to the "lib" dir? like shown in here: org.apache.maven.plugins maven-dependency-plugin copy-dependencies package copy-dependencies /usr/local/app false false true btw: (when you said *lib*, does this means "projectHome/lib" is the classPath?) On Tue, Nov 17, 2009 at 4:51 PM, Alexander wrote: > You could do this without assembly plugin. > > Just copy all dependencies with maven-dependency-plugin to some folder and > than add this folder as classpath prefix in maven-jar-plugin. > > example for second part > > >maven-jar-plugin > > > >you.main.class >true >lib > > > > > > 2009/11/17 eyal edri > > > Hi, > > > > i'm trying to figure out how can i create a working executable JAR that > has > > dependencies > > (in-house maven projects plus external lib such as Log4J). > > > > I tried using the assembly plugin by creating a "jar-with-dependencies". > > > > but this creates a big JAR with all the dependencies included. > > > > I want to be able to install commons dependencies in a commons directory > > (/usr/lib/maven-projects/ for e.g.), > > and that every project that depends on them can use them. > > > > What should i do in the pom file of the infrastructure project and the > > project that depends on it? > > > > i've read almost all the complete "maven-definite-guide", but didn't find > a > > concise answer... > > > > thanks, > > -- > > Eyal Edri > > > > > > -- > Regards, > Alexander > -- Eyal Edri
maven assembly: how to create an execution JAR without packing the dependencies
Hi, i'm trying to figure out how can i create a working executable JAR that has dependencies (in-house maven projects plus external lib such as Log4J). I tried using the assembly plugin by creating a "jar-with-dependencies". but this creates a big JAR with all the dependencies included. I want to be able to install commons dependencies in a commons directory (/usr/lib/maven-projects/ for e.g.), and that every project that depends on them can use them. What should i do in the pom file of the infrastructure project and the project that depends on it? i've read almost all the complete "maven-definite-guide", but didn't find a concise answer... thanks, -- Eyal Edri
Re: error when running jar: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
OK, i'll try that thanks! but what is the alternative? can i "mvn install" (like yum install) a maven project (let's say sql utils) to the file system, and a new project that depends on that project will be able to use it (by looking in CLASSPATH?) i mean, i assume that if i have some infrastucture JARs (for e.g. log4j or fileUtils) i won't want them packed with every new project, the new project will need them to operate and install them if they are missing (just like yum install does with dependencies..) perhaps this is more of a JAVA question than MAVEN, but unfourtunatly i'm new to both :( been programming in Perl for the last few years.. so i'm dusting off the rust of my java knowladge ;) On Mon, Nov 16, 2009 at 5:55 PM, Wayne Fay wrote: > > I noticed I'm having this in other projects as well (my own projects). > > > > what am i missing? > > Maven does not, by default, build a jar package which you can simply > run with "java -jar" from the command line. You have to include all of > your dependencies (including transitive deps) with the -cp parameter. > > If you want to build "fat" jars, google "maven jar with dependencies". > > Wayne > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Eyal Edri
Re: error when running jar: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
I noticed I'm having this in other projects as well (my own projects). what am i missing? here's one project's pom which produces the same errors: http://maven.apache.org/POM/4.0.0"; xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 com.company.file IniFile jar 1.00. IniFile http://maven.apache.org junit junit 3.8.1 test UTF-8 ctch Company Maven Repository scp://172.20.20.42: /home/eyale/sonatype-work/nexus/storage/company/ org.apache.maven.plugins maven-compiler-plugin 2.0.2 1.6 1.6 On Mon, Nov 16, 2009 at 3:39 PM, eyal edri wrote: > Hi, > > i hope someone can help me out, > > i get this error when trying to run a jar: > > -- [ey...@eyale-f8-32 IncreasePriority]$ java -jar > target/IncreasePriority-1.00..jar > Exception in thread "main" java.lang.NoClassDefFoundError: > org/apache/log4j/Logger > at > com.company.url.unknowns.IncreasePriority.(IncreasePriority.java:16) > Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger > at java.net.URLClassLoader$1.run(URLClassLoader.java:200) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > at java.lang.ClassLoader.loadClass(ClassLoader.java:307) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) > at java.lang.ClassLoader.loadClass(ClassLoader.java:252) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) > ... 1 more > Could not find the main class: com.company.url.unknowns.IncreasePriority. > Program will exit. > > > - > i'm initializing log4j in the program like this: > > public class IncreasePriority > { > *static Logger logger = > Logger.getLogger(IncreasePriority.class.getName());* > > public static void main(String[] args) throws Exception > { > > // get conf file from args > if (args.length == 0) > { > Usage(); > } > > > mvn package finishes successfully and the program runs successfully in > eclipse. > > anyone has a clue what's going on? > > *here's the project pom:* > > http://maven.apache.org/POM/4.0.0"; xmlns:xsi=" > http://www.w3.org/2001/XMLSchema-instance"; > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/maven-v4_0_0.xsd";> > 4.0.0 > com.company.url.unknowns > IncreasePriority > jar > 1.00. > IncreasePriority > http://maven.apache.org > > Company > http://www.company.com > > > > > maven-resources-plugin > 2.4.1 > > > copy-conf > install > > copy-resources > > > > /etc/ct-urlf-increase-priority/ > > > src/main/resources/conf > > > > > > copy-cron > install > > copy-resources > > > /etc/cron.d/ > > > src/main/resources/cron > > > > > > copy-jar > install > > copy-resources > > > > /usr/local/ct-urlf-increase-priority/ > > > target/ > true > > **/*.jar > > > > > > > > > org.apache.maven.plugins > maven-jar-plugin > > > > > com.company.url.unknowns.IncreasePriority > > > > > > org.apache.maven.plugins > maven-compiler-plugin > 2.0.2 > > 1.5 > 1.5 > > >
error when running jar: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
Hi, i hope someone can help me out, i get this error when trying to run a jar: -- [ey...@eyale-f8-32 IncreasePriority]$ java -jar target/IncreasePriority-1.00..jar Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger at com.company.url.unknowns.IncreasePriority.(IncreasePriority.java:16) Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 1 more Could not find the main class: com.company.url.unknowns.IncreasePriority. Program will exit. - i'm initializing log4j in the program like this: public class IncreasePriority { *static Logger logger = Logger.getLogger(IncreasePriority.class.getName());* public static void main(String[] args) throws Exception { // get conf file from args if (args.length == 0) { Usage(); } mvn package finishes successfully and the program runs successfully in eclipse. anyone has a clue what's going on? *here's the project pom:* http://maven.apache.org/POM/4.0.0"; xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 com.company.url.unknowns IncreasePriority jar 1.00. IncreasePriority http://maven.apache.org Company http://www.company.com maven-resources-plugin 2.4.1 copy-conf install copy-resources /etc/ct-urlf-increase-priority/ src/main/resources/conf copy-cron install copy-resources /etc/cron.d/ src/main/resources/cron copy-jar install copy-resources /usr/local/ct-urlf-increase-priority/ target/ true **/*.jar org.apache.maven.plugins maven-jar-plugin com.company.url.unknowns.IncreasePriority org.apache.maven.plugins maven-compiler-plugin 2.0.2 1.5 1.5 junit junit 3.8.1 test javax.mail mail 1.4.1 com.company.sql DbUtil 1.00. com.company.file IniFile 1.00. log4j log4j 1.2.14 UTF-8 ctch http://172.20.20.42:8081/nexus/content/repositories/company/ ctch Company Maven Repository scp://172.20.20.42: /home/eyale/sonatype-work/nexus/storage/company/ Eyal Edri
Re: eclipse: can't create new maven project under workspace
I am using eclipse 3.4, but since i moved using m2eclipse plugin i don't see this problem anymore. so i guess it's not relevant, thanks! On Mon, Nov 16, 2009 at 12:29 AM, Barrie Treloar wrote: > On Tue, Nov 10, 2009 at 8:11 PM, eyal edri wrote: > > Anyone know why eclipse can't resolve the M2_REPO build path if the > project > > dir is created under the workspace? > > > > if i move the project dir to another dir, it works. > > What version of Eclipse? > > Are you certain you have configured the variable M2_REPO correctly? As > having projects under the workspace is how I have things set up and it > works for me. > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Eyal Edri
install java app on production server
Hi, i'm kind of new to maven and still trying to figure out the right way to do things. i've already set up a local repository accesibale via http/scp. and configured some resources such as conf/cron files. my question is, what is the best way to actually 'install' an application after it's deployed to the repository. i'm aiming at something similar to 'yum install' (i'm guessing we won't need yum/rpm anymore after moving to maven). i'll probably need to install maven on the production server, right? and create my own archetype? since 'mvn install' installs the pkg to the repository and not actually "installs" it to the fs. how do i tell the mvn to put the jar file in it's bin dir? it doesnt seem right to config it as a resource as well... *here's my pom.xml so far:* http://maven.apache.org/POM/4.0.0"; xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 com.test.url IncreasePriority jar 1.00. IncreasePriority http://maven.apache.org Test http://www.test.com maven-resources-plugin 2.4.1 * copy-conf install copy-resources /etc/ct-urlf-increase-priority/ src/main/resources/conf copy-cron install copy-resources /etc/cron.d/ src/main/resources/cron * junit junit 3.8.1 test log4j log4j 1.2.14 jar compile UTF-8 ctch http://localhost:8081/nexus/content/repositories/ctch/ the 'cron' file has the the line: * */1 * * * root java -jar /usr/local/ct-urlf-increase-priority/increase-priority.jar /etc/ct-urlf-increase-priority/increase-priority.properties -- Eyal Edri
Re: m2eclipse: when creating a new maven project - it adds J2SE 1.4 instead of JDK 1.6
This works, i'm trying to make the m2eclipse plugin do it by default when creating a new maven project. in eclipse the default JDK is 1.6. Also, when using the wizard, i don't edit the pom file to see the jdk ver, even after it is created, i can't see any node saying the jdk ver. On Thu, Nov 12, 2009 at 3:37 PM, maven apache wrote: > 2009/11/12 eyal edri > > > HI, > > > > i'm creating a new maven project in eclipse using m2eclipse. > > > > my default JDK in 1.6.016 in eclipse. > > for some reason the wizard adds the J2SE 1.4 as the JRE SYSTEM LIBRARY > > instead of 1.6 JDK. > > > > In the build path try to remove the Jre Libragy and add the jdk1.6 > again. > > > anyone has an idea how to fix it? > > > > > > > > -- > > Eyal Edri > > > -- Eyal Edri
m2eclipse: when creating a new maven project - it adds J2SE 1.4 instead of JDK 1.6
HI, i'm creating a new maven project in eclipse using m2eclipse. my default JDK in 1.6.016 in eclipse. for some reason the wizard adds the J2SE 1.4 as the JRE SYSTEM LIBRARY instead of 1.6 JDK. anyone has an idea how to fix it? -- Eyal Edri
Re: adding jdbc for ms-sql as dependency from maven
thanks, that did the trick. still i'm getting a WARN messages when building a project with the JDBC dependency: [WARNING] Missing artifact metadata for com.microsoft.sqlserver.jdbc:sqljdbc:jar:2.0 is there any way i can create a metadata for this local jar? Eyal. On Mon, Nov 9, 2009 at 3:19 PM, Stephen Connolly < stephen.alan.conno...@gmail.com> wrote: > mvn install:install-file > or > mvn deploy:deploy-file (if you have a repository manager, and you should) > > are the correct ways to do this > > systemPath is deprecated > > 2009/11/9 eyal edri : > > Hi, > > > > anyone knows if the jdbc driver is available via maven repository? and > > what's its groupid? > > > > I downloaded the sqljdbc4.jar from Microsoft and set a 'system' > dependency, > > is that the only way to do it? > > > > > > com.microsoft.sqlserver.jdbc > > sqljdbc > > 2.0 > > system > > /usr/java/sqljdbc_2.0/enu/sqljdbc4.jar > > > > > > > > -- > > Eyal Edri > > > > ----- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Eyal Edri
eclipse: can't create new maven project under workspace
Anyone know why eclipse can't resolve the M2_REPO build path if the project dir is created under the workspace? if i move the project dir to another dir, it works. -- Eyal Edri
adding jdbc for ms-sql as dependency from maven
Hi, anyone knows if the jdbc driver is available via maven repository? and what's its groupid? I downloaded the sqljdbc4.jar from Microsoft and set a 'system' dependency, is that the only way to do it? com.microsoft.sqlserver.jdbc sqljdbc 2.0 system /usr/java/sqljdbc_2.0/enu/sqljdbc4.jar -- Eyal Edri
Re: deploy rpm to rpm repository using maven + mojo rpm plugin
Thanks for the detailed answer! i'll look into it and let you know the progress. Cheers, Eyal. On Mon, Nov 9, 2009 at 10:59 AM, Stephen Connolly < stephen.alan.conno...@gmail.com> wrote: > It is not that difficult to write your own maven plugin to achieve this. > > You'll probably want to depend on JSch. > > File transfer via SCP/SFTP is easy with JSch, and then you can execute > the "make" command to re-index the repository... although you probably > would prefer to skip the "make" and instead invoke "createrepo" > directly... > > -Stephen > > P.S. > You'll probably need something like the following dependencies: > > org.apache.maven > maven-project > 2.0.6 > > > > org.apache.maven > maven-plugin-api > 2.0.6 > > > > org.codehaus.plexus > plexus-utils > 1.5.1 > > > > com.jcraft > jsch > 0.1.42 > > > As well as these two functions (or equivalent): > >/* > * Licensed to the Apache Software Foundation (ASF) under one > * or more contributor license agreements. See the NOTICE file > * distributed with this work for additional information > * regarding copyright ownership. The ASF licenses this file > * to you under the Apache License, Version 2.0 (the > * "License"); you may not use this file except in compliance > * with the License. You may obtain a copy of the License at > * > * http://www.apache.org/licenses/LICENSE-2.0 > * > * Unless required by applicable law or agreed to in writing, > * software distributed under the License is distributed on an > * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY > * KIND, either express or implied. See the License for the > * specific language governing permissions and limitations > * under the License. > */ >import com.jcraft.jsch.ChannelExec; >import com.jcraft.jsch.ChannelSftp; >import com.jcraft.jsch.JSchException; >import com.jcraft.jsch.Session; >import com.jcraft.jsch.SftpException; >import org.apache.maven.plugin.logging.Log; >import org.codehaus.plexus.util.IOUtil; >import org.codehaus.plexus.util.StringUtils; > >public static void put( Session session, File source, String > destination, int mode, final Log log ) >throws JSchException, SftpException >{ >ChannelSftp channel = null; >try >{ >channel = (ChannelSftp) session.openChannel( "sftp" ); >channel.connect(); >log.info( "Uploading " + source + " to sftp://"; + > session.getUserName() + "@" + session.getHost() + ":" >+ session.getPort() + destination ); >channel.put( source.getAbsolutePath(), destination, mode ); >channel.quit(); >} >finally >{ >if ( channel != null ) >{ >channel.disconnect(); >} >} >} > >public static void createrepo( Session session, String workingDir ) >throws JSchException, IOException, InterruptedException >{ >GobblingInputStream stdout = null; >GobblingInputStream stderr = null; >ChannelExec channel = null; >try >{ >channel = (ChannelExec) session.openChannel( "exec" ); >channel.setCommand( "ch " + workingDir + " && createrepo" ); >stdout = new GobblingInputStream( channel.getInputStream() ); >stderr = new GobblingInputStream( channel.getErrStream() ); >channel.setInputStream( null ); >channel.connect(); >stdout.awaitClosed(); >stderr.awaitClosed(); >while ( !channel.isClosed() ) >{ >Thread.sleep( 50 ); >} >if ( channel.getExitStatus() != 0 ) >{ >throw new IOException( >"Could not update yum repository > metadata\nSTDOUT:\n" + IOUtil.toString( stdout ) + "\nSTDERR:\n" >+ IOUtil.toString( stderr ) + "\nEXIT-CODE:" + > channel.getExitStatus() ); >} >} >finally >{ >if ( channel != null ) >{ >channel.disconnect(); >} >IOUtil.close( stdout ); >IOUtil.close( stderr ); >} >} > > When you're done, gi
deploy rpm to rpm repository using maven + mojo rpm plugin
Hi guys, i'm just starting to play around with maven as a candidate for our whole build/deploy system for java applications. we're been programming so far using Perl, packaging with Rpm on Fedora and Deploying it though a local yum repository. We still haven't decided if we could ditch the yum/rpm idea all together and swith to mvn repository, but in case we won't, Do you know* i**f there is a way to config mvn to upload the rpm (using SCP?) to the yum repository* after it finished building the RPM (today we use a build system based on make files and in the end it scp's the rpm to the repository and run make there to update the list of rpms). thank you. -- Eyal Edri