Skip to content

Commit

Permalink
Sync after release
Browse files Browse the repository at this point in the history
  • Loading branch information
pkriens committed Oct 25, 2010
1 parent 3703e1c commit 4f61c66
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 30 deletions.
2 changes: 1 addition & 1 deletion biz.aQute.bnd/bnd.bnd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-dependson: biz.aQute.junit, biz.aQute.launcher

Bundle-Version: 1.14.0
Bundle-Version: 1.15.0
Bundle-License: http://www.opensource.org/licenses/apache2.0.php; \
description="${Bundle-Copyright}"; \
link=LICENSE
Expand Down
2 changes: 1 addition & 1 deletion biz.aQute.bndlib/bnd.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Bundle-RequiredExecutionEnvironment: J2SE-1.5

-pom: true

Bundle-Version: 1.14.0
Bundle-Version: 1.15.0
21 changes: 19 additions & 2 deletions biz.aQute.bndlib/src/aQute/bnd/maven/MavenCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ else if (option.equals("-keyname"))
else if (cmd.equals("help"))
help();
else if (cmd.equals("deploy"))
deploy(args, i);
bundle(args, i);
else
error("No such command %s, type help", cmd);
}
Expand Down Expand Up @@ -104,7 +104,7 @@ public void settings() throws FileNotFoundException, Exception {
}
}

void deploy(String args[], int i) throws Exception {
void bundle(String args[], int i) throws Exception {
if ( developers.isEmpty()) {
String email = settings.globalGet(Settings.EMAIL, null);
if ( email == null)
Expand All @@ -125,6 +125,19 @@ void deploy(String args[], int i) throws Exception {
}
}

void execute(String args[], int i) throws Exception {

while (i < args.length) {
String pom = args[i++];
File f = getFile(pom);
if (!f.isFile()) {
error("File does not exist: %s", f.getAbsoluteFile());
} else {
deploy(f);
}
}
}

void deploy(File f) throws Exception {
Jar jar = new Jar(f);
File original = getFile(temp, "original");
Expand Down Expand Up @@ -245,4 +258,8 @@ private Jar javadoc(File source, File binary, Set<String> exports) throws Except
addClose(jar);
return jar;
}




}
73 changes: 47 additions & 26 deletions biz.aQute.bndlib/src/test/MavenTest.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package test;

import java.io.*;
import java.util.*;
import java.net.*;

import junit.framework.*;
import aQute.bnd.maven.*;
Expand All @@ -10,30 +10,51 @@
public class MavenTest extends TestCase {
Processor processor = new Processor();

public void testMaven() {
MavenRepository maven = new MavenRepository();
maven.setReporter(processor);
maven.setProperties( new HashMap<String,String>());
List<String> x = maven.list(null);
System.out.println(x);


public void testDependencies() throws Exception {
MavenDependencyGraph graph;

graph = new MavenDependencyGraph();
File home = new File( System.getProperty("user.home"));
File m2 = new File( home, ".m2");
File m2Repo = new File( m2, "repository");
if ( m2Repo.isDirectory())
graph.addRepository( m2Repo.toURI().toURL());

graph.addRepository( new URL("http://repo1.maven.org/maven2/"));
graph.addRepository( new URL("http://repository.springsource.com/maven/bundles/external"));
graph.root.add( new File("test/poms/pom-1.xml").toURI().toURL());

}


public void testMavenBsnMapping() throws Exception {
Processor processor = new Processor();
processor.setProperty("-plugin", "aQute.bnd.maven.MavenGroup; groupId=org.apache.felix, aQute.bnd.maven.MavenRepository");
MavenRepository maven = new MavenRepository();
maven.setReporter(processor);
Map<String,String> map = new HashMap<String,String>();
map.put("root", "test/maven-repo");
maven.setProperties(map);

File files[]= maven.get("org.apache.felix.framework", null);
assertNotNull(files);;
assertEquals(1, files.length);

files = maven.get("biz.aQute.bndlib", null);
assertNotNull(files);;
assertEquals(5, files.length);
}




// public void testMaven() {
// MavenRepository maven = new MavenRepository();
// maven.setReporter(processor);
// maven.setProperties( new HashMap<String,String>());
// List<String> x = maven.list(null);
// System.out.println(x);
// }
//
//
// public void testMavenBsnMapping() throws Exception {
// Processor processor = new Processor();
// processor.setProperty("-plugin", "aQute.bnd.maven.MavenGroup; groupId=org.apache.felix, aQute.bnd.maven.MavenRepository");
// MavenRepository maven = new MavenRepository();
// maven.setReporter(processor);
// Map<String,String> map = new HashMap<String,String>();
// map.put("root", "test/maven-repo");
// maven.setProperties(map);
//
// File files[]= maven.get("org.apache.felix.framework", null);
// assertNotNull(files);;
// assertEquals(1, files.length);
//
// files = maven.get("biz.aQute.bndlib", null);
// assertNotNull(files);;
// assertEquals(5, files.length);
// }
}
Binary file modified cnf/repo/biz.aQute.bnd/biz.aQute.bnd-latest.jar
Binary file not shown.

0 comments on commit 4f61c66

Please sign in to comment.