Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repository not found in v3.0.0 #119

Open
ivarkol opened this issue Apr 22, 2020 · 8 comments
Open

Repository not found in v3.0.0 #119

ivarkol opened this issue Apr 22, 2020 · 8 comments

Comments

@ivarkol
Copy link

ivarkol commented Apr 22, 2020

I have error No Repository with id stage is defined. with plugin v3.0.0, but this error don't reproduce in plugin v2.2.0.
my pom.xml:

...
     <repositories>
        <repository>
            <id>snapshots</id>
            <url>http://nexus/repository/snapshots/</url>
            <snapshots><enabled>true</enabled></snapshots>
            <releases><enabled>false</enabled></releases>
        </repository>
        <repository>
            <id>stage</id>
            <url>http://nexus/repository/stage/</url>
            <snapshots><enabled>false</enabled></snapshots>
            <releases><enabled>true</enabled></releases>
        </repository>
        <repository>
            <id>releases</id>
            <url>http://nexus/repository/releases/</url>
            <snapshots><enabled>false</enabled></snapshots>
            <releases><enabled>true</enabled></releases>
        </repository>
      </repositories>

      <build>
        <plugins>
            <plugin>
                <groupId>com.e-gineering</groupId>
                <artifactId>gitflow-helper-maven-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <releaseDeploymentRepository>releases</releaseDeploymentRepository>
                    <stageDeploymentRepository>stage</stageDeploymentRepository>
                    <snapshotDeploymentRepository>snapshots</snapshotDeploymentRepository>
                </configuration>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <goals>
                            <goal>enforce-versions</goal>
                            <goal>retarget-deploy</goal>
                            <goal>tag-master</goal>
                            <goal>promote-master</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
...
@rhierlmeier
Copy link

I run into the same problem. In my environment I have a mirror defined in ~/.m2/settings.xml

	<mirrors>
		<mirror>
		  <id>localMirror</id>
		  <name>localMirror</name>
		  <url>https://localMirror/repository/MavenPublic/</url>
		  <mirrorOf>*</mirrorOf>
		</mirror>
	</mirrors>

In the resolved Maven project this only this mirror is in the remote repositories.

@rhierlmeier
Copy link

The problem should be with fixed with #132. We can close this issue.

Any plans for a release?

@bvarner
Copy link
Contributor

bvarner commented Apr 18, 2023

I plan to work on that this week.

@rhierlmeier
Copy link

Great, thank you.

@rhierlmeier
Copy link

I introduced a bug with PR#132. The mirrored repositories have not authentication object. I am preparing a new PR.

@rhierlmeier
Copy link

Problem fixed with PR #138. It tested the fix in my environment (happens only with proxies).
IMHO the issue can be closed.

@rhierlmeier
Copy link

Today I testet 3.1.0-SNAPSHOT in all branch types. In the master branch build I got this exception:

[ERROR] Failed to execute goal com.e-gineering:gitflow-helper-maven-plugin:3.1.0-SNAPSHOT:promote-master (default) on project 9999_998-TEST_GitFlowDocker: Cannot resolve artifacts from 'null' repository if the local repository is also disabled. -> [Help 1]
 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.e-gineering:gitflow-helper-maven-plugin:3.1.0-DEPATCH3:promote-master (default) on project 9999_998-TEST_GitFlowDocker: Cannot resolve artifacts from 'null' repository if the local repository is also disabled.
     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:375)
     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
     at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke (Method.java:498)
     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
 Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot resolve artifacts from 'null' repository if the local repository is also disabled.
     at com.e_gineering.maven.gitflowhelper.AbstractGitflowBasedRepositoryMojo.attachExistingArtifacts (AbstractGitflowBasedRepositoryMojo.java:221)
     at com.e_gineering.maven.gitflowhelper.PromoteMasterMojo.execute (PromoteMasterMojo.java:55)
     at com.e_gineering.maven.gitflowhelper.AbstractGitflowBranchMojo.execute (AbstractGitflowBranchMojo.java:92)
     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
     at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke (Method.java:498)
     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

I am searching for a fix

@rhierlmeier
Copy link

PR #140 fixes this NPE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants