Search Results

Search found 1621 results on 65 pages for 'maven scm'.

Page 5/65 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Creating a scm browser for an RCP application.

    - by mdamman
    I have an RCP app that saves its project as an xml file and currently the user just selections a directory to save that file and then uses the open file dialog to open the project. We are thinking about enhancing it to allow users to check in/out from a source code manager. This will make it easier for users to share their projects with each others with all the benefits of a scm. I need something similar to Subclipses, but i was thinking of using the maven svn plugin so that it is more flexible which on which scm is used. It would probably better to keep it simple because most users won't have a clue what a scm is. An ideal would be just having a Checkout menu option which opens a dialog similar to the Open File dialog. I was wondering if anyone had an example of how to use the maven scm. What calls to make to set the scm location and to get the file? Or if there is a better way of going about this. Thanks!

    Read the article

  • Running Cargo From Maven antrun Plugin

    - by Frank
    I have a maven (multi-module) project creating some WAR and EAR files for JBoss AS 7.1.x. For one purpose, I need to deploy one generated EAR file of one module to a fresh JBoss instance and run it, call some REST web service calls against it and stop JBoss. Then I need to package the results of these calls that were written to the database. Currently, I am trying to use CARGO and the maven ant run plugin to perform this task. Unfortunately, I cannot get the three (maven, ant run and CARGO) to play together. I don't have the uberjar that is used in the ant examples of cargo. How can I configure the ant run task so that the cargo ant task can create, start, deploy my JBoss? Ideally the one unpacked and configured by the cargo-maven2-plugin in another phase? Or, is there a better way to achieve my goal of creating the database? I cannot really use the integration-test phase, as it is executed after the package phase. So, I plan to do it all in compile phase using antrun.

    Read the article

  • Maven Assembly: include a dependency with a different classifier

    - by James Kingsbery
    I would like to build two different versions of a WAR in Maven (I know that's a no-no, that's just the way it is given the current situation). In the version of a WAR depicted by an assembly, I want to replace a dependency by the same dependency with a different classifier. For example, I was expecting this assembly to work: <assembly> <id>end-user</id> <formats> <format>war</format> </formats> <dependencySets> <dependencySet> <excludes> <exclude>group:artifact:jar:${project.version}</exclude> </excludes> <includes> <include>group:artifact:jar:${project.version}:end-user</include> </includes> </dependencySet> </dependencySets> </assembly> This doesn't work, but am I heading in the right direction? I've already read all the pages on the Maven assembly page and the section on the Maven Definitive Guide that seems relevant. Any pointers would be helpful.

    Read the article

  • Preserving timestamps on Clojure .clj files when building shaded jar via Maven Shade Plugin

    - by Dereference
    When using the maven-shade-plugin to package our jar artifact that contained a few Clojure libs and some Java. We were using AOT compilation for our Clojure code. When we loaded the jar, it was having very slow load times. AOT compilation is supposed to help this quite a bit, but that wasn't what we were seeing. We noticed in java jar -verbose output that there was a lot of JVM__DEFINE_CLASS calls happening when Clojure classes were being loaded. This didn't make sense, since more of our Clojure code was AOT compiled to .class files. Turns out the maven-shade-plugin creates all new files, with new timestamps in the final artifact Clojure uses the timestamp information on a .clj file vs. a .class file, to determine if the file needs to be recompiled. The maven-shade-plugin was causing the .clj file and it's associated .class file to have the same timestamp, so Clojure always chose to dynamically recompile the source. The only workaround that we have been able to figure out, at this point, is to write a script that would re-open the shaded jar and bump the .clj file timestamps back to some time in the past, so that they wouldn't be equal to the timestamps of their associated .class files. Does anyone know of a better approach?

    Read the article

  • How do I execute a program using Maven?

    - by Will
    I would like to have a Maven goal trigger the execution of a java class. I'm trying to migrate over a Makefile with the lines: neotest: mvn exec:java -Dexec.mainClass="org.dhappy.test.NeoTraverse" And I would like mvn neotest to produce what make neotest does currently. Neither the exec plugin documentation nor the Maven Ant tasks pages had any sort of straightforward example. Currently, I'm at: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1</version> <executions><execution> <goals><goal>java</goal></goals> </execution></executions> <configuration> <mainClass>org.dhappy.test.NeoTraverse</mainClass> </configuration> </plugin> I don't know how to trigger the plugin from the command line, though.

    Read the article

  • Add additional path to exec-maven-plugin

    - by KornP
    I would like to add an additional class path to the exec-maven-plugin. Besides the %classpath, I would like to add an extra path to a directory containing resources (/Users/kornp/resources). Currently, my pom looks like this: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1.1</version> <configuration> <executable>java</executable> <classpathScope>runtime</classpathScope> <arguments> <argument>%classpath:/Users/kornp/resources</argument> <argument>org.drrabbit.maventest.App</argument> </arguments> </configuration> </plugin> How should I configure this?

    Read the article

  • Maven problem with invalid jar file which is actually html

    - by fei
    i'm running into a problem in my maven build recently, that it downloads a jar file for the javamail-1.4.jar or something, but it turns out the file is not a real jar file, it's actually a html with a link to where to get the correct jar. it seems to be the repo has changed for that. but in my maven setting everything is supposely to go to our internal repo, i don't know how did that happen. but anyways, more importantly, how do i fix this problem so that it will download the correct jar file on a fresh install? thanks!

    Read the article

  • Conditional configuration in maven pom.xml

    - by David Zhao
    I'd like to ONLY exclude certain files in maven-war-plugin when property "skipCompress" set to true, I thought I could do something like this, but it doesn't work for me. BTW, I can't use profile to achieve this even I want to use skipCompress to turn on and off the compression in both development and deployment profiles. <plugin> <artifactId>maven-war-plugin</artifactId> <configuration> <if> <not> <equals arg1="${skipCompress}" arg2 = "true"/> </not> <then> <warSourceExcludes>**/external/dojo/**/*.js</warSourceExcludes> </then> </if> </configuration> </plugin> Thanks, David

    Read the article

  • Incremental build with NetBeans and Maven for jetty hot deployment

    - by deamon
    After my unsuccessful attempt to run Tomcat with hot deployment from NetBeans with Maven, I've tried jetty. The jetty-maven-plugin doc gave me an important hint: The plugin will automatically ensure the classes are rebuilt and up-to-date before deployment. If you change the source of a class and your IDE automatically compiles it in the background, the plug-in will pick up the changed class. If I look at $myproject/target/classes/... in the projects directory, I can see that NetBeans doesn't compile and refresh the class file on saving. I need to build the project explicitly to update the file and than jetty picks up the change. (The plug-in param "scanIntervalSeconds" is set to 1.) How can I tell NetBeans to compile on save and update the class file so that jetty can pick up the change?

    Read the article

  • Tomcat 7 maven plugin additional context on tomcat7:run

    - by pater
    When I run my web app inside eclipse using tomcat 7 maven plugin, I want an additional context to be deployed to tomcat. On the production enviroment this context is mapped to a directory outside tomcat dir using a context configuration <Context path="/userimages" docBase="C:/test/userimages"> </Context> And by this way is available in http://wwww.myhost.com/userimages/test.jpg How I achive the same on the development enviroment of the webapp (eclipse, tomcat7 maven plugin)? In other words I want the contents of that folder to be accessible through http://localhost:8080/userimages or http://localhost:8080/myapp/userimages

    Read the article

  • Set plugin’s version on the command line in maven 2

    - by larry cai
    I generate default quickstart maven example, and type mvn checkstyle:checkstyle, it always try to use the lastest SNAPSHOT version, probably it is wrong in my nexus server, but How can I set plugin's version on the command line in maven2, like 2.5 for checkstyle instead of 2.6-SNAPSHOT C:\HelloWorld>mvn checkstyle:checkstyle [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'checkstyle'. [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error building POM (may not be this project's POM). Project ID: org.apache.maven.plugins:maven-checkstyle-plugin Reason: Error getting POM for 'org.apache.maven.plugins:maven-checkstyle-plugin' from the repository: Failed to resolve artifact, possibly due to a repository list that is not appropriately equipped for this artifact's metadata. org.apache.maven.plugins:maven-checkstyle-plugin:pom:2.6-SNAPSHOT from the specified remote repositories: nexus (http://localhost:9081/nexus/content/groups/public) for project org.apache.maven.plugins:maven-checkstyle-plugin I guess it could be "mvn checkstyle:2.5:checkstyle", unfortunately it is not. Surely if I set build dependance in pom.xml, it will work, but I want to see how command line can works

    Read the article

  • mvn deploy to AWS (ssh via distributionManagement)

    - by Dexter
    I am working on deploying the WAR file to AWS using Maven. I am planning to use 'mvn deploy' for the same which would ssh the war file to AWS. I am following http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploy-ssh-external.html. This is my POM file <project> ... <distributionManagement> <repository> <id>ssh-aws</id> <url>scpexe://<ec2 instance>.compute-1.amazonaws.com</url> </repository> </distributionManagement> <build> <extensions> <!-- Enabling the use of FTP --> <extension> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-ssh-external</artifactId> <version>1.0-beta-6</version> </extension> </extensions> </build> .. </project> This is my settings.xml <server> <id>ssh-aws</id> <username>aws-user</username> </server> The only issue is that I am unable to figure out the url in distributionManagement node of pom.xml. I am able to ssh in the AWS server by the following. ssh -i ~/pemfile/pemfile-key.pem aws-user@<ec2 instance>.compute-1.amazonaws.com But when I run mvn clean deploy, I receive this.. Exit code: 1 - Permission denied (publickey). -> [Help 1] Thanks in advance.

    Read the article

  • How to rename goals in Maven?

    - by mjs
    In the Maven document Introduction to the Build Lifecycle, a goal of display:time is described that outputs the current time. The plugin is as follows: ... <plugin> <groupId>com.mycompany.example</groupId> <artifactId>maven-touch-plugin</artifactId> <version>1.0</version> <executions> <execution> <phase>process-test-resources</phase> <goals> <goal>timestamp</goal> </goals> </execution> </executions> </plugin> ... I have several questions relating to this plugin: How can I change the name of the goal to, for example, foo:bar? (Why does neither display nor time appear anywhere in the XML fragment? How can you tell, from looking at the fragment, what goals it defines?) How can I manually run this goal? (For similar constructs, the equivalent of mvn display:time sometimes works, but this doesn't work consistently.) How can I see if this goal exists? (i.e. list available goals; this question suggests this is impossible.)

    Read the article

  • Multi-module maven build : different result from parent and from module

    - by Albaku
    I am migrating an application from ant build to maven 3 build. This app is composed by : A parent project specifying all the modules to build A project generating classes with jaxb and building a jar with them A project building an ejb project 3 projects building war modules 1 project building an ear Here is an extract from my parent pom : <groupId>com.test</groupId> <artifactId>P</artifactId> <packaging>pom</packaging> <version>04.01.00</version> <modules> <module>../PValidationJaxb</module> <-- jar <module>../PValidation</module> <-- ejb <module>../PImport</module> <-- war <module>../PTerminal</module> <-- war <module>../PWebService</module> <-- war <module>../PEAR</module> <-- ear </modules> I have several problems which I think have the same origin, probably a dependency management issue that I cannot figure out : The generated modules are different depending on if I build from the parent pom or a single module. Typically if I build PImport only, the generated war is similar to what I had with my ant build and if I build from the parent pom, my war took 20MB, a lot of dependencies from other modules had been added. Both wars are running well. My project PWebService has unit tests to be executed during the build. It is using mock-ejb which has cglib as dependency. Having a problem of ClassNotFound with this one, I had to exclude it and add a dependency to cglib-nodep (see last pom extract). If I then build only this module, it is working well. But if I build from the parent project, it fails because other dependencies in other modules also had an implicit dependency on cglib. I had to exclude it in every modules pom and add the dependency to cglib-nodep everywhere to make it run. Do I miss something important in my configuration ? The PValidation pom extract : It is creating a jar containing an ejb with interfaces generated by xdoclet, as well as a client jar. <parent> <groupId>com.test</groupId> <artifactId>P</artifactId> <version>04.01.00</version> </parent> <artifactId>P-validation</artifactId> <packaging>ejb</packaging> <dependencies> <dependency> <groupId>com.test</groupId> <artifactId>P-jaxb</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate</artifactId> <version>3.2.5.ga</version> <exclusions> <exclusion> <groupId>cglib</groupId> <artifactId>cglib</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>cglib</groupId> <artifactId>cglib-nodep</artifactId> <version>2.2.2</version> </dependency> ... [other libs] ... </dependencies> <build> ... <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ejb-plugin</artifactId> <configuration> <ejbVersion>2.0</ejbVersion> <generateClient>true</generateClient> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>xdoclet-maven-plugin</artifactId> ... The PImport pom extract : It depends on both Jaxb generated jar and the ejb client jar. <parent> <groupId>com.test</groupId> <artifactId>P</artifactId> <version>04.01.00</version> </parent> <artifactId>P-import</artifactId> <packaging>war</packaging> <dependencies> <dependency> <groupId>com.test</groupId> <artifactId>P-jaxb</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>com.test</groupId> <artifactId>P-validation</artifactId> <version>${project.version}</version> <type>ejb-client</type> </dependency> ... [other libs] ... </dependencies> The PWebService pom extract : <parent> <groupId>com.test</groupId> <artifactId>P</artifactId> <version>04.01.00</version> </parent> <artifactId>P-webservice</artifactId> <packaging>war</packaging> <properties> <jersey.version>1.14</jersey.version> </properties> <dependencies> <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-servlet</artifactId> <version>${jersey.version}</version> </dependency> <dependency> <groupId>com.rte.etso</groupId> <artifactId>etso-validation</artifactId> <version>${project.version}</version> <type>ejb-client</type> </dependency> ... [other libs] ... <dependency> <groupId>org.mockejb</groupId> <artifactId>mockejb</artifactId> <version>0.6-beta2</version> <scope>test</scope> <exclusions> <exclusion> <groupId>cglib</groupId> <artifactId>cglib-full</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>cglib</groupId> <artifactId>cglib-nodep</artifactId> <version>2.2.2</version> <scope>test</scope> </dependency> </dependencies> Many thanks

    Read the article

  • I just need one dependent module , but don't need its dependencies (Maven)

    - by smallufo
    In my project , there is a spring XML config that utilizes ehcache to cache method returns. xml snippet : http://www.springmodules.org/schema/ehcache http://www.springmodules.org/schema/cache/springmodules-ehcache.xsd <ehcache:config configLocation="classpath:ehcache.xml"/> <ehcache:proxy id="explainRetriever" refId="explainRetrieverImpl"> <ehcache:caching methodName="get*" cacheName="explainCache"/> </ehcache:proxy> but in runtime , server complains it cannot find definitions of http://www.springmodules.org/schema/ehcache , I know I have to add "spring-modules-cache.jar" to WEB-INF/lib directory. But my project is maintained by maven , if I add "spring-modules-cache" to the runtime dependency , it will bring a lot of dependencies to my WAR file , filling my WAR with a lot of unnecessary jars. I just need one declaration in it , not all of its dependencies ... Is there any way to tell maven not to include its dependencies to the project ? Or ... another way , when packaging WAR , just copy another prepared spring-modules-cache.jar to WEB-INF/lib , how to do this ? Thanks !

    Read the article

  • How to inherit the current path when invoking Maven's exec-maven-plugin?

    - by wishihadabettername
    I have an <exec-maven-plugin> which calls an external command (in this case, svnversion). The command is in the path for the current user. However, when a separate shell is spawned by the plugin, the path is not initialized. I don't want to hardcode or define a variable for each external command (there would be too much to maintain, especially that there are both Windows and *nix users). My pom.xml contains the following: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1</version> <executions> <execution> <id>svnversion-exec</id> <phase>process-resources</phase> <goals> <goal>exec</goal> </goals> <configuration> <executable>svnversion</executable> <arguments> <argument><![CDATA[ >version.txt ]]></argument> </arguments> </configuration> </execution> </executions> </plugin> Currently I get the following output: [INFO] [exec:exec {execution: svnversion-exec}] 'svnversion' is not recognized as an internal or external command, operable program or batch file. [ERROR] BUILD ERROR: Result of cmd.exe /X /C "svnversion >version.txt" execution is: '1'. Thank you!

    Read the article

  • Maven exec bash script and save output as property

    - by djechlin
    I'm wondering if there exists a Maven plugin that runs a bash script and saves the results of it into a property. My actual use case is to get the git source version. I found one plugin available online but it didn't look well tested, and it occurred to me that a plugin as simple as the one in the title of this post is all I need. Plugin would look something like: <plugin>maven-run-script-plugin> <phase>process-resources</phase> <!-- not sure where most intelligent --> <configuration> <script>"git rev-parse HEAD"</script> <!-- must run from build directory --> <targetProperty>"properties.gitVersion"</targetProperty> </configuration> </plugin> Of course necessary to make sure this happens before the property will be needed, and in my case I want to use this property to process a source file.

    Read the article

  • git, maven and jenkins - versioning, dev and release builds workflow

    - by varesa
    What is the preferred way to do the following with git, maven and jenkins: I am developping an application, which I would like to maintain "dev" and "release" branches. I would like jenkins to build both. It could be so that the release-artifacts would have versions like 1.5.2 and the dev-builds would just be 0.0.1-SNAPSHOTs. I would like to not have to have 2 different pom.xml files. I looked into profiles, but they don't seem to be able to change artifact versions. One way I looked at could be adding a 'qualifier' to the test-builds. Of course I could just rename the file, because the real artifact-information on this is not important, because the app is a standalone one. What would be the preferred way to doing this? Or how would you do this?

    Read the article

  • maven plugin configuration

    - by Don
    Hi, When writing a Maven plugin, you can configure various parameters within the mojo class, e.g. /** * The path to the properties files. * * @parameter expression="${project.build.directory}" */ private File buildDir; Is there a reference that lists all the available project properties (e.g. ${project.build.directory})? For example, how do I get the value of the resources directory? Thanks, Don

    Read the article

  • Maven profile properties are not "overriding"

    - by Nazar
    I have Maven multi-module project with such structure: parent-pom-project -- module1 -- module2 At the parent-pom-project I have such pom.xml <modules> <module>module1</module> </modules> ... <profiles> <profile> <id>local</id> <properties> <prop>local_prop</prop> </properties> </profile> <profile> <id>test</id> <modules> <module>module2</module> </modules> <properties> <prop>test_prop</prop> </properties> </profile> </profiles> At all pom.xml files I have such tag: <build> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> <resource> <directory>src/test/resources</directory> <filtering>true</filtering> </resource> </resources> </build> At module1 and module2 in resource directory I have properties files with such text: prop=${prop} The problem is that after mvn clean install or mvn clean install -Ptest or even mvn clean install -P test I get prop=local_prop If I user test profile for build module2 is also builded, but properties are used from local profile. I use Maven 3.0.3. Anybody have any ideas?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >