org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout Java Examples

The following examples show how to use org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultArtifactDownloader.java    From opoopress with Apache License 2.0 6 votes vote down vote up
private ArtifactRepository parseRepository(String repo, ArtifactRepositoryPolicy policy) throws MojoFailureException {
    // if it's a simple url
    String id = null;
    ArtifactRepositoryLayout layout = getLayout("default");
    String url = repo;

    // if it's an extended repo URL of the form id::layout::url
    if (repo.contains("::")) {
        Matcher matcher = ALT_REPO_SYNTAX_PATTERN.matcher(repo);
        if (!matcher.matches()) {
            throw new MojoFailureException(repo, "Invalid syntax for repository: " + repo,
                    "Invalid syntax for repository. Use \"id::layout::url\" or \"URL\".");
        }

        id = matcher.group(1).trim();
        if (!StringUtils.isEmpty(matcher.group(2))) {
            layout = getLayout(matcher.group(2).trim());
        }
        url = matcher.group(3).trim();
    }
    return artifactRepositoryFactory.createArtifactRepository(id, url, layout, policy, policy);
}
 
Example #2
Source File: DefaultArtifactDownloader.java    From opoopress with Apache License 2.0 6 votes vote down vote up
public DefaultArtifactDownloader(Log log,
                                 ArtifactFactory artifactFactory,
                                 ArtifactResolver artifactResolver,
                                 ArtifactRepository localRepository,
                                 List<ArtifactRepository> remoteArtifactRepositories,
                                 String remoteRepositories,
                                 Map<String, ArtifactRepositoryLayout> repositoryLayouts,
                                 ArtifactRepositoryFactory artifactRepositoryFactory,
                                 ArtifactMetadataSource artifactMetadataSource,
                                 boolean enableOpooPressRepos) {
    this.artifactFactory = artifactFactory;
    this.artifactResolver = artifactResolver;
    this.localRepository = localRepository;
    this.remoteArtifactRepositories = remoteArtifactRepositories;
    this.remoteRepositories = remoteRepositories;
    this.repositoryLayouts = repositoryLayouts;
    this.artifactRepositoryFactory = artifactRepositoryFactory;
    this.artifactMetadataSource = artifactMetadataSource;
    this.enableOpooPressRepos = enableOpooPressRepos;
    this.log = log;
}
 
Example #3
Source File: GenericDaemonGenerator.java    From appassembler with MIT License 6 votes vote down vote up
private Daemon createDaemon( MavenProject project, ArtifactRepositoryLayout layout, String outputFileNameMapping )
{
    Daemon complete = new Daemon();

    complete.setClasspath( new Classpath() );

    // -----------------------------------------------------------------------
    // Add the project itself as a dependency.
    // -----------------------------------------------------------------------
    complete.getClasspath().addDependency( DependencyFactory.create( project.getArtifact(), layout,
                                                                     outputFileNameMapping ) );

    // -----------------------------------------------------------------------
    // Add all the dependencies of the project.
    // -----------------------------------------------------------------------
    for ( Iterator it = project.getRuntimeArtifacts().iterator(); it.hasNext(); )
    {
        Artifact artifact = (Artifact) it.next();

        Dependency dependency = DependencyFactory.create( artifact, layout, outputFileNameMapping );

        complete.getClasspath().addDependency( dependency );
    }

    return complete;
}
 
Example #4
Source File: DefaultArtifactDownloader.java    From opoopress with Apache License 2.0 5 votes vote down vote up
private ArtifactRepositoryLayout getLayout(String id) throws MojoFailureException {
    ArtifactRepositoryLayout layout = repositoryLayouts.get(id);

    if (layout == null) {
        throw new MojoFailureException(id, "Invalid repository layout", "Invalid repository layout: " + id);
    }

    return layout;
}
 
Example #5
Source File: MavenDependencyUtil.java    From DevToolBox with GNU Lesser General Public License v2.1 5 votes vote down vote up
/**
 * maven仓库处理
 *
 * @return
 * @throws Exception
 */
private static ArtifactRepository localRepository() throws Exception {
    if (mavenHome == null) {
        getMavenHome();
    }
    SettingsBuildingRequest request = new DefaultSettingsBuildingRequest();
    request.setGlobalSettingsFile(new File(mavenHome, "/conf/settings.xml"));

    DefaultSettingsBuilder builder = new DefaultSettingsBuilderFactory().newInstance();
    SettingsBuildingResult ret = builder.build(request);

    String path = ret.getEffectiveSettings().getLocalRepository();
    path = path == null ? String.format("%s%s", System.getProperty("user.home"), "\\.m2\\repository") : path;
    return FACTORY.createArtifactRepository("local", "file://" + path, (ArtifactRepositoryLayout) new DefaultRepositoryLayout(), null, null);
}
 
Example #6
Source File: Maven3DependencyTreeBuilder.java    From archiva with Apache License 2.0 5 votes vote down vote up
MavenRepositorySystem initMaven() throws IllegalAccessException
{
    MavenRepositorySystem system = new MavenRepositorySystem( );
    DefaultArtifactHandlerManager afm = new DefaultArtifactHandlerManager( );
    DefaultRepositoryLayout layout = new DefaultRepositoryLayout( );
    FieldUtils.writeField( system, "artifactHandlerManager",  afm, true);
    Map<String, ArtifactRepositoryLayout> map = new HashMap<>( );
    map.put( "defaultRepositoryLayout", layout );
    FieldUtils.writeField( system, "layouts",  map, true);
    return system;
}
 
Example #7
Source File: RunEpisodesBPlugin.java    From hyperjaxb3 with BSD 2-Clause "Simplified" License 5 votes vote down vote up
protected void setUp() throws Exception {
	super.setUp();

	mavenProjectBuilder = (MavenProjectBuilder) getContainer().lookup(
			MavenProjectBuilder.ROLE);
	ArtifactFactory artifactFactory = (ArtifactFactory) getContainer()
			.lookup(ArtifactFactory.ROLE);

	final Map<String, Mojo> mojos = (Map<String, Mojo>) getContainer()
			.lookupMap(Mojo.ROLE);

	for (Mojo mojo : mojos.values()) {
		if (mojo instanceof Hyperjaxb3Mojo) {
			this.mojo = (Hyperjaxb3Mojo) mojo;
		}
	}

	MavenSettingsBuilder settingsBuilder = (MavenSettingsBuilder) getContainer()
			.lookup(MavenSettingsBuilder.ROLE);
	ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) getContainer()
			.lookup(ArtifactRepositoryLayout.ROLE, "default");

	Settings settings = settingsBuilder.buildSettings();

	String url = settings.getLocalRepository();

	if (!url.startsWith("file:")) {
		url = "file://" + url;
	}

	localRepository = new DefaultArtifactRepository("local", url,
			new DefaultRepositoryLayout());
}
 
Example #8
Source File: DependencyFactory.java    From appassembler with MIT License 5 votes vote down vote up
/**
 * Used by AbstractBooterDaemonGenerator.
 * @param project {@link MavenProject}
 * @param id The id.
 * @param layout {@link ArtifactRepositoryLayout}
 * @param outputFileNameMapping The name mapping.
 * @return the dependency.
 */
public static Dependency create( MavenProject project, String id, ArtifactRepositoryLayout layout,
                                 String outputFileNameMapping )
    throws DaemonGeneratorException
{
    Artifact artifact = (Artifact) project.getArtifactMap().get( id );

    if ( artifact == null )
    {
        throw new DaemonGeneratorException( "The project has to have a dependency on '" + id + "'." );
    }

    return create( artifact, layout, outputFileNameMapping );
}
 
Example #9
Source File: DependencyFactory.java    From appassembler with MIT License 5 votes vote down vote up
/**
 * Used by AssembleMojo and JavaServiceWrapperDaemonGenerator.
 * @param artifact {@link Artifact}
 * @param layout {@link ArtifactRepositoryLayout}
 * @param useTimestampInSnapshotFileName timestamp or not.
 * @param outputFileNameMapping The name mapping.
 * @return the dependency.
 */
public static Dependency create(Artifact artifact, ArtifactRepositoryLayout layout,
                                boolean useTimestampInSnapshotFileName, String outputFileNameMapping)
{
    Dependency dependency = create( artifact, layout, outputFileNameMapping );

    if ( artifact.isSnapshot() && !useTimestampInSnapshotFileName )
    {
        dependency.setRelativePath( ArtifactUtils.pathBaseVersionOf( layout, artifact ) );
    }

    return dependency;
}
 
Example #10
Source File: ArtifactUtils.java    From appassembler with MIT License 5 votes vote down vote up
/**
 * get relative path the copied artifact using base version. This is mainly use to SNAPSHOT instead of timestamp in
 * the file name
 *
 * @param artifactRepositoryLayout {@link ArtifactRepositoryLayout}
 * @param artifact {@link Artifact}
 * @return The base version.
 */
public static String pathBaseVersionOf( ArtifactRepositoryLayout artifactRepositoryLayout, Artifact artifact )
{
    ArtifactHandler artifactHandler = artifact.getArtifactHandler();

    StringBuilder fileName = new StringBuilder();

    fileName.append( artifact.getArtifactId() ).append( "-" ).append( artifact.getBaseVersion() );

    if ( artifact.hasClassifier() )
    {
        fileName.append( "-" ).append( artifact.getClassifier() );
    }

    if ( artifactHandler.getExtension() != null && artifactHandler.getExtension().length() > 0 )
    {
        fileName.append( "." ).append( artifactHandler.getExtension() );
    }

    String relativePath = artifactRepositoryLayout.pathOf( artifact );
    String[] tokens = StringUtils.split( relativePath, "/" );
    tokens[tokens.length - 1] = fileName.toString();

    StringBuilder path = new StringBuilder();

    for ( int i = 0; i < tokens.length; ++i )
    {

        path.append( tokens[i] );
        if ( i != tokens.length - 1 )
        {
            path.append( "/" );
        }
    }

    return path.toString();

}
 
Example #11
Source File: DependencyFactory.java    From appassembler with MIT License 5 votes vote down vote up
/**
 * Used by GenericDaemonGenerator.
 * @param artifact {@link Artifact}
 * @param layout {@link ArtifactRepositoryLayout}
 * @param outputFileNameMapping The name mapping.
 * @return the dependency.
 */
public static Dependency create( Artifact artifact, ArtifactRepositoryLayout layout, String outputFileNameMapping )
{
    Dependency dependency = new Dependency();
    dependency.setGroupId( artifact.getGroupId() );
    dependency.setArtifactId( artifact.getArtifactId() );
    dependency.setVersion( artifact.getVersion() );
    dependency.setClassifier( artifact.getClassifier() );

    String path = layout.pathOf( artifact );
    if ( StringUtils.isNotEmpty( outputFileNameMapping ) )
    {
        // Replace the file name part of the path with one that has been mapped
        File directory = new File( path ).getParentFile();

        try
        {
            String fileName = MappingUtils.evaluateFileNameMapping( outputFileNameMapping, artifact );
            File file = new File( directory, fileName );
            // Always use forward slash as path separator, because that's what layout.pathOf( artifact ) uses
            path = file.getPath().replace( '\\', '/' );
        }
        catch ( InterpolationException e )
        {
            // TODO Handle exceptions!
            // throw new MojoExecutionException("Unable to map file name.", e);
        }
    }
    dependency.setRelativePath( path );

    return dependency;
}
 
Example #12
Source File: CreateRepositoryMojo.java    From appassembler with MIT License 4 votes vote down vote up
/**
 * calling from Maven.
 *
 * @see org.apache.maven.plugin.AbstractMojo#execute()
 */
public void execute()
    throws MojoExecutionException, MojoFailureException
{
    // ----------------------------------------------------------------------
    // Create new repository for dependencies
    // ----------------------------------------------------------------------

    ArtifactRepositoryLayout artifactRepositoryLayout = getArtifactRepositoryLayout();

    // -----------------------------------------------------------------------
    // Initialize
    // -----------------------------------------------------------------------

    StringBuilder path = new StringBuilder( "file://" + assembleDirectory.getAbsolutePath() + "/" );

    path.append( repositoryName );

    ArtifactRepository artifactRepository =
        artifactRepositoryFactory.createDeploymentArtifactRepository( "appassembler", path.toString(),
                                                                      artifactRepositoryLayout, true );

    if ( preClean ) {
        removeDirectory( new File( artifactRepository.getBasedir() ) );
    }

    // -----------------------------------------------------------------------
    // Install the project's artifact in the new repository
    // -----------------------------------------------------------------------

    installArtifact( projectArtifact, artifactRepository );

    // ----------------------------------------------------------------------
    // Install dependencies in the new repository
    // ----------------------------------------------------------------------

    // TODO: merge with the artifacts below so no duplicate versions included
    for ( Artifact artifact : artifacts )
    {
        installArtifact( artifact, artifactRepository, this.useTimestampInSnapshotFileName );
    }

    if ( installBooterArtifacts )
    {
        // ----------------------------------------------------------------------
        // Install appassembler booter in the new repos
        // ----------------------------------------------------------------------
        installBooterArtifacts( artifactRepository );
    }
}
 
Example #13
Source File: MavenLocationExpanderTest.java    From pom-manipulation-ext with Apache License 2.0 4 votes vote down vote up
@Test
public void locationURLs()
                throws Exception
{
    final ArtifactRepositoryLayout layout = new DefaultRepositoryLayout();

    final ArtifactRepositoryPolicy snapshots =
                    new ArtifactRepositoryPolicy( true, ArtifactRepositoryPolicy.UPDATE_POLICY_DAILY,
                                                  ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN );

    final ArtifactRepositoryPolicy releases =
                    new ArtifactRepositoryPolicy( true, ArtifactRepositoryPolicy.UPDATE_POLICY_NEVER,
                                                  ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN );

    final File localRepo = File.createTempFile( "local.repo.", ".dir" );
    localRepo.deleteOnExit();

    final ArtifactRepository local =
                    new MavenArtifactRepository( "local", localRepo.toURI()
                                                                   .toString(), layout, snapshots, releases );

    final ArtifactRepository remote =
                    new MavenArtifactRepository( "remote", "http:///repo.maven.apache.org/maven2", layout, snapshots, releases );

    final Settings settings = new Settings();

    final MavenLocationExpander ex =
                    new MavenLocationExpander( Collections.<Location> emptyList(),
                                               Collections.<ArtifactRepository> singletonList( remote ), local,
                                               new DefaultMirrorSelector(), settings, Collections.<String> emptyList() );

    final List<Location> result = ex.expand( MavenLocationExpander.EXPANSION_TARGET );

    assertThat( result.size(), equalTo( 2 ) );

    final Iterator<Location> iterator = result.iterator();
    Location loc = iterator.next();

    assertThat( loc.getName(), equalTo( local.getId() ) );
    assertThat( loc.getUri(), equalTo( local.getUrl() ) );

    loc = iterator.next();

    assertThat( loc.getName(), equalTo( remote.getId() ) );
    assertThat( loc.getUri(), equalTo( remote.getUrl() ) );

}
 
Example #14
Source File: MavenLocationExpanderTest.java    From pom-manipulation-ext with Apache License 2.0 4 votes vote down vote up
@Test
public void useActiveSettingsProfileRepos()
    throws Exception
{
    final ArtifactRepositoryLayout layout = new DefaultRepositoryLayout();

    final ArtifactRepositoryPolicy snapshots =
        new ArtifactRepositoryPolicy( true, ArtifactRepositoryPolicy.UPDATE_POLICY_DAILY,
                                      ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN );

    final ArtifactRepositoryPolicy releases =
        new ArtifactRepositoryPolicy( true, ArtifactRepositoryPolicy.UPDATE_POLICY_NEVER,
                                      ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN );

    final File localRepo = File.createTempFile( "local.repo.", ".dir" );
    localRepo.deleteOnExit();

    final ArtifactRepository local =
        new MavenArtifactRepository( "local", localRepo.toURI()
                                                       .toString(), layout, snapshots, releases );

    final Repository remote = new Repository();
    remote.setId( "remote" );
    remote.setUrl( "http:///repo.maven.apache.org/maven2" );

    final Profile profile = new Profile();
    profile.setId( "test" );
    profile.addRepository( remote );

    final Settings settings = new Settings();
    settings.addProfile( profile );

    final MavenLocationExpander ex =
        new MavenLocationExpander( Collections.<Location> emptyList(),
                                   Collections.<ArtifactRepository> emptyList(), local,
                                   new DefaultMirrorSelector(), settings,
                                   Collections.<String> singletonList( profile.getId() ) );

    final List<Location> result = ex.expand( MavenLocationExpander.EXPANSION_TARGET );

    assertThat( result.size(), equalTo( 2 ) );

    final Iterator<Location> iterator = result.iterator();
    Location loc = iterator.next();

    assertThat( loc.getName(), equalTo( local.getId() ) );
    assertThat( loc.getUri(), equalTo( local.getUrl() ) );

    loc = iterator.next();

    assertThat( loc.getName(), equalTo( remote.getId() ) );
    assertThat( loc.getUri(), equalTo( remote.getUrl() ) );
}
 
Example #15
Source File: MavenLocationExpanderTest.java    From pom-manipulation-ext with Apache License 2.0 4 votes vote down vote up
@Test
public void mirrorAdjustsLocationURLs()
    throws Exception
{
    final Mirror mirror = new Mirror();
    mirror.setId( "test-mirror" );
    mirror.setMirrorOf( "*" );
    mirror.setUrl( "http://nowhere.com" );

    final ArtifactRepositoryLayout layout = new DefaultRepositoryLayout();

    final ArtifactRepositoryPolicy snapshots =
        new ArtifactRepositoryPolicy( true, ArtifactRepositoryPolicy.UPDATE_POLICY_DAILY,
                                      ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN );

    final ArtifactRepositoryPolicy releases =
        new ArtifactRepositoryPolicy( true, ArtifactRepositoryPolicy.UPDATE_POLICY_NEVER,
                                      ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN );

    final File localRepo = File.createTempFile( "local.repo.", ".dir" );
    localRepo.deleteOnExit();

    final ArtifactRepository local =
        new MavenArtifactRepository( "local", localRepo.toURI()
                                                       .toString(), layout, snapshots, releases );

    final ArtifactRepository remote =
        new MavenArtifactRepository( "remote", "http:///repo.maven.apache.org/maven2", layout, snapshots, releases );

    final Settings settings = new Settings();
    settings.addMirror( mirror );

    final MavenLocationExpander ex =
        new MavenLocationExpander( Collections.<Location> emptyList(),
                                   Collections.<ArtifactRepository> singletonList( remote ), local,
                                   new DefaultMirrorSelector(), settings, Collections.<String> emptyList() );

    final List<Location> result = ex.expand( MavenLocationExpander.EXPANSION_TARGET );

    assertThat( result.size(), equalTo( 2 ) );

    final Iterator<Location> iterator = result.iterator();
    Location loc = iterator.next();

    assertThat( loc.getName(), equalTo( local.getId() ) );
    assertThat( loc.getUri(), equalTo( local.getUrl() ) );

    loc = iterator.next();

    assertThat( loc.getName(), equalTo( mirror.getId() ) );
    assertThat( loc.getUri(), equalTo( mirror.getUrl() ) );
}
 
Example #16
Source File: MavenLocationExpander.java    From pom-manipulation-ext with Apache License 2.0 4 votes vote down vote up
private void addSettingsProfileRepositoriesTo( final Set<Location> locs, final Settings settings,
                                               final List<String> activeProfiles,
                                               final MirrorSelector mirrorSelector )
    throws MalformedURLException
{
    if ( settings != null )
    {
        final Map<String, Profile> profiles = settings.getProfilesAsMap();
        if ( profiles != null && activeProfiles != null && !activeProfiles.isEmpty() )
        {
            final LinkedHashSet<String> active = new LinkedHashSet<>( activeProfiles );

            final List<String> settingsActiveProfiles = settings.getActiveProfiles();
            if ( settingsActiveProfiles != null && !settingsActiveProfiles.isEmpty() )
            {
                active.addAll( settingsActiveProfiles );
            }

            for ( final String profileId : active )
            {
                final Profile profile = profiles.get( profileId );
                if ( profile != null )
                {
                    final List<Repository> repositories = profile.getRepositories();
                    if ( repositories != null )
                    {
                        final List<Mirror> mirrors = settings.getMirrors();
                        final ArtifactRepositoryLayout layout = new DefaultRepositoryLayout();
                        for ( final Repository repo : repositories )
                        {
                            String id = repo.getId();
                            String url = repo.getUrl();

                            if ( mirrors != null )
                            {
                                final ArtifactRepositoryPolicy snapshots = convertPolicy( repo.getSnapshots() );
                                final ArtifactRepositoryPolicy releases = convertPolicy( repo.getReleases() );

                                final MavenArtifactRepository arepo =
                                    new MavenArtifactRepository( id, url, layout, snapshots, releases );

                                final Mirror mirror =
                                    mirrorSelector == null ? null : mirrorSelector.getMirror( arepo, mirrors );

                                if ( mirror != null )
                                {
                                    id = mirror.getId();
                                    url = mirror.getUrl();
                                }

                                SimpleHttpLocation addition = new SimpleHttpLocation( id, url, snapshots.isEnabled(), releases.isEnabled(), true, false, null );

                                addition.setAttribute(Location.CONNECTION_TIMEOUT_SECONDS, 60);

                                locs.add (addition);
                            }
                        }
                    }

                }
            }
        }
    }
}
 
Example #17
Source File: AntTaskBackedMavenPublisher.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
protected ArtifactRepository createLocalArtifactRepository() {
    ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) lookup(ArtifactRepositoryLayout.ROLE, getLocalRepository().getLayout());
    return new DefaultArtifactRepository("local", tmpDirFactory.create().toURI().toString(), repositoryLayout);
}
 
Example #18
Source File: DaemonGenerationRequest.java    From appassembler with MIT License 4 votes vote down vote up
/**
 * @return The current repository layout.
 */
public ArtifactRepositoryLayout getRepositoryLayout()
{
    return repositoryLayout;
}
 
Example #19
Source File: JavaServiceWrapperDaemonGenerator.java    From appassembler with MIT License 4 votes vote down vote up
private void createClasspath( Daemon daemon, DaemonGenerationRequest request, FormattedProperties confFile,
                              Properties configuration )
{
    final String wrapperClassPathPrefix = "wrapper.java.classpath.";

    int counter = 1;
    // @todo dennisl: Shouldn't we be using %REPO_DIR% here?
    confFile.setProperty( wrapperClassPathPrefix + counter++, daemon.getRepositoryName() + "/wrapper.jar" );

    String configurationDirFirst = configuration.getProperty( "configuration.directory.in.classpath.first" );
    if ( configurationDirFirst != null )
    {
        confFile.setProperty( wrapperClassPathPrefix + counter++, configurationDirFirst );
    }

    MavenProject project = request.getMavenProject();
    ArtifactRepositoryLayout layout = request.getRepositoryLayout();

    // Load all jars in %ENDORSED_DIR% if specified
    if ( daemon.getEndorsedDir() != null )
    {
        confFile.setProperty( wrapperClassPathPrefix + counter++, daemon.getEndorsedDir() + "/*" );
    }

    if ( daemon.isUseWildcardClassPath() )
    {
        confFile.setProperty( wrapperClassPathPrefix + counter++, "%REPO_DIR%/*" );
    }
    else
    {
        confFile.setProperty( wrapperClassPathPrefix + counter++, "%REPO_DIR%/"
            + DependencyFactory.create( project.getArtifact(), layout, true,
                                        request.getOutputFileNameMapping() ).getRelativePath() );

        Iterator j = project.getRuntimeArtifacts().iterator();
        while ( j.hasNext() )
        {
            Artifact artifact = (Artifact) j.next();

            confFile.setProperty( wrapperClassPathPrefix + counter, "%REPO_DIR%/"
                + DependencyFactory.create( artifact, layout, daemon.isUseTimestampInSnapshotFileName(),
                                            request.getOutputFileNameMapping() ).getRelativePath() );
            counter++;
        }
    }

    String configurationDirLast = configuration.getProperty( "configuration.directory.in.classpath.last" );
    if ( configurationDirLast != null )
    {
        confFile.setProperty( wrapperClassPathPrefix + counter++, configurationDirLast );
    }
}
 
Example #20
Source File: AntTaskBackedMavenLocalPublisher.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
protected ArtifactRepository createLocalArtifactRepository() {
    ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) lookup(ArtifactRepositoryLayout.ROLE, getLocalRepository().getLayout());
    return new DefaultArtifactRepository("local", repoLocation, repositoryLayout);
}
 
Example #21
Source File: AntTaskBackedMavenPublisher.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
protected ArtifactRepository createLocalArtifactRepository() {
    ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) lookup(ArtifactRepositoryLayout.ROLE, getLocalRepository().getLayout());
    return new DefaultArtifactRepository("local", tmpDirFactory.create().toURI().toString(), repositoryLayout);
}
 
Example #22
Source File: AntTaskBackedMavenLocalPublisher.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
protected ArtifactRepository createLocalArtifactRepository() {
    ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) lookup(ArtifactRepositoryLayout.ROLE, getLocalRepository().getLayout());
    return new DefaultArtifactRepository("local", repoLocation, repositoryLayout);
}
 
Example #23
Source File: AntTaskBackedMavenPublisher.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
protected ArtifactRepository createLocalArtifactRepository() {
    ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) lookup(ArtifactRepositoryLayout.ROLE, getLocalRepository().getLayout());
    return new DefaultArtifactRepository("local", tmpDirFactory.create().toURI().toString(), repositoryLayout);
}
 
Example #24
Source File: AntTaskBackedMavenLocalPublisher.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
protected ArtifactRepository createLocalArtifactRepository() {
    ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) lookup(ArtifactRepositoryLayout.ROLE, getLocalRepository().getLayout());
    return new DefaultArtifactRepository("local", repoLocation, repositoryLayout);
}
 
Example #25
Source File: AntTaskBackedMavenPublisher.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
protected ArtifactRepository createLocalArtifactRepository() {
    ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) lookup(ArtifactRepositoryLayout.ROLE, getLocalRepository().getLayout());
    return new DefaultArtifactRepository("local", tmpDirFactory.create().toURI().toString(), repositoryLayout);
}
 
Example #26
Source File: AntTaskBackedMavenLocalPublisher.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
protected ArtifactRepository createLocalArtifactRepository() {
    ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) lookup(ArtifactRepositoryLayout.ROLE, getLocalRepository().getLayout());
    return new DefaultArtifactRepository("local", repoLocation, repositoryLayout);
}
 
Example #27
Source File: DaemonGenerationRequest.java    From appassembler with MIT License 2 votes vote down vote up
/**
 * Set the current repository layout.
 *
 * @param repositoryLayout The repositoryLayout which will be set.
 */
public void setRepositoryLayout( ArtifactRepositoryLayout repositoryLayout )
{
    this.repositoryLayout = repositoryLayout;
}