0

I checked out current SVN Snapshot of DWR (3.0.0-rc3-SNAPSHOT) and I am unable to mvn install it - the pom.xml seem to be configured not for such command. What is the correct way of installing DWR into maven repo?

I also tried copying files from https://oss.sonatype.org/content/repositories/snapshots/org/directwebremoting/dwr/3.0.0-rc3-SNAPSHOT/ and mvn installing them as well. This way obviously does not work either. How can it be installed from here? I don't want to link to the snapshot directory directory from my pom.xml as I don't want to get unexpected results when new snapshot is introduced.

Vojtěch
  • 11,312
  • 31
  • 103
  • 173
  • 1
    Sorry, are you saying that you don't want to add it as dependency in your pom.xml and prefer to download the JAR and install it manually yourself? – user2507946 Jul 21 '13 at 14:16
  • I want to add it as dependency, but I don't want to have it linked to the sonatype repository where it might change every day. I would like to have it installed locally. But I can't manage to install it nether from the source neighter from the jar. – Vojtěch Jul 21 '13 at 14:28
  • 1
    You can try what I've tried below. I've tested it and it seems to be working fine ;). – user2507946 Jul 21 '13 at 14:30

1 Answers1

2

I'm not sure if I get you correctly, but you can always download the JAR and install it locally using Maven. Something like this:

mvn install:install-file -Dfile=dwr-3.0.0-rc3-20130514.180049-1.jar -DgroupId=org.directwebremoting -DartifactId=dwr -Dversion=3.0.0-rc3-SNAPSHOT -Dpackaging=jar

more on the Maven info here:
http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html

EDIT:
I managed to install it from source as well by do SVN checkout:

svn co https://svn.directwebremoting.org/dwr/trunk/

My first attempt to build it failed because I was using Maven 2.x. Seems like DWR is using Maven enforcer plugin to enforce certain Maven version. I didn't check which version is really required but by updating my Maven to Maven3 I managed to install it.

user2507946
  • 584
  • 2
  • 9
  • Okay, this manages to install the jar - which answers my second part of the question - thanks! And what about installing it from the source? – Vojtěch Jul 21 '13 at 14:31
  • Edited my answer to include my testing to install it from source which seems to be successfull using Maven3. Let me know if this works or not for you. If it is, please close this question. – user2507946 Jul 22 '13 at 04:43
  • I am able to checkout the project as well as do "mvn install". But the "mvn install" does not build the sources as the project does not follow the typical maven structure - here https://gist.github.com/knyttl/155b8077d7429d490d07 - you can see no building takes place. I know how to close questions and I will do as soon as I have the answers. – Vojtěch Jul 22 '13 at 05:14
  • 1
    My bad, you're right that it doesn't follow Maven structure. From the pom.xml content, it seems that they are not using Maven for building (they comment it there) and the packaging is POM hence I dont see you can build DWR using Maven without any change in structure or any additional steps. – user2507946 Jul 22 '13 at 06:33
  • Okay that is what I wanted to know :-) – Vojtěch Jul 22 '13 at 06:57