o not sure what happened but i couldn't make an assembly the way i used to, so i reverted

o added an OSGi manifest to make it easier to Eugene to integrate into Eclipse


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@480835 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2006-11-30 04:45:40 +00:00
parent 6a36ae3b72
commit a6977b53c7
5 changed files with 40 additions and 107 deletions

View File

@ -1,51 +0,0 @@
import org.apache.maven.cli.ConsoleDownloadMonitor;
import org.apache.maven.embedder.*;
import org.apache.maven.project.*;
import org.apache.maven.monitor.event.*;
import java.io.*;
import java.util.*;
import org.codehaus.plexus.logging.*;
import org.codehaus.plexus.logging.console.*;
public class Plugin
{
public Plugin()
throws Exception
{
MavenEmbedder maven = new MavenEmbedder();
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
maven.setClassLoader( classLoader );
maven.setLogger( new MavenEmbedderConsoleLogger() );
maven.start();
System.out.println( "Happy happy joy joy!" );
System.out.println( "Now build a project" );
File targetDirectory = new File( System.getProperty( "user.dir" ), "target/embedder-test-project" );
System.out.println( ">> " + targetDirectory );
File pomFile = new File( targetDirectory, "pom.xml" );
MavenProject pom = maven.readProjectWithDependencies( pomFile );
EventMonitor eventMonitor = new DefaultEventMonitor( new PlexusLoggerAdapter( new MavenEmbedderConsoleLogger() ) );
System.out.println( "<<<<<<<<<<<<<<<<<<<<<<<<<");
maven.execute( pom, Collections.singletonList( "package" ), eventMonitor, new ConsoleDownloadMonitor(), null, targetDirectory );
System.out.println( "<<<<<<<<<<<<<<<<<<<<<<<<<");
}
public static void main( String[] args )
throws Exception
{
Plugin plugin = new Plugin();
}
}

View File

@ -1,18 +0,0 @@
- surefire needs to feed into the logging
- maven/plexus archiver needs to be fixed
-- to generate source folders for eclipse project from m2 pom.xml
we need to run generate-sources phase, so all plugins
registered for this phase will be kicked of and will register
target folders for compilation.
Ideally it would be nice to ask these plugins for the target
folders, but Brett said it will be only in 2.1, so I guess
we'll have to actually run these plugins and generate code.
-- In order to nicely show all the errors and events in the IDE UI
We need to have two messages for EACH event/error:
-- the short description (in Eclipse it can be used in Problems view)
-- detailed description (can be used in annotation/editors markers)
-- What are all the settings that must be provided? Ones that can be set
and what the default values would be if they aren't set.

View File

@ -26,22 +26,41 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-embedder</artifactId>
<name>Maven Embedder</name>
<properties>
<bundleVersion>2.1.0.v20061129-1142</bundleVersion>
</properties>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.1</version>
<configuration>
<finalName>${artifactId}-${bundleVersion}</finalName>
<descriptor>src/main/assembly/dep.xml</descriptor>
<archive>
<manifestFile>target/classes/META-INF/MANIFEST.MF</manifestFile>
<!--
This doesn't work and should
<manifestEntries>
<Manifest-Version>1.0</Manifest-Version>
<Bundle-ManifestVersion>2</Bundle-ManifestVersion>
<Bundle-Name>Maven 2.x Embedder Plug-in</Bundle-Name>
<Bundle-Vendor>org.apache.maven</Bundle-Vendor>
<Bundle-SymbolicName>org.maven.ide.embedder</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
<Bundle-ClassPath>.</Bundle-ClassPath>
</manifestEntries>
-->
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
@ -57,22 +76,16 @@
<version>2.1-SNAPSHOT</version>
</dependency>
</dependencies>
<reporting>
<plugins>
<!--
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-clover-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-pmd-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
</plugin>
-->
</plugins>
</reporting>
<distributionManagement>
<repository>
<id>apache.releases</id>
<name>Apache Release Distribution Repository</name>
<url>scp://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository</url>
</repository>
<snapshotRepository>
<id>apache.snapshots</id>
<name>Apache Development Snapshot Repository</name>
<url>file:///tmp/embedder</url>
</snapshotRepository>
</distributionManagement>
</project>

View File

@ -1,9 +0,0 @@
#!/bin/sh
mvn clean:clean assembly:assembly
CLASSPATH=target/maven-embedder-2.1-SNAPSHOT-dep.jar
javac -classpath $CLASSPATH Plugin.java
java -classpath $CLASSPATH:. Plugin

View File

@ -7,7 +7,6 @@
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<!-- TODO: use expressions instead: ${project.build.directory}, ${project.build.finalName}, or have a <build /> tag to include the built artifact -->
<directory>target/classes</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
@ -15,7 +14,6 @@
<dependencySets>
<dependencySet>
<outputDirectory>/</outputDirectory>
<outputFileNameMapping></outputFileNameMapping>
<unpack>true</unpack>
<scope>runtime</scope>
<excludes>