Publishing Artifact to the Maven Repository

View: New views
4 Messages — Rating Filter:   Alert me  

Publishing Artifact to the Maven Repository

by Tim O'Brien :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Anyone opposed to me crafting an upload request to the Maven 2  
repository for maxq.  I'm currently using it in a few projects, and  
this would make it easier to use.

Tim O'Brien
tobrien@...

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Publishing Artifact to the Maven Repository

by Oliver Bock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Anyone opposed to me crafting an upload request to the Maven 2  
> repository for maxq.  I'm currently using it in a few projects, and  
> this would make it easier to use.

Sounds good.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Patch to MainTest and Config + Maven 2 POM

by Tim O'Brien :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I was trying to create a Maven 2 POM so that I could use create a  
repository bundle that would make MaxQ available in the Central Maven  
Repository.   In the process of doing this, I found that I had to make  
some adjustments to the JUnit tests.   I've attached a patch.txt that  
contains these changes, and I've attached a pom.xml.

If you apply the patch and you put pom.xml in the root directory.  You  
should be able to run, test, and install MaxQ with "mvn install".    
I'm running Maven 2.0.8, but this should work with any recent Maven  
build.   I did not try to recreate the release packaging tasks, but if  
there is any interest, it would be easy enough to write full POM that  
recreates the Ant build.

Could someone take a look at this patch, and let me know if it either  
makes sense or breaks the tests.   I wasn't sure if the MainTest unit  
tests were still being used because the RELEASE instructions only  
counsel running "ant runtest".

If you have any quetions, let me know.


<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="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">
 
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.bitmechanic.maxq</groupId>
  <artifactId>maxq</artifactId>
  <packaging>jar</packaging>
  <name>MaxQ</name>
  <version>0.98</version>
  <licenses>
    <license>
      <name>BSD License</name>
      <url>http://opensource.org/licenses/bsd-license.php</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <organization>
    <name>Tigris</name>
    <url>http://www.tigris.org</url>
  </organization>
  <build>
    <resources>
      <resource>
        <directory>java</directory>
      </resource>
    </resources>
    <sourceDirectory>java</sourceDirectory>
    <testSourceDirectory>test</testSourceDirectory>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.apache.velocity</groupId>
      <artifactId>velocity</artifactId>
      <version>1.5</version>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.1.1</version>
    </dependency>
    <dependency>
      <groupId>com.bitmechanic.maxq</groupId>
      <artifactId>customized-httpunit</artifactId>
      <version>1.6.1-maxq1</version>
      <scope>system</scope>
      <systemPath>${basedir}/lib/httpunit-1.6.1-maxq1.jar</systemPath>
    </dependency>
    <dependency>
      <groupId>org.python</groupId>
      <artifactId>jython</artifactId>
      <version>2.2.1</version>
    </dependency>
    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
      <version>1.1</version>
    </dependency>
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>3.2</version>
    </dependency>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <version>2.3</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.2</version>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.15</version>
      <exclusions>
        <exclusion>
          <groupId>com.sun.jmx</groupId>
          <artifactId>jmxri</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.sun.jdmk</groupId>
          <artifactId>jmxtools</artifactId>
        </exclusion>
        <exclusion>
          <groupId>javax.jms</groupId>
          <artifactId>jms</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>rhino</groupId>
      <artifactId>js</artifactId>
      <version>1.6R7</version>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>jtidy</artifactId>
      <version>r8-21122004</version>
    </dependency>
    <dependency>
      <groupId>commons-httpclient</groupId>
      <artifactId>commons-httpclient</artifactId>
      <version>2.0.2</version>
    </dependency>  
  </dependencies>
</project>





Index: java/com/bitmechanic/maxq/Config.java
===================================================================
RCS file: /cvs/maxq/java/com/bitmechanic/maxq/Config.java,v
retrieving revision 1.22
diff -u -r1.22 Config.java
--- java/com/bitmechanic/maxq/Config.java 18 May 2007 09:39:34 -0000 1.22
+++ java/com/bitmechanic/maxq/Config.java 11 Jan 2008 16:33:25 -0000
@@ -3,7 +3,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.python.util.PythonInterpreter;
-
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.*;
@@ -103,8 +102,6 @@
   public static void initConfig()
   {
     config = new Config();
-    String maxqDir = System.getProperty("maxq.dir");
-    String pathSep = System.getProperty("file.separator");
 
     // Load maxq.properties from the CLASSPATH
     String propertiesFileName = System.getProperty("properties.file", "maxq.properties");
@@ -126,7 +123,7 @@
     }
 
     // Add a default location to the pythonPath member variable
-    config.addPythonPath(maxqDir + pathSep + "jython");
+    config.addPythonPath( getDefaultLocation() );
     // if the user has defined additional locations, add them to the same meber variable
     String path = config.getProperty("python.path");
     if (path != null)
@@ -138,6 +135,12 @@
       config.port = Integer.parseInt(portStr);
   }
 
+  public static String getDefaultLocation() {
+    String maxqDir = System.getProperty("maxq.dir");
+    String pathSep = System.getProperty("file.separator");
+    return maxqDir + pathSep + "jython";
+  }
+
   private Config()
   {
   }
Index: test/com/bitmechanic/maxq/test/MainTest.java
===================================================================
RCS file: /cvs/maxq/test/com/bitmechanic/maxq/test/MainTest.java,v
retrieving revision 1.1
diff -u -r1.1 MainTest.java
--- test/com/bitmechanic/maxq/test/MainTest.java 18 Feb 2005 16:13:32 -0000 1.1
+++ test/com/bitmechanic/maxq/test/MainTest.java 11 Jan 2008 16:33:26 -0000
@@ -7,13 +7,14 @@
 public class MainTest extends TestCase
 {
   private Config config = Config.getConfig();
-
+  
   public void testPathSet() throws Exception
   {
     String[] args = {"--path", "\\foo\\bar"};
     Main.CommandLineResults results = new Main.CommandLineResults();
     Main.parseLine(args, results);
-    assertEquals("\\foo\\bar", config.getPythonPath());
+    String defaultLocation = Config.getDefaultLocation();
+    assertEquals(defaultLocation + ":test:\\foo\\bar", config.getPythonPath() );
   }
 
   public void testShortPathSet() throws Exception
@@ -21,7 +22,8 @@
     String[] args = {"-a", "\\foo\\bar"};
     Main.CommandLineResults results = new Main.CommandLineResults();
     Main.parseLine(args, results);
-    assertEquals("\\foo\\bar", config.getPythonPath());
+    String defaultLocation = Config.getDefaultLocation();
+    assertEquals(defaultLocation + ":test:\\foo\\bar:\\foo\\bar", config.getPythonPath() );
   }
 
   public void testPortUnSet() throws Exception





Tim O'Brien




On Jan 7, 2008, at 1:46 PM, Oliver Bock wrote:

>> Anyone opposed to me crafting an upload request to the Maven 2  
>> repository for maxq.  I'm currently using it in a few projects, and  
>> this would make it easier to use.
>
> Sounds good.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

Re: Patch to MainTest and Config + Maven 2 POM

by Oliver Bock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tim O'Brien wrote:
> Could someone take a look at this patch, and let me know if it either
> makes sense or breaks the tests.   I wasn't sure if the MainTest unit
> tests were still being used because the RELEASE instructions only
> counsel running "ant runtest".

Hi Tim,

I only have time to eyeball you changes, but they look simple and safe
enough to me.  Feel free to commit them.


  Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...